We've reached the final piece of the series, and it's the one that quietly underpins everything else: context. Every answer an AI gives is shaped not just by your latest question, but by everything it can "see" at that moment — earlier messages, attached files, and instructions you never typed. Understand how context works and you'll write better prompts, know why an assistant sometimes "forgets," and get more from every tool you touch.

What "context" means here

Context is simply all the information the model is considering when it generates a reply. That includes your current question, but also the conversation so far, any documents you've shared, and behind-the-scenes instructions the product adds. The model doesn't truly remember you between sessions — instead, on every single turn, it reads through whatever context it's given and predicts a response based on the whole picture.

The context window: the model's short-term memory

There's a limit to how much the model can hold in mind at once. That limit is called the context window, usually measured in "tokens" (a token is roughly a few characters — a short word is about one token). Everything has to fit inside it: your instructions, the conversation history, any pasted documents, and the answer being written. When a conversation grows past the window, the oldest parts fall out of view — which is exactly why a long chat can seem to "forget" something you said near the start.

Context windows have grown dramatically as models have improved — from a couple of pages of text to entire books:

How much can a model hold at once?
Early models~a few pages
small
Mid-generation~a short chapter
larger
Modern models~a long report
large
Latest models~an entire book
huge

Relative sizes, not exact numbers — the point is the direction: context windows keep getting bigger.

A bigger window means you can share more — a whole document, a long thread — without the model losing track. But it isn't infinite, and burying the key detail in a wall of text still makes it easier to miss. More room is not a substitute for being clear.

What actually goes into a prompt

When you hit enter, the model usually receives far more than the sentence you typed. A typical assistant assembles several streams of context into one combined prompt before the model ever sees it:

What the model receives on each turn
Your questionThe prompt you just typed
Conversation historyEarlier messages in this chat, as far back as the window allows
Attached materialFiles, selected text, or other context you've added
Retrieved documentsRelevant content the tool fetches automatically (RAG)
System instructionsHidden guidance on tone, safety, and behaviour added by the product
One combined prompt → the model

Your words are just one layer. History, attachments, retrieved content, and hidden system instructions all ride along.

Those hidden "system instructions"

Most assistants quietly prepend a set of instructions — sometimes called a system prompt — that you never see. These set the assistant's overall behaviour: be helpful and respectful, stay safe, keep answers clear. They also act as shortcuts, so that a brief request like "write tests for this" expands into a fuller instruction behind the scenes. It's worth knowing this layer exists: it's part of why two different tools built on the same model can feel so different to use.

Putting context to work

Once you picture the prompt as layers, several practical habits follow naturally:

A handy mental check before you send: "Does everything the model needs to answer this well fit in what it can currently see?" If not, add the missing context — or start a cleaner conversation.

A note on privacy

Because context can include whatever you paste in, it's worth a moment's thought about what you share — especially sensitive or confidential information — and reviewing how a given tool handles and retains your data. Good prompting and good judgement go together: give the model what it needs to help you, and no more than you're comfortable sharing.

The takeaway — and the series

Context is the stage every answer is performed on. The context window sets how much the model can hold at once, and the prompt it receives is layered far beyond your typed words — history, attachments, retrieved documents, and hidden instructions all shape the reply. Manage that context deliberately and the model has what it needs to do its best work. That closes our prompt-engineering series: from specificity, through habits and techniques, to grounding and now context. None of it requires code — just clear thinking about how to ask. That, in the end, is what prompt engineering really is.

DS

Dhaval Shah

Cloud Solution Architect — 18+ years across SharePoint, Microsoft 365, and Azure AI.