Question 293
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 lessonA downstream service consumes Claude's output as JSON. Occasionally Claude wraps the JSON in a short preamble such as "Here is the result:" and the parser fails. The prompt currently just says "Return JSON." Which combination of techniques most reliably produces machine-parseable output?