Extraction
The same fields from every invoice or enquiry, with nulls instead of guesses.
Read more about Extraction
Getting the same fields from every invoice or enquiry, with nulls instead of guesses.
Treating a model's instructions like code: written deliberately, tested on real inputs, changed only on evidence.
A business prompt is a template of instructions, examples, retrieved data and user input. It is usually the cheapest lever, so push it before fine-tuning.
Prompt engineering is designing the input to a large language model so the output is correct, in the right format and consistent across thousands of calls. In a business system the prompt is rarely one sentence typed by a person. It is a template that combines fixed instructions, a few examples, retrieved data and the user's input.
It is usually the cheapest lever you have. Before considering fine-tuning, most tasks should be pushed as far as a well-built prompt will take them.
Who the model acts as and what a good result looks like.
Who the model is acting as and what a good result looks like, in plain terms.
What to do when data is missing, what never to say, which language.
What to do when information is missing, what never to say, which language to reply in.
Two to five real input and output pairs show the format best.
Two to five real input and output pairs (few-shot prompting) show the format better than a description.
Retrieved documents and record data, then the message, clearly labelled and separated.
Retrieved documents, record data, then the actual message, clearly separated with labels or tags.
A JSON schema or exact template so downstream code can parse the answer.
A JSON schema or exact template, so code downstream can parse the answer.
The same fields from every invoice or enquiry, with nulls instead of guesses.
Getting the same fields from every invoice or enquiry, with nulls instead of guesses.
Tone, length and escalation rules for WhatsApp or email assistants.
Tone, length and escalation rules for WhatsApp or email assistants.
An agent depends on clear tool descriptions and stopping rules in its prompt.
An AI agent depends on clear tool descriptions and stopping rules written into its prompt.
A vague invoice prompt gave inconsistent results. The improved one names fields, sets formats, allows nulls and shows examples, then both run on 50 invoices.
A first prompt says: "Extract the details from this invoice." Results vary: dates in three formats, GSTIN sometimes missing, amounts with and without commas. The improved prompt names each field, gives the date format (YYYY-MM-DD), says "if a field is not printed on the document, return null", shows two worked examples and asks for JSON that matches a schema. The team then runs both versions over 50 sample invoices and keeps the one with fewer errors.
A fix for one case often breaks another. Compare on a fixed input set.
A change that fixes one case often breaks another. Keep a fixed set of inputs and compare. See model evaluation.
Prompts grow by patching. Reread the whole thing and remove conflicting rules.
Prompts grow by patching. Reread the whole thing and remove rules that fight each other.
"Never reveal X" is not access control. Enforce limits in code and guardrails.
"Never reveal X" is not access control. Users can talk models round. Enforce limits in code and with guardrails.
Not reliably. Models differ in how they follow instructions and formats. When you switch model, rerun your test set and expect to adjust the prompt.
Less trickery is needed, but clear instructions, examples and output formats still make a measurable difference, especially for structured business tasks.
Last updated