The most common bug: silent confabulation
When information is missing, models default to generating something plausible-sounding. Without an explicit boundary instruction, you will get fabricated quotes, invented statistics, and made-up sources. The fix is not better prompts in general; it's a boundary condition specifically for the missing-information case.
The structure
For every required input, name it explicitly and prescribe the behavior when it's absent. The pattern looks like this:
- Enumerate the required inputs.
- For each, specify the canonical absence value (null, empty string, missing key).
- Specify the response shape when absence is detected.
- Forbid generation that would substitute for the missing input.
Why it works
The model is no longer guessing what "missing" means or what to do about it. It has a structured response for the absence case, the same way good code has a structured response for null inputs.