Few-Shot Examples Have Uneven Quality and Drag Output Down
You gave the model 5 examples; 2 are great, 3 are mediocre, and it averages toward the mediocre ones. Why example variance hurts and how to curate down to 3-5 consistent ones.
Articles tagged with #llm-output
You gave the model 5 examples; 2 are great, 3 are mediocre, and it averages toward the mediocre ones. Why example variance hurts and how to curate down to 3-5 consistent ones.
You asked for JSON matching a schema. Most calls return valid JSON, some return prose with JSON inside, some omit fields. Description vs enforcement, and how to fix at the API layer.
The model produced a citation like Smith et al. 2019 and the paper does not exist, or a URL that 404s. Why citation hallucination happens and how to stop it for good.
You prompted in English and the model answered in Chinese, or it switched mid-output. The exact cause of language drift and the system-prompt + retry pattern that locks the output language, verified June 2026.
The model's reply ends mid-sentence, mid-JSON, or with an unclosed code block. It is almost always the token cap. How to size it, detect truncation per SDK, and recover.
You asked for 10 ideas and got 3, or 10 slots padded with filler. Why list-length prompts under-deliver, and the prompt + schema fixes that actually get you N distinct items.
Your prompt still says 2023 in 2026, so the model recommends GPT-4, quotes old pricing, and cites dead frameworks. Fastest fix: inject the current date dynamically. Plus a diagnosis table and how to confirm it's gone.