What Is Prompt Engineering? Techniques That Work
What prompt engineering is, the techniques every major model provider recommends, and how prompting changes for reasoning models.
BeginnerVerdeshell Team · 9 min read · Last reviewed
Prompt engineering is mostly clear writing for a reader with no context: say what you want, give the material, show an example, specify the format. The tricks matter far less than the clarity.
Key takeaways
- Prompt engineering is writing a model’s input so that it reliably produces the output you need.
- Every major model provider recommends the same core techniques: clear instructions, a role, context, examples, structure, an output format and breaking tasks down.
- Reasoning models need simpler prompts — state the goal, not the steps.
- Treat production prompts like code: versioned, tested on real inputs, changed one thing at a time.
What prompt engineering is, and is not
Prompt engineering is the practice of writing the input to a language model so that it reliably produces the output you need. For one-off use in a chat window it is just good communication. In a product, where the same prompt runs thousands of times on inputs you have not seen, it becomes engineering: versioned, tested and measured.
It is not a collection of magic phrases. Many early tricks — threatening the model, promising it a tip, insisting it is an expert — were artefacts of particular models and fade as models improve. What has held up is what would help a capable new colleague who knows nothing about your situation. If you are not sure what is happening inside the model, how large language models work explains why these techniques help.
The techniques every major provider recommends
OpenAI, Anthropic and Google each publish prompting guidance for their models. Read side by side, they agree on a short list — and each item has its own page in this topic.
Be clear and specific. State the task directly, including what you do not want. Vague instructions get average answers, because the model fills every gap with the most typical choice.
Give it a role and a purpose. A system instruction that sets who the model is acting as, and who the answer is for, shapes vocabulary, depth and tone. See role, negative and structured-output prompting.
Provide the context. Include the material the answer should be based on rather than hoping the model knows it — and when that material is large or changes often, that is what retrieval is for.
Show examples. One or two examples of the output you want communicate format and style faster than any description. This is zero-shot, one-shot and few-shot prompting.
Use structure and specify the output format. Separate instructions from data with delimiters or tags, and say exactly what shape the answer must take — length, fields, a JSON schema.
Break complex tasks down. One prompt that summarises, classifies and drafts a reply will do all three worse than focused prompts linked together — prompt chaining.
Let the model think, where it does not already. For models without built-in reasoning, asking for intermediate steps improves multi-step tasks — chain-of-thought prompting. Anthropic’s guidance adds one more that deserves wider use: explicitly allow the model to say it does not know.
Prompting reasoning models is different
Reasoning models plan and check their own work before answering, and the providers’ guidance for them runs against some of the advice above. OpenAI’s comparison is useful: a standard model is like a junior colleague who needs explicit steps; a reasoning model is like a senior one you give a goal.
In practice: keep the prompt simple and direct, describe the goal and the constraints rather than a step-by-step procedure, and do not ask it to “think step by step” — it already does. Try without examples first, and add them only if the output format needs pinning down. Clarity, context and a defined output format still matter exactly as much.
What about prompt frameworks?
Acronyms such as CO-STAR, CRISPE, RTF, RACE and RISEN circulate as ways to structure a prompt. They are checklists of the same ideas — role, context, task, format — rather than different methods, and none of them appears in the providers’ own guidance. We cover what each stands for, where it really came from, and when one is worth using in prompt frameworks explained.
Treat prompts like code
A production prompt is a piece of software. Keep it in version control, not pasted into a dashboard. Give it a small set of real test inputs with known-good outputs, and run them whenever the prompt or the model changes — a prompt tuned for one model version can quietly degrade on the next.
Change one thing at a time, and read the failures. The fastest improvements come from looking at the worst outputs on real inputs and asking what the prompt failed to say. That discipline is the difference between prompt engineering and prompt guessing.
From prompt engineering to context engineering
As systems grew from single prompts into agents that run for many steps, the wording of the instruction stopped being the main lever. What matters more is everything that ends up in the model’s context window at each step: the instructions, the retrieved documents, the tool results, the conversation history — and what is left out.
Practitioners began calling this context engineering in mid-2025. Anthropic’s engineering team describes it as the natural progression of prompt engineering: curating the smallest set of information that gives the model what it needs for the next step. The techniques in this topic are still the foundation; context engineering is what they become when the prompt is assembled by a system — such as an AI agent — rather than written by a person.
Want this built properly?
We design and build AI systems for clients. Tell us the problem and we will tell you honestly whether AI — and which kind — is the right fit for it.