For a data extraction task (extracting names, dates, and amounts from invoices), what prompt approach MAXIMIZES reliability?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Extraction tasks need a tight spec — tell Claude exactly what fields to find, their expected format, and the output structure. A schema example removes all ambiguity.
Full explanation below image
Full Explanation
Reliable data extraction requires: explicitly naming all target fields, specifying data types and formats (e.g., 'date as YYYY-MM-DD', 'amount as float in USD'), defining the output structure (JSON with specific keys), providing a schema example, and handling missing values ('use null if not found'). This removes Claude's need to make any decisions about what or how to extract. Option A produces narrative description, not structured data. Option C (high temperature) introduces randomness — bad for precise extraction that needs temperature=0. Option D gives Claude too much discretion about what to extract.