jina-ai / thinkgpt

Agent techniques to augment your LLM and push it beyong its limits
Apache License 2.0
1.53k stars 134 forks source link

[Feature request] Dynamically adjust number of retrieved memory items #9

Closed muellerberndt closed 1 year ago

muellerberndt commented 1 year ago

Currently, remember returns up to limit items from memory. This leads to suboptimal results if the memory items are short. As an example, MicroGPT will forget some previous commands after 5 steps even though the context could easily fit 10 items.

In an ideal implementation (for an autonomous agent), ThinkGPT would return the maximum possible amount of memory items such that the context window is fully utilized (>= some max_tokens).