Diagnose an unsatisfactory AI answer before rewriting the prompt. The cause might be an unclear task, missing evidence, a formatting failure or an unavailable tool. Match the repair to the observed defect.
Use a symptom-to-check table
| Symptom | Possible cause | Repair | Acceptance check |
|---|---|---|---|
| Answer solves the wrong task | Deliverable was ambiguous | Name one artifact and its purpose | Output serves the stated task |
| Summary invents a date | Date absent or confused with another source | Supply labelled evidence; keep missing values unknown | Each date matches a passage |
| JSON cannot be parsed | Format instruction failed | Validate with a parser; use a supported schema feature if building an integration | Parsing, fields and factual values all pass |
| Claims to have booked a meeting | No calendar action or confirmation | Use the authorized calendar workflow | Actual event confirmation exists |
| Current information is stale | No relevant retrieval | Retrieve a current primary source | Opened source supports the dated claim |
OpenAI’s structured-output guide explains schema constraints and remaining value errors. Its web-search documentation covers retrieval. These are different tools for different failure classes.
Example: a missing booking link
Source: the workshop is Saturday at 10:00 in Room 4. Bring a laptop. Booking is required, but the link is pending. Candidate: “Book at library-workshop.example to guarantee your place.”
The draft invented both a URL and a guarantee. More enthusiastic wording or a longer persona instruction would not supply the missing evidence.
Correct the invitation using only the source facts.
Remove the invented URL and guarantee.
Keep booking required and state that the link is pending.
Preserve Saturday at 10:00, Room 4 and the laptop requirement.
List the detail the organizer must confirm before publication.Example corrected artifact
Join the workshop on Saturday at 10:00 in Room 4. Bring a laptop. Booking is required; the booking link is pending.
Organizer question: Which confirmed booking link should we publish?
Keep a useful failure record
Save the source, faulty output, cause, repair and acceptance result. Try a fresh input to check whether the repair generalizes. A short prompt can be adequate when it contains the information the task needs; length alone is not a diagnosis.
For practice, classify one failure using the table, apply one repair and inspect the full result. Use a bounded follow-up for a local defect, or review gates when a bad intermediate artifact would affect later stages.