Glossary

Context window the model's working memory for one answer.

  • Technical

A context window is the text a language model can see while it writes an answer. Why it limits how much of your page an AI engine reads, and how Prefer helps.

Updated2 Oct 2026
Definition33 words

Context window A context window is all the text a language model can take into account while writing a response, measured in tokens. Prefer shows which sources make it into AI answers about your category.

Related terms ↓

A context window is all the text a language model can take into account while it writes a response, including the response itself. It is measured in tokens (chunks of words), and anything outside it is invisible to the model in that moment. Prefer shows which sources make it into the AI answers about your category, which is the practical result of what each engine put in its context window.

How a context window works#

Anthropic describes the context window as the model’s “working memory”, separate from the large body of data it was trained on (Anthropic, context windows). In a chat, the window holds the system instructions, the conversation so far, the new question, any documents or search results the system added, and the answer being generated.

Every model has a limit. Anthropic’s documentation lists windows of up to 1M tokens depending on the model, and also notes that more context is not automatically better: as the token count grows, accuracy and recall can degrade. Bigger windows let a model hold more, not read it all equally well.

Why it matters for AI search visibility#

AI search engines that ground their answers work by retrieval-augmented generation: they search, pick passages from sources, and place those passages in the context window before the model writes (Lewis et al., 2020). This is what grounding means in practice.

Three things follow for your brand:

  • You compete for space. The window holds the question plus passages from several sources. Your page is one candidate among many, often after a query fan-out has gathered results for several sub-questions.
  • Passages, not pages. Systems typically put selected passages in front of the model rather than your full site. A buried answer may never make it in.
  • Position matters. The “Lost in the Middle” study found models were often best at using information at the beginning or end of a long input and worse at using information in the middle (Liu et al., 2023). Engines decide the order, not you, so the safe move is a passage that answers the question cleanly wherever it lands.

What fills the window in an AI search answer#

For one search-grounded answer, the window typically carries several kinds of text at once:

  • Instructions from the engine about how to answer and how to cite.
  • The conversation, including earlier questions in the same chat.
  • The current question, which may already have been rewritten into several searches.
  • Retrieved passages from the sources the engine chose.
  • The answer itself, as the model writes it.

Your content only appears in one of those slots, and it shares that slot with other sources. This is why a short, direct passage tends to travel better than a long page that makes its point slowly.

Context windows and wrong answers#

A model can still state something wrong when the right fact is in its window, especially in long inputs where recall degrades. It can also fall back on what it learned in training when the retrieved passages do not answer the question. Clear, plainly stated facts on your pages lower the odds of either. For more on the failure mode, see AI hallucination.

A concrete example#

A buyer asks an assistant, “What is the best invoicing tool for freelancers?” The engine runs a few searches, pulls short passages from a review site, a forum thread and two vendor pages, and fits them into the context window with the question. If your pricing page buries the answer under a long intro, the extracted passage may be your intro, not your pricing. The model can only cite what it was given.

Common confusions#

  • Context window vs training data. Training data shaped the model before release. The context window is what it sees for this one answer. You can influence the second much faster.
  • Context window vs memory features. Some assistants save notes about a user across chats. Those notes still have to be put into the context window to affect an answer.
  • Tokens vs words. Windows are counted in tokens, which are pieces of words, so a token limit is not the same as a word count.

How to write for the context window#

  1. Lead each section with a self-contained answer a model could quote alone.
  2. Keep key facts (price, category, who it is for) in plain text near the top, not in images or tabs.
  3. Use clear headings so the right passage is easy to retrieve for a sub-question.
  4. Keep facts consistent across your site and third-party profiles, so whichever passage lands, it says the same thing.

How Prefer helps#

Prefer tracks ChatGPT, Gemini, Perplexity, Google AI Overviews and AI Mode and shows the sources behind each answer, so you can see whose passages made it in and whether yours did. Prefer also writes AI articles on every self-serve plan. Run a free AI visibility audit to see what engines say about you today.

In context

The term in a sentence.

Related questions

People also ask.

Questions

Asked plainly.

What is a context window in simple terms?

It is the model's working memory for one response: the question, any retrieved pages, the conversation so far and the answer it is writing. Prefer shows which retrieved sources end up cited in ChatGPT, Gemini, Perplexity and Google's AI answers for your prompts. Anything outside the window, the model cannot see while it answers.

What is the difference between a context window and training data?

Training data is what the model learned from before release; the context window is what it is looking at right now. Prefer focuses on the second, showing which pages engines retrieve and cite. Fixing your page can change what lands in the context window quickly, while changing training data takes a new model.

Does a bigger context window mean AI engines read my whole site?

No. Prefer shows the specific pages cited behind each AI answer, and it is a short list of pages, not whole websites. Search-grounded engines retrieve selected passages from several sources and fit them into one window alongside the question, so your best answer has to be easy to find and easy to lift.

How should I write content with context windows in mind?

Put the answer first and make each section stand on its own. Prefer writes AI articles on every self-serve plan, and the same rule applies to anything you publish. Research on long contexts found models use information at the start or end of their input better than information buried in the middle, so a clear opening passage is your safest bet.

Get your free AI visibility report
in about 10 minutes.

See how answer engines describe your brand today, and where the openings are to outpace the competition.