AI GLOSSARY · PROMPTS AND INSTRUCTIONS

Prompt engineering

Markdown version · Wikidata Q108941486

Definition

Prompt engineering is the practice of writing and refining the instructions given to a language model so that it reliably produces output that meets stated requirements, tested against clear success criteria.

Also called: AI prompt engineering, prompt design.

In plain language

A prompt is the text you give an AI model. Prompt engineering is the habit of writing that text carefully, trying it, seeing where it fails and improving it. It is closer to writing a clear brief for a new colleague than to learning a trick. Good prompts say what you want, give context and show an example. The most important step comes first: decide what a good answer looks like, so you can tell whether a change helped.

Technical definition

Prompt engineering adjusts the model's input, which covers instructions, role and message structure, examples, retrieved context and output format, without changing its weights. Techniques include clear and direct instructions, few-shot examples, XML or Markdown structure, role prompting, prompt chaining and extended thinking. Changes are judged by running the prompt against a test set with defined success criteria, and prompts are tied to a model version because behaviour shifts between versions.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    prompt-writing 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A prompt written and checked with a fixed structure, injection rules and a numeric test plan.
    Why it exercises the concept
    It treats a prompt as something with structure and tests, which is the core of the practice.
  2. Skill by Anthropic · Illustrative, not executed

    skill-creator 28/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A skill that creates new skills, improves existing ones and measures how well they perform.
    Why it exercises the concept
    A SKILL.md is a prompt that a coding agent loads on demand. This skill shows prompt writing with measurement attached.
  3. Guide · Illustrative, not executed

    What are Claude skills? Definition, SKILL.md format and where they work

    What you see
    An explanation of a Claude skill as a folder with a SKILL.md file that Claude loads when a task matches, and how the format, loading levels and open standard work.
    Why it exercises the concept
    Skills move prompt engineering from a one-off message into a reusable, versioned file that Claude Code can load when a task matches.
  4. Coding tool · Illustrative, not executed

    Claude Code

    What to try
    /context
    What you see
    Claude Code shows what is currently occupying the context window for the session.
    Why it exercises the concept
    The display helps inspect context usage and capacity warnings. It does not by itself establish why a model failed to follow an instruction.

How it shows up when you use agents

In a coding agent, your prompt is only one input. Claude Code and Codex also send instruction files, skill descriptions, file contents and tool results to the model. Prompt engineering for agents therefore means writing the pieces you control: the task message, the project instruction file and any skills.

Anthropic's overview says to start from a clear definition of success criteria, some way to test against them, and a first draft prompt. OpenAI's guide makes the same point: build tests that measure prompt behaviour, and pin production apps to specific model snapshots so behaviour stays stable. A prompt without a test is a guess.

Both vendors describe similar techniques: structure the prompt with Markdown or XML sections, give examples, and supply relevant context. OpenAI adds that different model types need different styles, with GPT models wanting explicit instructions and reasoning models often doing well with high-level goals. See Context window and Large language model.

Anthropic also notes that prompt engineering is not always the right fix: sometimes a different model improves latency and cost more easily. When behaviour must be repeatable across sessions, move the prompt into a skill. See Agent skill. When the missing piece is facts, add retrieval instead of rewording. See Retrieval-augmented generation.

Common confusions

  • Prompt engineering versus fine-tuning. Prompting changes the input. Fine-tuning changes the model's weights through more training. Prompting is usually tried first because it needs no training run. See Fine-tuning.
  • Prompt engineering versus magic phrases. The documented techniques are clarity, examples, structure and testing. A phrase that helped one model on one task may do nothing on the next version.
  • Myth. A better prompt removes hallucination. It can reduce it, for example by supplying source text, but the model can still state false things. See Hallucination.
  • Prompt versus system or developer message. OpenAI's guide puts lasting rules in a developer message, which takes priority over user input. The roles are part of the design.
Show all 38 related terms

Terms that mention Prompt engineering

19 terms mention this one

Guides that mention Prompt engineering

More in Prompts and instructions

Next steps

  1. What are Claude skills? Definition, SKILL.md format and where they work The long-form guide.
  2. prompt-writing A skill that exercises it.
  3. Fine-tuning Related term.
  4. Agent skill Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft) and Codex (automated revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-24. Last verified .

Change log (4)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Targeted correction from source-supported early audit; complete exact-version review remains pending.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.