Skip to content
Ask Sera Search
Ask SeraAnswers from our guides, research and news Search
Learn
Guides
Research
Sectors
Platforms
News
Tools
About

What is prompt engineering?

Prompt engineering is writing and testing prompts so that a model gives the output a task needs, with methods such as clear instructions and examples.

In short. Prompt engineering is writing and testing prompts so that a model gives the output a task needs. Common methods include clear instructions, examples, a system prompt and structure such as XML tags. OpenAI and Anthropic both tie it to tests that measure the output. The best methods change with the model, and reasoning models need less step-by-step instruction.

On this page 7 sections

The evidence

  • Confirmed:

    OpenAI defines prompt engineering as writing effective instructions so that a model consistently generates content that meets the requirements. It recommends pinning applications to model snapshots and building evaluation suites, because snapshots in the same family can give different results.1OpenAI API documentation. Checked Dec 1, 2026

  • Confirmed:

    Anthropic says prompt engineering starts after three things exist: clear success criteria, a way to test against them, and a first draft prompt. Some problems, such as latency and cost, are easier to fix by choosing a different model.2Claude API documentation. Checked Dec 1, 2026

  • Observed:

    A 540 billion parameter model prompted with eight chain-of-thought examples reached state-of-the-art accuracy on the GSM8K math benchmark, ahead of a fine-tuned GPT-3 with a verifier.4arXiv, Jan 28, 2022

  • Confirmed:

    OpenAI says reasoning models perform best with straightforward prompts, and that telling them to think step by step may not improve performance and can sometimes hinder it.5OpenAI API documentation. Checked Dec 1, 2026

Confirmed by the platformObserved in data

Prompt engineering is how developers get dependable output from a language model. In AI search, the same discipline applies to visibility tests, which need a fixed and carefully written set of prompts.

#How does prompt engineering work?

Prompt engineering changes the input until the output meets a defined need. OpenAI's prompt engineering guide calls it the process of writing effective instructions for a model, so that it consistently generates content that meets the requirements. Because model output is non-deterministic, OpenAI calls prompting a mix of art and science.1

Google's machine learning glossary says the results depend on factors outside the prompt too. These include the data used to train the model and its temperature and other decoding settings. Google treats prompt design as a synonym.3

#Why does prompt engineering need tests?

A prompt that works once may not work again, and it may not work on the next model version. OpenAI recommends pinning production applications to a specific model snapshot. It also recommends evaluation suites that measure prompt behavior when the prompt or the model changes.1

Anthropic's prompt engineering overview asks for three things first: a clear definition of success, a way to test against it, and a first draft prompt. It also says not every failing test is best solved with a better prompt. Latency and cost can be easier to improve by choosing a different model.2

#Which prompt engineering techniques work?

Anthropic lists clarity and examples, XML structure, role prompting, thinking and prompt chaining.2 Examples appear in the guidance of OpenAI, Anthropic and Google, and What is few-shot prompting? covers them.

Asking for steps of reasoning is another technique. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, a 2022 paper, gave a model worked examples with intermediate steps. A 540 billion parameter model prompted with eight such examples reached state-of-the-art accuracy on the GSM8K math benchmark.4

#How do reasoning models change prompt engineering?

Reasoning models need simpler prompts. OpenAI's reasoning best practices say these models perform best with straightforward prompts. Because they reason internally, an instruction to "think step by step" may not improve performance and can sometimes hinder it. OpenAI suggests trying prompts without examples first.5 How to test AI search visibility with prompts applies the same discipline to measuring AI answers.

Read next

Related terms

Questions

What are the main prompt engineering techniques?

Anthropic's documentation lists clarity and examples, XML structure, role prompting, thinking and prompt chaining. OpenAI's guide adds message roles and Markdown formatting. OpenAI, Anthropic and Google all recommend examples in prompts.

Does the same prompt work for every model?

Not reliably, according to OpenAI. It says reasoning models and GPT models may need different prompts, and that even snapshots of one model family can produce different results. It compares a reasoning model to a senior co-worker who needs a goal, and a GPT model to a junior co-worker who needs explicit instructions.

Is prompt engineering the same as optimizing a site for AI search?

No. Prompt engineering changes the input that a developer or user sends to a model. Optimizing for AI search changes the pages that the model can retrieve and cite, and a site owner cannot edit the prompts that AI search products use.

About this page

Researched and reviewed by Promptly Found. Reviewed Dec 1, 2026. Next review due Mar 2027.

Notes

  1. 1
    Prompt engineeringOpenAI API documentation · Checked Dec 1, 2026 · Primary source
  2. 2
    Prompt engineering overviewClaude API documentation · Checked Dec 1, 2026 · Primary source
  3. 3
    Machine Learning GlossaryGoogle for Developers · Checked Dec 1, 2026 · Primary source
  4. 4
    Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsarXiv · Jan 28, 2022 · Checked Dec 1, 2026 · Paper
  5. 5
    Reasoning best practicesOpenAI API documentation · Checked Dec 1, 2026 · Primary source
Cite this page
Citation style

Promptly Found. (2026, December 1). What is prompt engineering? https://promptlyfound.com/glossary/prompt-engineering

Revisions 1
First published.