---
title: "What is a Context Window?"
canonical: https://wavect.io/glossary/context-window/
language: en
description: "The maximum amount of text an LLM can consider at once, measured in tokens, and the reason you cannot just paste your entire knowledge base into every prompt."
image: "https://wavect.io/img/general/bak/open_graph_preview.jpg"
---

TECHNOLOGIES

# Context Window

The maximum amount of text an LLM can consider at once, measured in tokens, and the reason you cannot just paste your entire knowledge base into every prompt.

Last reviewed: 2026-06-02 by [Kevin Riedl](/team/kevin-riedl/) [wiki ↗](https://www.wikidata.org/wiki/Q139796365)

The context window is the [LLM](/glossary/llm/) ’s working memory for a single request, measured in tokens (a token is roughly three-quarters of a word). Everything has to fit inside it: your system prompt, the conversation history, any documents you paste in, and the answer the model generates. Exceed the window and the model literally cannot see the overflow.

“Just put everything in the prompt” fails for three reasons even when the window is large. First, cost: most providers charge per token, so stuffing a huge document into every call multiplies the bill. Second, latency: more tokens means a slower response. Third, and least obvious, quality, models attend less reliably to information buried in the middle of a very long context, so more is not always better. A focused prompt often beats a bloated one.

This is exactly why [RAG](/glossary/rag/) exists. Instead of dumping your whole corpus into the window, you retrieve only the handful of relevant chunks for each question and send just those. You get the benefit of a large knowledge base without paying to process all of it on every request. The context window is the budget; retrieval and good [prompt-engineering](/glossary/prompt-engineering/) are how you spend it wisely.

Worked example of the “lost in the middle” effect that surprises teams: a company pastes a 40-page policy document into the prompt and asks a question whose answer sits on page 20. The model, with the whole document technically inside its window, still gets it wrong, because attention degrades for material buried in the middle of a long context. The same model, handed only the two relevant paragraphs that retrieval pulled out, answers correctly. Bigger windows did not fix the problem; better-targeted context did. This is the counter-intuitive part founders miss when a new model ships with a headline-grabbing window size: more capacity is not more reliability.

The practical takeaway: treat the context window as a scarce resource with a price tag, not free space. Bigger windows lower the pressure but do not remove it, and cost and latency still scale with what you put in. We design around that budget deliberately under [Artificial Intelligence](/services/artificial-intelligence/).

// FAQ

## FAQs

### What is a context window?

The maximum amount of text an LLM can process in one request, measured in tokens. The system prompt, conversation history, pasted documents, and the generated answer all have to fit inside it.

### Why not just put everything in the prompt?

Cost, latency, and quality. More tokens cost more and respond slower, and models attend less reliably to information buried in a very long context. A focused prompt usually beats a bloated one.

### How does the context window relate to RAG?

RAG exists to manage it. Instead of loading your whole corpus into the window, you retrieve only the relevant chunks per question, getting the benefit of a large knowledge base without paying to process all of it every time.

Related terms

- [LLM](/glossary/llm/)
- [RAG](/glossary/rag/)
- [Prompt Engineering](/glossary/prompt-engineering/)

Related services

- [Artificial Intelligence](/services/artificial-intelligence/)

Related case studies

- [Twinsoft AI](/case-studies/twinsoft-ai/)

Related guides

- [How to choose a tech stack for an MVP](/software-development-guide/how-to-choose-a-tech-stack-for-mvp/)

Talk to us

## Structured Data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/#organization",
      "@type": [
        "Organization",
        "ProfessionalService",
        "LocalBusiness"
      ],
      "employee": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "founder": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "legalRepresentative": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "name": "Wavect GmbH",
      "subjectOf": {
        "@id": "https://wavect.io/verified-claims.json#dataset",
        "@type": "Dataset",
        "creator": {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        "description": "A machine-readable registry of quantitative and qualitative claims published by Wavect, with review dates, localized page appearances and public third-party citations where available.",
        "inLanguage": "en",
        "isAccessibleForFree": true,
        "license": "https://creativecommons.org/licenses/by/4.0/",
        "name": "Wavect verified publication claims",
        "url": "https://wavect.io/verified-claims.json"
      },
      "url": "https://wavect.io/"
    },
    {
      "@id": "https://wavect.io/team/kevin-riedl/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Kevin Riedl",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796365",
        "https://www.linkedin.com/in/wsdt",
        "https://github.com/wsdt"
      ],
      "url": "https://wavect.io/team/kevin-riedl/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/team/christof-jori/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Christof Jori",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796367",
        "https://www.linkedin.com/in/jocr77/",
        "https://github.com/jo-chris"
      ],
      "url": "https://wavect.io/team/christof-jori/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/#website",
      "@type": "WebSite",
      "inLanguage": [
        "en",
        "de",
        "es",
        "zh"
      ],
      "name": "Wavect",
      "potentialAction": {
        "@type": "SearchAction",
        "query-input": "required name=search_term_string",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://wavect.io/search/?q={search_term_string}"
        }
      },
      "publisher": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "url": "https://wavect.io/"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/glossary/context-window/#term",
      "@type": "DefinedTerm",
      "alternateName": [],
      "description": "The maximum amount of text an LLM can consider at once, measured in tokens, and the reason you cannot just paste your entire knowledge base into every prompt.",
      "inDefinedTermSet": "https://wavect.io/glossary/#termset",
      "name": "Context Window",
      "termCode": "context-window",
      "url": "https://wavect.io/glossary/context-window/"
    },
    {
      "@id": "https://wavect.io/glossary/context-window/#webpage",
      "@type": "WebPage",
      "about": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "author": {
        "@id": "https://wavect.io/team/kevin-riedl/#person",
        "@type": "Person",
        "name": "Kevin Riedl",
        "url": "https://wavect.io/team/kevin-riedl/"
      },
      "dateModified": "2026-06-02",
      "description": "The maximum amount of text an LLM can consider at once, measured in tokens, and the reason you cannot just paste your entire knowledge base into every prompt.",
      "headline": "Context Window",
      "inLanguage": "en",
      "isPartOf": {
        "@id": "https://wavect.io/#website",
        "@type": "WebSite"
      },
      "lastReviewed": "2026-06-02",
      "mainEntity": {
        "@id": "https://wavect.io/glossary/context-window/#term"
      },
      "mentions": [
        {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        {
          "@type": "Service",
          "name": "Artificial Intelligence",
          "url": "https://wavect.io/services/artificial-intelligence/"
        }
      ],
      "name": "Context Window",
      "reviewedBy": {
        "@id": "https://wavect.io/team/christof-jori/#person",
        "@type": "Person",
        "name": "Christof Jori",
        "url": "https://wavect.io/team/christof-jori/"
      },
      "speakable": {
        "@type": "SpeakableSpecification",
        "cssSelector": [
          ".gls-single__h1",
          ".gls-single__tldr"
        ]
      },
      "url": "https://wavect.io/glossary/context-window/"
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "item": "https://wavect.io/",
          "name": "Home",
          "position": 1
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/glossary/",
          "name": "Tech, product & engagement glossary",
          "position": 2
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/glossary/context-window/",
          "name": "Context Window",
          "position": 3
        }
      ]
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The maximum amount of text an LLM can process in one request, measured in tokens. The system prompt, conversation history, pasted documents, and the generated answer all have to fit inside it."
      },
      "name": "What is a context window?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Cost, latency, and quality. More tokens cost more and respond slower, and models attend less reliably to information buried in a very long context. A focused prompt usually beats a bloated one."
      },
      "name": "Why not just put everything in the prompt?"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "RAG exists to manage it. Instead of loading your whole corpus into the window, you retrieve only the relevant chunks per question, getting the benefit of a large knowledge base without paying to process all of it every time."
      },
      "name": "How does the context window relate to RAG?"
    }
  ],
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      ".faq-question",
      ".faq-answer"
    ]
  }
}
```
