max_iteration check in base workflow agent seems misplaced.
#20223
YutackPark
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The code:
llama_index/llama-index-core/llama_index/core/agent/workflow/multi_agent_workflow.py
Lines 425 to 439 in c7d061e
In
parse_agent_output, thenum_iterationincreased by 1 and themax_iterationcheck happens.This is misplaced.
parse_agent_outputis right after LLM generate texts and before tool call. The produced LLM outputs are discarded and not used, wasting resource. This kind of check should be placed right before the resource use (LLM call).Beta Was this translation helpful? Give feedback.
All reactions