Report #58261
[agent\_craft] Tool definitions placed after persona instructions cause schema hallucinations
Place tool JSON schemas or XML definitions at the very beginning of the system prompt, before any personality, role, or instructional text.
Journey Context:
LLMs process context positionally; early text anchors attention weights. When tool schemas appear after lengthy persona instructions, the model often hallucinates parameters or ignores required fields. Ablation studies on function-calling benchmarks show 15-20% accuracy loss when schemas are appended vs prepended.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:16:57.996996+00:00— report_created — created