Extract Data From Text with AI
Free text in, named fields out. The extraction prompt pattern that turns any unstructured text into consistent, parseable records.
Sender, company, request, deadline — out of emails with quoted replies and signature blocks, using guidance that knows how email is actually read.
Email is hostile to extraction: the signal sits on top of quoted history, signatures repeat in every reply, and the actual request hides in politeness. This setup extracts sender_name, sender_email, company, subject, request, and deadline with email-specific reading guidance — prefer the newest message over quoted history, mine the signature for sender details — and a faithfulness rule on the request field: the sender's ask in at most two sentences, no interpretation added. Null discipline keeps the record machine-friendly for triage flows.
Paste the whole thread
The reading guidance handles quoted history — you don't need to trim the email first.
Watch the request field
Faithful to the sender's wording, two sentences max, no interpretation — the field your routing logic can trust.
Let null mark silence
No deadline stated means deadline: null — never "probably end of week".
The SOURCE reading guidance tells the model to prefer values from the newest message over quoted history and to mine the signature for sender details, so sender_name and sender_email come from the live message, not the buried thread. Extraction Prompt Generator outputs this prompt; you run it in your own assistant and validate the JSON it returns.
It stays faithful. The EXTRACTION RULES require the request field to keep the source wording with no added interpretation, in at most two sentences, so downstream routing acts on the sender's actual ask rather than a paraphrase. The AMBIGUITY POLICY also limits any inference to one short step from the text, never a chain of assumptions.
It is set to null, not guessed. MISSING DATA requires an unfound field to be null while keeping the key present, and forbids inventing a value, so a silent email yields a null deadline rather than "probably end of week." When a date is present, the rule formats it as ISO YYYY-MM-DD where it can be determined, keeping the record machine-friendly.
Free text in, named fields out. The extraction prompt pattern that turns any unstructured text into consistent, parseable records.
Invoice number, vendor, dates, total, currency — extracted into clean fields with strict no-inference rules, ready for accounts payable.
The most consequential setting in any extraction prompt: what the model does when the field isn't in the text. Four behaviors, and when each is right.
Stop getting 'Sure, here is the JSON…' — the output-contract pattern that forces models to return only parseable JSON: schema, example, and a strict rule block.
Billing, Technical, Account, How-To, Feature Request — ticket triage with definitions that decide the borderline cases for the model.
The JSON won't parse and you can't see why. Deterministic cause-sniffing — trailing commas, single quotes, unclosed brackets — and the repair prompt that fixes it.
Build prompts that extract defined fields from unstructured text — emails, invoices, tickets, résumés.