Prompt Engineering Fundamentals: Get Better Output from Any AI (2026)
How to write prompts that get usable output from ChatGPT, Claude, Gemini or Copilot: be specific, give context and examples, set the format, split large tasks and test what you write, from the vendors' own prompting guides.
Prompt engineering is writing instructions that get an AI model to produce what you need, consistently. The vendors' own guides agree on the basics: say exactly what you want, give context and the reason behind it, show a few examples, set the format, split large tasks into steps, and test prompts against real cases.
Prompt engineering is the practice of writing instructions that get an AI model to produce what you need. OpenAI's guide defines it as "the process of writing effective instructions for a model, such that it consistently generates content that meets your requirements." The same guide notes that model output is non-deterministic, so one prompt can return different answers on different runs. What Are Large Language Models (LLMs)? explains why.
Anthropic's prompting best practices offer a useful picture: write for "a brilliant but new employee who lacks context on your norms and workflows." Its test for a prompt is to show it to a colleague who knows little about the task. If the colleague would be confused, the model will be too.
The habits below come from the published guides of Anthropic, OpenAI, Google and Microsoft, and they apply in ChatGPT, Claude, Gemini and Copilot alike. For the same ideas inside one tool, see How to Use ChatGPT Effectively.
Say exactly what you want
OpenAI's Help Center advises being "specific, descriptive and as detailed as possible about the desired context, outcome, length, format, style." It also suggests swapping vague wording for exact terms, so "fairly short, a few sentences" becomes "a 3 to 5 sentence paragraph." Anthropic adds that when the order of steps matters, you should write them as a numbered list.
Compare two requests:
Weak: Write something about our new scheduling feature.
Stronger: Write three subject lines for an email to current clients of
a dental billing service, announcing that patients can now book
appointments online. Keep each under 60 characters. Friendly, plain
tone, no exclamation marks.The second names the audience, the purpose, the number of options, the length and the tone.
Microsoft's guide to Copilot prompts splits a prompt into four parts: the goal, the context, the source Copilot should use, and your expectations for the response. Only the goal is required, and Microsoft notes that you will often need more than a goal to get the result you want.
Give context and the reason behind it
A model knows nothing about your situation until you describe it. Google's prompt design guide recommends including the information the model needs instead of assuming it already has it. Anthropic goes a step further and suggests explaining why an instruction matters. Its example replaces "NEVER use ellipses" with the reason: the response will be read aloud by a text-to-speech engine that cannot pronounce them. According to Anthropic, the model can generalize from the explanation.
For a business request, useful context is who the reader is, what they already know, what you have tried, and any limits on length, budget, dates or tools.
Show examples
Examples show the format and tone you want more directly than a description can. Anthropic calls them "one of the most reliable ways to steer Claude's output format, tone, and structure" and suggests three to five that mirror the real task, vary enough to cover edge cases, and are clearly separated from the instructions. Google recommends always including a few examples and keeping their structure consistent. A prompt with examples is called a few-shot prompt, and one without them is zero-shot.
OpenAI's Help Center suggests an order to work in: try zero-shot first, then few-shot, and consider fine-tuning only if neither works.
Set the format, and say what to do
Tell the model the shape of the answer, such as a table with named columns, a numbered list, three short paragraphs or an email with a subject line. OpenAI and Anthropic both advise saying what to do instead of listing only what to avoid. Anthropic's example swaps "Do not use markdown in your response" for "Your response should be composed of smoothly flowing prose paragraphs."
For output that feeds another system, OpenAI's API can return structured data in JSON format, a feature it calls Structured Outputs.
Keep instructions apart from the material
When a prompt mixes instructions with a pasted document, mark where each part begins and ends. OpenAI's Help Center suggests putting the instructions first and setting off the text with ### or triple quotes. Anthropic recommends XML tags such as <instructions>, <context> and <input>. Google accepts XML-style tags or Markdown headings, as long as you pick one format and use it consistently.
For long documents, Anthropic and Google both recommend putting the documents first and the question at the end. Anthropic reports that placing the query at the end improved response quality by up to 30 percent in its tests, especially with several documents. It also suggests asking the model to quote the relevant passages before it answers.
Give it a role
A role sets the perspective and tone of the answer. Anthropic recommends setting one in the system prompt and notes that "even a single sentence makes a difference." OpenAI's guide suggests opening developer instructions with an identity section that describes the assistant's purpose, communication style and goals. In a chat app, a first line such as "You are reviewing this lease on behalf of the tenant" does the same job.
Break large tasks into steps
Google's guide suggests chaining prompts for tasks with several steps, so the output of one prompt becomes the input of the next. Anthropic notes that current models handle most multi-step reasoning internally, and that chaining still helps when you want to inspect the intermediate results. Its most common pattern is a draft, a review of the draft against your criteria, and a revision based on that review.
Let reasoning models reason
Older advice was to add "think step by step" to every prompt. Current models from OpenAI and Anthropic do much of that reasoning before they answer. OpenAI's guide says reasoning models generally do better with high-level guidance, while its GPT models benefit from more precise instructions. Anthropic writes that a prompt such as "think thoroughly" often produces better reasoning than a hand-written step-by-step plan, and keeps manual step-by-step prompting as a fallback for when the model's thinking is turned off.
Temperature and other settings
If you use a model through an API, temperature controls how random the output is. Anthropic's glossary explains that lower values give more conservative, predictable wording and higher values give more varied output, and that even at 0 the results are not fully deterministic. OpenAI's Help Center recommends a temperature of 0 for most factual tasks, such as data extraction and question answering.
Test your prompts
Anthropic's prompt engineering overview says to start with a clear definition of success for your use case and a way to test against it. OpenAI recommends pinning production applications to a specific model snapshot and building tests that measure prompt behavior, so you can see what changes when you edit a prompt or move to a new model. For everyday work, keep five or ten real examples with answers you know are right, and rerun them when you change a prompt. Microsoft reminds Copilot users that the same prompt can return different responses, and asks them to review responses and check them against trusted sources when needed.
Prompts written for Microsoft 365 work are collected in the Copilot prompt library.
Sources
- Prompt engineering (OpenAI API documentation) (checked 2026-12-02)
- Best practices for prompt engineering with the OpenAI API (OpenAI Help Center) (checked 2026-12-02)
- Prompting best practices (Anthropic documentation) (checked 2026-12-02)
- Prompt engineering overview (Anthropic documentation) (checked 2026-12-02)
- Glossary: temperature (Anthropic documentation) (checked 2026-12-02)
- Prompt design strategies (Gemini API documentation, Google AI Studio) (checked 2026-12-02)
- Get started writing prompts in Microsoft Copilot (Microsoft Support) (checked 2026-12-02)
Get the next one.
Field notes from real deployments, written the way this one was. No schedule promised and nothing sold to you. Unsubscribe whenever.
Frequently asked questions
What is prompt engineering?
OpenAI defines prompt engineering as the process of writing effective instructions for a model so that it consistently produces content that meets your requirements. In practice that means stating the task, the audience, the context, the format and any limits, and adding a few examples of the output you want.
Is prompt engineering still needed with newer models?
Yes, though the emphasis has shifted. OpenAI says reasoning models do better with high-level guidance, and Anthropic says a general instruction often beats a hand-written step-by-step plan. Context, examples, a clear format and testing still matter, because the model only knows what you tell it about your situation.
What's the most important prompt engineering technique?
Being specific. OpenAI's Help Center advises being specific and detailed about context, outcome, length, format and style, and Anthropic suggests the colleague test: if someone with little context on the task would be confused by your prompt, the model will be too.
Do I need to learn prompt engineering for each AI tool?
The core habits are the same in the guides from Anthropic, OpenAI, Google and Microsoft. Details differ, such as Anthropic's use of XML tags or Microsoft's goal, context, source and expectations. OpenAI notes that different model types, and even different snapshots of one model, can respond differently, so test prompts on the model you use.
Need help implementing this?
Prometheus does AI consulting and implementation, remote, with onsite days available in Milwaukee. We set it up, train your team, and make sure it works.
let's talk
