New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Why does the model invent a phone number that was never in the text?
What you'll have at the end
A validated contact record built from one email signature, with any missing field left blank instead of guessed
You need
A working call to an LLM API that already returns JSON matching a schema you define, and one short document, like an email signature, where you know for certain which details are actually printed and which are not.
Not covered
Extracting from a scanned image or a multi-page PDF, and building the chunking or OCR step that turns it into text first: this starts from text you already have and only covers the field-level check that keeps it honest.
Leans on
Resubmit a rejected reply with the schema error attached
the model's reply fails schema validation outright instead of quietly returning an ungrounded value, and you want it to see the exact error and try again.
Scan free text for PII and report exactly where it is
you need to know exactly where in the text a sensitive value sits, not only whether the value is genuinely there.
Checked 15 Aug 2026
Part of the Structured Output Generation with LLMs cookbook