Report #93924
[agent\_craft] System prompt mixes role definition, tool schemas, and output format instructions into a single unstructured block, causing the model to ignore tool schemas or hallucinate output formats
Use a strict tripartite structure: \(1\) \*\*Role & Constraints\*\*: High-level persona and hard rules \(e.g., 'You are a coding assistant. Never execute rm -rf without user confirmation.'\); \(2\) \*\*Tool Manifest\*\*: Machine-readable schemas \(OpenAPI/JSON Schema\) with clear field descriptions and enum constraints, separated by XML tags ...; \(3\) \*\*Output Protocol\*\*: Exact formatting rules for thoughts/actions/observations \(e.g., 'You must output ... followed by exactly one ... block. No markdown code fences.'\). Use headers/boundaries between sections.
Journey Context:
Dumping everything into one paragraph leads to the model paying attention to the 'fluff' \(roleplay\) and ignoring the 'syntax' \(JSON schemas\). The separation mimics how fine-tuned function-calling models \(like GPT-4\) expect system prompts: distinct sections for developer instructions vs tool definitions. This 'Structured System Prompting' ensures the model treats schemas as inviolable syntax and role as guidance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:14:13.884544+00:00— report_created — created