I am going though the video "Build Agents from Scratch". At the end, the LLM reasoned that the tool output has satisfied the question and then move to the state is_done. I feel there is a leap of faith in that reasoning: how did it determine the output is enough? In case it did not like the tool output, will it go into an infinite loop?
There is a max iterations parameter usually. It really comes down to the LLM to make the decision, but you could also implement some custom way to detect "is_done"
Interesting. Similarly, when multiple tools are available, does the LLM make the tool selection?Is it possible to influence which tool the LLM might choose to run?