← Back to the A-Z glossary
AI glossary · P1

Context engineering

Context engineering is about giving the model the right documents, rules, examples, and tools at the right time.

Control 4 min read Updated 2026-05-22
— Definition

Context engineering, in plain words

Context engineering is about giving the model the right documents, rules, examples, and tools at the right time.

Shift the topic from the magic sentence to the whole information system you hand the AI.

A concrete example

Before answering, the agent pulls the project rules, the useful files, and examples of the output you expect.

Why it matters

Good context cuts down errors, boosts consistency, and makes agents more predictable.

You'll see it in agents, RAG, instruction files, and workflows that pick the context before answering.

Don't mix it up with

System prompt: The system prompt is the top-level instruction that frames how the model behaves during the conversation.

RAG: RAG lets an AI answer using documents pulled up at the moment you ask the question.

Common mistakes

  • Cramming everything into the prompt instead of being selective.
  • Giving contradictory rules.
  • Forgetting to remove information that's no longer true.

Quick checklist

  • First I check whether the word names a concept, a tool, a risk, or a metric.
  • I tie it to a concrete case: Before answering, the agent pulls the project rules, the useful files, and examples of the output you expect.
  • I keep the main trap in mind: Cramming everything into the prompt instead of being selective.

Quick questions

What is Context engineering in AI?

Context engineering is about giving the model the right documents, rules, examples, and tools at the right time.

Where will I run into Context engineering?

You'll see it in agents, RAG, instruction files, and workflows that pick the context before answering.

Which word should I read next?

Start with System prompt, RAG, AGENTS.md.

Want to keep going in order?

Head back to the full glossary, search a word, then open only the pages that deserve more than a short definition.

Open the AI glossary