Prompt Engineering
Last Updated: September 10, 2026 | By Mihail Sebastian | AI Dictionary
The practice of designing model inputs, from role and format instructions to few-shot examples, so a large language model produces reliable output.
What is Prompt Engineering?
Prompt engineering is the practice of designing the input to a large language model so it produces reliable, useful output. The prompt is the interface: the same model gives sharply different results depending on how the task is framed.
Unlike fine-tuning, prompt engineering changes nothing inside the model. It changes only what the model is shown, which makes it the cheapest and fastest lever for improving behavior.
How Prompt Engineering Works
The core techniques are few and concrete. State the task explicitly rather than implying it. Assign a role (“you are a contract reviewer”) to anchor tone and expertise. Specify the output format, down to “respond with valid JSON matching this schema” when a program will consume the result.
Examples are the strongest tool. A prompt with no examples relies on zero-shot learning, the model’s ability to handle an unseen task from instructions alone. Adding a handful of worked input-output pairs, called few-shot learning, shows the model the pattern instead of describing it, and usually improves consistency more than any rewording.
Asking the model to reason step by step before answering helps on multi-stage problems. Well-run teams treat prompts as software: versioned, tested against a fixed set of cases, and rolled back when a change makes outputs worse.
Example of Prompt Engineering
A team wants a model to pull the vendor name, amount, and due date out of invoices. Their first prompt, “extract the key details from this invoice,” returns a chatty paragraph in a different shape every time, useless to the code that must parse it.
They rewrite it in three moves. The instruction becomes precise: return only vendor, amount, and due date. A format rule fixes the shape: valid JSON with those three keys, and null for anything missing. Two example invoices with their correct JSON outputs show the pattern.
The model’s weights never changed, but the output is now consistent enough to feed a payment pipeline. The remaining failures are logged and become test cases for the next prompt revision.
FAQ
Is prompt engineering still a job?
Mostly not as a standalone title. The skills matter more than ever, but they have folded into product, engineering, and data roles: prompts live in version control and get tested like code, as one part of building an AI feature.
How is prompt engineering different from prompt injection?
Prompt engineering is the developer shaping the model’s input on purpose. Prompt injection is an attacker doing the same thing against the developer’s intent.
Related AI terms: Few-Shot Learning · Zero-Shot Learning · Large Language Model · Prompt Injection · Fine-Tuning
Did you like the Prompt Engineering gist?
Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.
