The field guide

Context engineering

A practical guide to the discipline that decides what a model sees. Retrieval, agent patterns, reliability, evaluation, and the failure modes that break long-context systems, each with a runnable example.

The models got good at following instructions. That quietly moved the bottleneck. The hard part of building with an LLM is no longer wording a clever prompt, it is deciding what information the model gets to see at all. That job is context engineering, and it is most of the work in any serious system.

A model has no memory of you and no window onto your world beyond the text in front of it. So every answer is capped by the context you assemble: the files, the examples, the history, the tool results, in a finite window where everything you add crowds out something else. Get the right things in, keep the wrong things out, and shape what remains. That is the whole game, and this guide is a map of the moves.

Each section below links to a plain-English definition with a tested code example you can run. Start anywhere, or read it top to bottom as a path from the raw material through to the ways things break.

Foundations

Foundations

What context engineering is, and the raw material it works with: the window, the tokens, the prompt.

Retrieval & RAG

Retrieval & RAG

Pulling the right information into the window at the right time, instead of hoping the model already knows it.

Agent patterns

Agent patterns

The shapes an LLM system can take, from fixed workflows to autonomous agents that choose their own path.

Reliability techniques

Reliability techniques

Getting consistent, trustworthy output from a stochastic model that will not give the same answer twice.

Evaluation

Evaluation

Measuring whether your system is actually any good, so you can improve it on purpose rather than by vibes.

Failure modes

Failure modes

The predictable ways long-context systems break, so you can see them coming.

Memory

Memory

Carrying the right state across turns and sessions without drowning the window in history.

Keep reading

AI Native Software Engineering

The other half of the picture: the vocabulary and workflow of building software with AI agents, from tokens and context windows to tools, subagents, and review discipline.

Go to the guide →

Want this applied to your product?

The dictionary is how I think out loud. If you want that thinking turned into a working system for your team, that is what I do.

See how I can help