Find answers from the community

Updated last year

Memory

At a glance

The community member has an Agent that tends to make multiple usages of various tools, and when the chain of thought gets too long, the Agent forgets that it has already used a tool in the same way. The community member wants to summarize/compress the chain of thought to save some context window. They wonder if LlamaIndex already provides this functionality, but had no luck with the documentation or Kapa AI. Other community members suggest implementing custom agents, changing the agent prompt to limit tool usage, and exploring how the agents work differently from Haystack.

Useful resources
Hi all. I have an Agent. It tends to make multiple usages of various tools. When the chain of thought gets too long, the Agent tends to forget that it has already used a tool in the exact same way. I wish to summarize/compress the chain of thought so as to save some context window. Before I get started on implementing my own, I wonder if LlamaIndex already provides this functionality? Had no luck with the documentation or with Kapa AI. This is significant for locally-hosted LLMs, which tend to have shorter context windows. I’m using ReAct Agents, if that matters.
L
h
5 comments
Hmm yea we don't have anything for this yet. For long chains of invoking tools, this seems helpful!
probably different issue but when I used an agent i noticed it wasn't smart about how it needed to use tools, I was thinking of adding a restriction of only using a tool once instead of iterating up to step limit in a naive manner
oh, i was just going to change the agent prompt to tell the llm to only use each tool once. haha
ok seems your agents work different from haystack, i'll take a look further
Add a reply
Sign up and join the conversation on Discord