AI Insights: Latency & Cost Optimization · part 5 of 17
Grounding the prompt: feed the model the facts
Current-year tax facts (pulled from the tax handouts) + eligibility gate + coverage instruction
The question
Is Qwen's 5–6 a capability ceiling, or a missing-information problem?
Qwen jumped 5 → 8/10, level with GPT-5.1. The gap was facts and rules, not model weights.
What was added
Two additions to the prompt, no model change. First, the correct current-year tax numbers, extracted by build_facts.py from the internal tax handout library (116 PDFs with current and prior-year columns: tax facts & figures, HSA/IRA/retirement limits, W-4, standard-vs-itemized) into a compact facts_block.txt. Second, an up-front statement of which credits this client is not eligible for (computed from the return data), plus a coverage instruction so a single call generates the full 6–8 insight set.
Result
| Variant | Quality | Insights | Eligibility violations | Notable |
|---|---|---|---|---|
| Qwen, raw production prompt | 5 / 10 | 2–3 | several | stale 401k limit, invented credits |
| Qwen + facts + gate + coverage | 8 / 10 | 6 | 0 | cites correct current-year $24,500 401k limit |
| GPT-5.1 + same additions | nudged up | — | 0 | grounding helps the paid model too |