A developer is building a data extraction pipeline where Claude must extract structured data from unstructured customer feedback. The extraction schema has 15 fields, some optional. Claude occasionally invents field values that were not in the source text (hallucination). Which combination of prompt techniques most effectively reduces hallucination in structured extraction?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — b is correct because requiring Claude to provide a verbatim supporting span for each extracted value grounds the extraction in the source text. If no span exists, the model must return the 'NOT_FOUND' sentinel rather than fabricating a value.
Full explanation below image
Full Explanation
B is correct because requiring Claude to provide a verbatim supporting span for each extracted value grounds the extraction in the source text. If no span exists, the model must return the 'NOT_FOUND' sentinel rather than fabricating a value. This technique, called extraction with evidence, is highly effective at reducing hallucination because it forces the model to locate the evidence before committing to a value — the supporting span serves as an internal audit trail. A is wrong because high temperature produces more varied outputs, not more grounded ones; aggregating samples across high temperatures is a majority-vote heuristic that selects the most common hallucination, not the most correct value. C is wrong because few-shot examples improve formatting and field recognition but do not address hallucination when the field value is genuinely absent from the source text. D is wrong because at temperature 0 the model is deterministic; running it twice produces identical outputs and cannot detect hallucinations through disagreement.