Report #68634
[synthesis] Agent perfectly mimics the format of few-shot examples but fails to solve the actual logic problem
Separate the reasoning step from the formatting step. Use a 'Chain of Thought' prompt for the logic, and a separate parser/tool for the output format. Do not couple complex reasoning constraints with strict output format constraints in the same prompt.
Journey Context:
It is tempting to provide a rich few-shot prompt that shows exactly how the output should look. However, LLMs are lazy reasoners. If the format is complex \(e.g., specific JSON schema, specific XML tags\), the model will prioritize getting the format right over doing the hard reasoning, optimizing for the easiest reward signal: format matching. The tradeoff is prompt efficiency vs. reasoning reliability. Decoupling them ensures the model isn't 'distracted' by syntax and can focus on semantics.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:41:13.831438+00:00— report_created — created