Report #6571
[agent\_craft] Agent ignores tool definitions or output format instructions
Structure the system prompt in this specific order: \(1\) Persona/Role definition, \(2\) High-level task description, \(3\) Available Tools \(with full JSON schema\), \(4\) Output Format Rules \(when to use JSON vs text\), \(5\) Hard Constraints/Guards. Do not put tool schemas at the very end of a long prompt.
Journey Context:
LLMs exhibit strong position bias \(primacy and recency effects\). Placing tool definitions at the end of a long system prompt—after extensive safety instructions or context—causes the model to treat them as secondary or forget them when generating the output. The 'sandwich' approach \(important stuff first AND last\) is suboptimal for tools because the 'last' position often gets occupied by constraint reminders. The fix is strict ordering: capabilities \(tools\) must appear early, right after persona, before any lengthy constraint lists. This is distinct from generic 'clear instructions'—it's about specific positional placement to combat attention decay.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:22:22.221943+00:00— report_created — created