Report #74500
[agent\_craft] Agent inconsistently selecting tools or hallucinating tool names not in the schema
Set temperature=0 for the tool-selection turn \(classification\), then temperature=0.7 for the final answer synthesis turn \(generation\).
Journey Context:
Tool selection is a deterministic classification task \(pick one from the schema\), while answer synthesis is a creative generation task. Using high temperature \(0.7\) for tool selection introduces randomness, causing the model to pick the wrong tool or hallucinate tool names not in the schema. Using temperature=0 for selection ensures greedy decoding picks the highest probability valid tool. However, using temperature=0 for the final answer makes it robotic; switching to 0.7 for the synthesis turn produces natural language. This 'bifurcation' requires two API calls but eliminates tool hallucination without sacrificing output quality.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:38:49.132429+00:00— report_created — created