11.1.11 · Skill in AI engineering

Prompt and context engineering

Giving a model the instructions and information it needs for a bounded task.

Define the outcome, constraints, examples and output format, then supply relevant context within a finite budget. Keep instructions separate from untrusted documents and tool results. Version the configuration and compare changes on representative cases instead of judging a single convincing response.

Your status · Prompt and context engineering

Saved in this browser. Sign in to keep it on every device.It colours this skill's tile on your map.

Why it matters for a product engineer

A model can only use what is in its context: the instructions, the examples and the documents you give it. The context is limited, and models get worse when it fills with things that do not matter. Prompt and context engineering is the work of choosing what goes in. Product engineers do it every time they build an AI feature, and it decides quality and cost more than the choice of model.

How to do it

  1. Write the outcome, the constraints and the output format before anything else.
  2. Add a few examples of good results, including a difficult one.
  3. Give the smallest set of information that answers the task. Load the rest only when needed.
  4. Keep instructions apart from untrusted text such as documents, emails and tool results.
  5. Version prompts with the code.
  6. Compare changes on a fixed set of real cases, not on one convincing answer.

Common mistakes

  • Putting everything into the context “in case”.
  • Instructions mixed with user content, so a document can give orders.
  • Judging a prompt change by one example.
  • Prompts edited in production with no record of what changed.

Example

Mamitsu is built for agents with limited context. Through its MCP server, an agent gets back only the fields it asked for, “so a ten-minute video costs a few lines of context instead of a full transcript”. The agent decides what it needs; the tool sends nothing else. (Mamitsu in In practice)

Side by side

What reaches an agent's context from one video

A full transcriptMamitsu, through MCP
What the agent getsEverything said in the videoOnly the fields it asked for
Who choosesThe toolThe agent, with its question or schema
Context used, ten-minute videoA full transcriptA few lines

Less context, chosen for the task, leaves room for the work and costs less.

Reportedusemamitsu.com and the call with its maker, Nov 2026

Sources: Effective context engineering for AI agents (Anthropic) ↗ · Prompt engineering overview (Claude docs) ↗

Technical leverage

Version prompts with code, assemble context from authorized sources and run comparisons automatically when instructions or models change.

Evidence of mastery

Put it into practice
Practice
Compare two context strategies on a fixed set of representative tasks, including irrelevant and adversarial documents.
Artifact
Versioned prompts, recorded inputs and an evaluation of quality, context size and failure modes.

What good looks like

  • Examples used for development are separated from final evaluation cases.
  • Untrusted source text cannot grant tools new permissions.

Use this evidence to assess your work. Your map status is a self-assessment, not a certification.

In practice

Real products

Resources

2

Tools

2
Tools for AI engineering