Agent is not interpreting tool message, instead going into endless loop #1097
Replies: 2 comments 4 replies
-
One thing that looks incorrect above is you've commented out the path map but are returning "end", which isn't a node in the graph (did you mean the dunder "__ end __''" ) If that's not it, What model are you using? Do you have a langsmith trace to share? The cause of this could be anything from "the model is bad" (language models used to have the repetition failure mode more often) to "the message isn't being added to the state" |
Beta Was this translation helpful? Give feedback.
-
It turns out the problem was my model (llama3) was not good tool call or my prompt. |
Beta Was this translation helpful? Give feedback.
-
I followed the customer support example of langgraph, and created a simple tool calling agent using OllamaFunctions. Agent understands the question, calls the right tool, however, it goes into endless loop. The message from the tool is not understood as the final answer. Maybe I did something stupid, please point it out. Any help is appreciated.
My notebook is here: https://github.com/manojmanivannan/agent_rag_tools/blob/example/ask_main.ipynb
Beta Was this translation helpful? Give feedback.
All reactions