Fee extracts pass schema checks but stated totals may disagree with line items. What self-correction pattern helps?
Select an answer to reveal the explanation.
Short Explanation
Ask the model to add the lines itself and sit that sum next to the printed total—like checking a restaurant bill. calculated_total beside stated_total flags fee mismatches.
Full Explanation
Fee extracts for municipal permits can pass schema checks while still containing arithmetic disagreements between a stated total and the sum of line items. A useful self-correction pattern extracts calculated_total beside stated_total so automated comparison can flag discrepancies schemas never see. The schema guarantees both fields exist and are numeric; the dual extraction encodes an independent recomputation that catches OCR misreads, missing lines, or model copying of a wrong printed total. Trusting stated_total alone never recomputes line sums and rubber-stamps semantic errors that later break cashiering or refund logic. Dropping totals from the schema so mismatches cannot be seen hides the problem rather than solving it and removes a critical audit signal for fee ordinances. Replacing arithmetic checks with longer prose explanations only produces narratives that are hard to validate machine-side and easy to overlook under clerk load. Exam caveat: dual totals surface inconsistency; they do not decide which side is correct when the ordinance fee schedule itself is ambiguous. Operational check: on a sample of fee sheets, assert calculated_total equals the sum of extracted line amounts, compare to stated_total, and route mismatches to human review before posting to the municipal ledger.