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.
Build prompts that extract defined fields from unstructured text — emails, invoices, tickets, résumés.
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.
Parties, effective date, term, payment, termination notice, governing law — key terms into a contract register, with "unknown" marking every gap loudly.
Sender, company, request, deadline — out of emails with quoted replies and signature blocks, using guidance that knows how email is actually read.
Decisions actually made, commitments actually given — extracted from fragmentary meeting notes that never label their action items.
Pros, cons, feature requests, rating — review text into feedback-board fields, with experienced-vs-wished kept strictly apart.
Candidate name, current role, years, skills, education — résumés into consistent screening records, with inference kept on a short leash.
Product, issue summary, stated severity, steps already tried — ticket fields extracted from free-text customer messages, without the model's own judgment leaking in.
The six sections a reliable extraction prompt needs: source guidance, field definitions, extraction rules, missing-data behavior, ambiguity policy, example.