Step-by-step answer
Core 90 min7 stepsExtract lease terms with page-verified evidence
Lease terms extracted with claude -p and a JSON Schema from Pydantic, with the page-tagged lease on stdin and no tools. Code then verifies every quote on the page it cites, normalises money and dates, and compares each lease with its register. On three synthetic leases it catches a right quote on the wrong page, a quote the model "tidied" away from the OCR text, and a register that disagrees with its lease.
Back to the exercise