### Answer
There are several reasons why your agent may not be transitioning to a particular state even with instructions. Here are common causes and solutions:
Possible Causes:
1.
Transition conditions aren't precise enough — Ensure your conditions precisely match your intended triggers. Consider breaking down complex conditions into multiple simpler ones. [(1) ](
)
2.
Instructions within a node are too complex — If a node contains multiple tasks, the agent might inconsistently execute them. You can improve consistency by splitting into separate nodes.
3.
The LLM model may need adjustment — If the instructions are concise but the agent struggles to follow them, try using a more capable LLM model for that node.
Recommended Solutions:
-
Add transition finetune examples — Provide examples to help the model understand your expectations.
-
Use stronger phrasing — Treat the transition like a high-priority action with phrases such as: "You must invoke the [function] at this point without fail. This is critical and non-negotiable." [(2) ](
)
-
Add an intermediate confirmation step — Instead of directly transitioning, ask the user if it's ok to proceed, then request the state transition. This has been reported to improve reliability.
-
Be more explicit in your instructions — Specify exactly what the agent should say first when entering a state, e.g., "The first thing you do when transitioning into this state is to ask: [specific question]" [(3) ](
)
-
Adjust LLM temperature — If responses are inconsistent, try adjusting the LLM temperature setting. [(1) ](
)
- **Add