You write a clean, clear, nicely worded prompt, and the answer comes back completely off target. Nine times out of ten, the problem isn't your sentence: it's everything the model had (or didn't have) in front of it at the moment it answered. Context engineering is the discipline of choosing that information, ordering it, and shaping it so the model works with the right raw material.
Here you'll see what a language model's context really contains, how to structure it into five reusable layers, which mistakes pollute it without you noticing, and where to practice for real. No technical prerequisites: if you can hold a conversation with ChatGPT, Claude, or Gemini, you're ready. By the end, you'll have a context template to copy for your own tasks, and you'll finally understand why an overly long conversation almost always ends up going off the rails.
So what exactly is context engineering?
Context engineering means deciding which information enters a model's context window, in what order, and in what form, before it even begins to answer.
A language model remembers nothing between two requests. With every send, it rereads the entirety of what it's given: the starting instructions, the conversation history, attached files, tool results. That whole bundle is called the context window. It's measured in tokens, word fragments of roughly three to four characters (the word „context" weighs one or two tokens, a full page of text about 400).
This window is large, but it's finite. Recent Claude models accept 200,000 tokens, or several hundred pages, according to the official documentation on context windows. Large doesn't mean unlimited, and above all: the more you fill the window with useless material, the more the decisive information gets diluted.
| Prompt engineering | Context engineering | |
|---|---|---|
| Focus | how you word your request | everything the model reads |
| Scope | one message | a session, a project, an agent |
| Typical question | „how do I phrase this?" | „what does the model actually need?" |
| Example | adding „answer in 5 bullet points" | providing the style guide and 3 already-published articles |
The two complement each other. Prompt engineering optimizes the request, context engineering prepares the material. If you're just starting out, the complete method for writing a good prompt is still the foundation everything else rests on.
What an LLM's context really contains
Context isn't just your question: it stacks up at least six blocks of information, and your question is often the smallest of them.
- System instructions. The invisible frame set by the tool or by you: role, tone, things to avoid, response language. In ChatGPT those are the custom instructions, in Claude the project instructions.
- Conversation history. Every previous message, yours and the model's, is sent back on every turn. A 40-message exchange gets paid for with each new question.
- Documents and data you provide. PDFs, spreadsheets, a pasted web page, a database extract. This is where the volume explodes fastest.
- Examples. Two or three samples of what you're expecting beat ten lines of adjectives. That's the whole principle behind few-shot prompting.
- Tools and their results. Web search, code execution, API calls: every result comes back into the window, sometimes thousands of tokens' worth.
- Your actual request. Often a single sentence, buried at the end of everything else.
Out of 20,000 tokens of context, your final question might weigh 40. That's exactly why a model that „isn't listening" is usually a badly fed model, not a broken one. The Anthropic team even describes context as a finite resource to budget, just like time or money.
Structuring your context: the five-layer method
Always arrange your context in the same order: role and goal, constraints, reference data, examples, then task and output format.
This order isn't decorative. It puts the frame before the material, and the action instruction right before generation, at the spot where the model reads it last.
Layer 1: role and goal. Who's speaking, to whom, and why. Two sentences are enough. „You're the content lead at an accounting firm that serves tradespeople. Goal: make tax topics understandable without oversimplifying them."
Layer 2: constraints. Length, tone, forbidden vocabulary, legal obligations, target audience. Write them as a list, not as a paragraph: one constraint per line gets respected far more often than a constraint buried inside a sentence.
Layer 3: reference data. The facts the model can't guess: your prices, your numbers, your client list, the source text to rework. Fence them off clearly, for example between <data> and </data> tags, and tell the model explicitly that it must not invent anything outside them.
Layer 4: examples. One or two representative samples of what you consider „good." If you have a bad one, show it too and explain what's wrong with it.
Layer 5: task and output format. The exact action, then the expected shape: word count, structure, table, JSON, headings. Always end here.
Here's what the result looks like, in short form:
You write a newsletter for independent florists.
Constraints: 250 words max, friendly informal tone, no marketing jargon, one idea per paragraph.
Data: our January offer (bouquet subscription at €24 per month, delivery included in Lyon, cancel anytime).
Example of the tone expected: „This month we brought in ranunculus. They'll last eight days if you change the water every two days."
Task: write the February edition. Format: one headline, three paragraphs, a closing sentence with a call to action.
That block becomes a template. From then on you only rewrite layers 3 and 5, which cuts the time spent preparing each request by two-thirds.
The five mistakes that pollute a context
Most bad answers come from a context that's overloaded, contradictory, or badly ordered, not from a model that isn't smart enough.
- The massive copy-paste. Pasting an 80-page report to get two chapters summarized is like asking the model to find a key in an attic. Pull out the useful passages, or split it into several requests.
- Stale context. You said „formal tone" in message 3, then „loosen up" in message 25. Both instructions coexist in the window and the model arbitrates on its own. When you change your mind, rewrite the full instruction instead of patching it in small touches.
- Key information buried in the middle. What matters most goes at the beginning (the frame) or at the end (the task). The belly of the context is where attention slackens.
- No output format requested. Without a shape instruction, the model picks its own, and it changes with every attempt. It's one of the recurring mistakes covered in the prompting mistakes that ruin your results.
- The endless conversation. After 50 messages, your context is mostly back-and-forth, abandoned attempts, and apologies from the model. Open a new conversation and start over from your updated five-layer block. That's often the single move that unsticks a session going in circles.
Where to practice context engineering: three approaches
Three paths depending on your budget and your level: a guided program with the tools included, the project features in the AI you already use, or the vendors' technical consoles.
Approach 1: a guided program, tools included (Skilzy)
This is the fastest route if you're starting from zero. The Skilzy context engineering program has you build your own context blocks on real cases (product page, newsletter, customer support, automation), with feedback and reusable templates. Skilzy is a French platform with more than 15 programs, from image and video creation to automation with n8n, and its built-in AI Lab gives you access to the real tools with credits included: you practice without stacking up three subscriptions at €20 a month.
Access starts at €29.90 per month, no commitment. Two state-recognized, fundable certifications are available (RS7439 in AI content marketing, RS6792 in AI and sales). To test before paying, the discovery demo runs 7 days with 1 image, 1 video, 1 music track, and 10 messages, no credit card required.
Approach 2: the projects and custom instructions in your AI
Free, or included in your current subscription. ChatGPT and Claude Projects, like Gemini's Gems, exist for exactly this: you drop in your system instructions, reference documents, and examples once and for all, and every new conversation starts with that context already loaded. Perfect for testing the five-layer method today. The catch: you're moving forward without outside feedback, and it takes several weeks of trial and error to figure out on your own what works.
Approach 3: official documentation and vendor consoles
This is the most precise route, and the most demanding. The Anthropic, OpenAI, and Google docs cover context window management, caching long preambles, and message structuring in detail. The developer consoles let you count tokens and compare two versions of the same context. Useful as soon as you want to scale things up, indigestible if you've never touched an API.
What to take away
A good result rarely comes from a magic sentence. It comes from a clean context: a clear role, listed constraints, verified data, two examples, a task, and a format. Build that block once, reuse it, and clean it out as soon as the conversation gets heavy. You'll spend less time fixing sloppy answers than preparing what you give the model to read, and that's exactly the right balance.