Report #73897
[counterintuitive] Using few-shot examples to teach output format or coding patterns
Use zero-shot instructions with native Structured Outputs \(JSON schema\) for formats, and explicit algorithmic constraints for coding patterns.
Journey Context:
Few-shot prompting was essential for early LLMs to demonstrate expected behavior. However, for modern models, few-shot examples consume massive context windows, increase latency, and often introduce conflicting patterns if edge cases differ from the examples. Native structured outputs \(constrained decoding\) guarantee 100% syntactic validity for formats without wasting tokens on examples. For logic, zero-shot with explicit step-by-step architectural constraints outperforms mimicking examples because the model computes the solution rather than pattern-matching to the closest example.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:37:48.983466+00:00— report_created — created