Few-Shot Prompting and Checkable AI Explanations
Examples help communicate a pattern, while a short explanation can make an answer easier to review. Neither guarantees accuracy, and you do not need to request hidden internal reasoning.
Examples help communicate a pattern, while a short explanation can make an answer easier to review. Neither guarantees accuracy, and you do not need to request hidden internal reasoning.
Show the pattern with a small example
Use an input and an approved output that demonstrate the required fields and tone. Avoid examples that introduce rules you never intended. If you need factual extraction, show how a missing value should be reported rather than invented.
Cover an edge case
A normal example alone can encourage guessing when the next input is incomplete. Add a second example with missing or conflicting information. For a date extractor, “next Friday” without a reference date should stay ambiguous rather than becoming a made-up calendar date.
Ask for a concise explanation you can verify
For maths, ask for the calculation and units. For analysis, ask for the supporting source and assumptions. A plausible explanation can accompany a wrong answer, so independently check the steps that matter. Do not treat a request to “think step by step” as a factual guarantee.
Test beyond the examples
Try new inputs instead of only the demonstrations embedded in your prompt. Keep separate examples for evaluation and note which failures remain. When formatting must be strict, validate the returned fields in code rather than relying solely on the prompt.
A starting prompt to adapt
This is an illustrative template, not a recorded model result. Replace the bracketed fields with your own material, then check the answer before using it.
Extract task, owner and deadline from each note. Example input: “Maya will send the quote by 12 May.” Example output: task=send quote; owner=Maya; deadline=12 May (year unspecified). Example input: “Someone should update the website soon.” Example output: task=update website; owner=not specified; deadline=not specified. Now process: [NOTES]. Do not fill missing fields.
Check the result before using it
- Use examples that match the real task.
- Include a missing-data case.
- Check calculations and cited passages independently.
- Test on inputs not included in the demonstrations.
Common questions
How many examples do I need?
Start with one or two that show distinct cases. Add another only when it teaches a boundary the others miss.
Does an explanation prove the answer?
No. Check the calculation or source directly; a model can explain an incorrect conclusion convincingly.
Key takeaways
- Use examples that match the real task.
- Include a missing-data case.
- Check calculations and cited passages independently.
- Test on inputs not included in the demonstrations.
Paste Prompts Editorial Team
Practical guidance and illustrative templates. Model features change; check official documentation and review outputs before using them. Read our Editorial Standards & Fact-Checking Guidelines.
Put these prompt techniques to work
Browse prompts for a relevant task, fill in your own details and check the result before using it.