Question 1 · choose 1
Your extraction pipeline validates every result with Pydantic. About 4 percent fail, mostly dates written like "3rd of March" where the model must output YYYY-MM-DD, and amounts with currency symbols attached. How should the pipeline retry these documents?
- ARoute the failures straight to manual data entry, since automated retries rarely fix extraction errors
- BSend the identical request again, since a second sample will often produce a valid result
- CSend only the validation error message back to Claude and ask for a corrected result
- DSend a follow-up with the original document, the failed extraction and the specific validation errors
Show the answer and why
ARoute the failures straight to manual data entry, since automated retries rarely fix extraction errors
Incorrect
Format mismatches like these are the kind of error a guided retry usually fixes, so sending them all to people wastes reviewer time.
BSend the identical request again, since a second sample will often produce a valid result
Incorrect
Without feedback, the same prompt tends to repeat the same formatting mistake.
CSend only the validation error message back to Claude and ask for a corrected result
Incorrect
Without the document and the failed extraction, Claude cannot see which values to fix or where they came from.
DSend a follow-up with the original document, the failed extraction and the specific validation errors
Correct
Specific errors next to the source and the failed output give Claude what it needs to correct exactly the fields that failed.
Retry with error feedback: include the original document, the failed output and the specific validation errors so the model can correct format and structural mistakes.
Anthropic documentation