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.
Product, issue summary, stated severity, steps already tried — ticket fields extracted from free-text customer messages, without the model's own judgment leaking in.
Customer messages arrive as stories; support queues need fields. This setup extracts customer_name, product, issue_summary, severity, steps_taken, and reply_needed — with the extraction-not-judgment line drawn explicitly: severity copies the urgency the customer stated ("blocked", "urgent"), it is never the model's own assessment. The issue summary stays faithful to the customer's wording in at most two sentences, steps_taken becomes a deduplicated list, and reply_needed answers true or false from the text alone. Strict policy plus null discipline keeps the queue honest.
Generate and pipe messages through
Each customer message becomes one record with the same six fields — the queue stays uniform.
Respect the severity boundary
The rule says "use the level stated in the text — do not substitute your own judgment." Re-grading happens later, by your rules.
Use steps_taken in the first reply
A deduplicated list of what they tried means the first response never opens with advice they've already followed.
It cannot — the severity rule says 'Use the level stated in the text — do not substitute your own judgment,' so severity copies the urgency the customer literally wrote (like 'blocked' or 'urgent') and never the model's own grade. If the customer states no urgency, MISSING DATA sets severity to null. Re-grading against your own priority scale is a separate later step.
Any field not found in the source is set to null and its key is still returned — 'do not omit the key' — so every extracted ticket carries the same six keys and your queue rows stay uniform. Values that are only implied but not stated are also treated as missing under the AMBIGUITY POLICY, never guessed or invented.
Edit the FIELDS TO EXTRACT and EXTRACTION RULES sections through the extraction-prompt-generator, which outputs a revised prompt you run in your own assistant. You can drop steps_taken or add a field, but keep the reply_needed rule ('answer true or false based only on what the text states') text-grounded if auto-acknowledgment flows depend on it. NewPrompt generates the prompt, not the extraction itself.
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.
Run inbound support the same way every time — triage and route the ticket, pull the details that matter, draft a reply in a consistent voice, and log the resolution for the record.