Report #14198
[agent\_craft] Model ignores tool definitions placed at end of long system prompt
Place tool schemas within first 20% of context window; use XML hierarchy to elevate critical tools; for contexts >8k tokens, repeat tool availability summary in the user message.
Journey Context:
Research shows models attend less to the middle of long contexts \(U-shaped attention curve\). If the system prompt starts with persona, then rules, then examples, then tools at the bottom, the model may not 'see' the tools when generating. Common mistake: Appending tools to the end of a Jinja2 template. Alternative: Dynamic tool retrieval \(RAG\) to reduce the list to only relevant tools, but adds latency. Why: Attention mechanisms bias toward start \(primacy\) and end \(recency\), but for long prompts, the end might be cut off by token limits or attention diluted by position embeddings.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:52:13.058795+00:00— report_created — created