Question 21
Scenario: Structured Data Extraction
A system extracts structured fields from messy documents, validates every output against JSON schemas, handles edge cases gracefully, and stays accurate enough to feed downstream systems.
Read the full scenario lessonYour document extraction tool uses ML models to extract invoice fields (vendor, amount, date). The models return confidence scores (0.0-1.0) for each extracted field. In production, you observe: (1) the agent proceeds with low-confidence extractions that are incorrect 23% of the time, and (2) the agent requests unnecessary human review for 31% of extractions that were actually correct. How should you restructure the tool’s output?