# What is a context window in AI models?

> The context window sets how much text a language model can consider at once. What counts towards it, why it is limited and what that means for your work.

Source: https://akaia-platform.de/en/glossary/context-window
Language: en

---

AI basics

## What is a context window?

The context window is the maximum amount of text, measured in tokens, that a language model can process in one pass, including instructions, conversation history, attachments and the answer it generates.

Also: Context length · Kontextfenster · Token limit

A language model has no lasting memory of a conversation. For every answer it is shown all the relevant text again: system instructions, your previous messages, its own replies, attachments and search results. The context window is the upper limit for all of that.

### What counts towards the context window

-   instructions from the system or an agent
-   the conversation so far
-   attached files and search results
-   tool results, such as data from an app
-   the answer the model is currently writing

Its size is given in [tokens](https://akaia-platform.de/en/glossary/token). Current models have very different context windows, from a few tens of thousands to a million tokens and more.

### Why bigger is not automatically better

A large context window allows long documents in one go. But every token in context is paid for again with each answer, and models do not always pay equal attention to information in very long contexts. It is often better to provide only the relevant sections. That is exactly what [RAG](https://akaia-platform.de/en/glossary/rag) does: search picks the right passages instead of dumping everything in.

### What happens when the window is full

When the limit is exceeded, the application has to cut: summarise or drop older messages, or reject the request. In long chats the model can therefore “forget” early details.

### Example

An in-house lawyer reviews a 200-page supply contract in a single chat. After about 30 follow-up questions, the model overlooks a liability cap it had quoted correctly at the start. He puts the contract into a knowledge collection, starts a new chat and asks his key questions in one go. The answers now quote the relevant clauses with their location.

### How AKAIA uses it

In AKAIA you pick the model that suits the job, and the model overview lists each model's context window. Instead of pasting whole drives into the chat, AKAIA uses knowledge collections and enterprise search to bring exactly the relevant passages into context and cites the source.

-   **[Models](https://akaia-platform.de/en/models)**

    Every model with location and context.

-   **[AI chat](https://akaia-platform.de/en/chat)**

    Every model processed in the EU.

-   **[Documents](https://akaia-platform.de/en/documents)**

    Analyse, cite and create files.

Glossary

### Related terms

Terms that often come up together.

-   ### [Token](https://akaia-platform.de/en/glossary/token)

    Tokens

    A token is a small piece of text, such as a word, part of a word or a punctuation mark, into which a language model splits text before processing it; context windows and prices are measured in tokens.

-   ### [Large language model (LLM)](https://akaia-platform.de/en/glossary/large-language-model)

    LLM

    A large language model (LLM) is an AI model trained on very large amounts of text that understands and generates language by predicting, token by token, the most likely next piece of text.

-   ### [RAG](https://akaia-platform.de/en/glossary/rag)

    Retrieval-Augmented Generation

    Retrieval-augmented generation (RAG) is a method in which a system first retrieves relevant passages from your own sources and a language model then writes an answer grounded in those sources.

-   ### [Prompt](https://akaia-platform.de/en/glossary/prompt)

    Prompt engineering

    A prompt is the input given to an AI model: the question, instruction or task together with any context, from which the model generates its answer.

#### Related pages

-   **[Management](https://akaia-platform.de/en/use-cases/management)**

    Use cases

Next step

### From definition to practice.

Search, chat, agents and tasks in one platform. Hosted in Frankfurt, every model processed in the EU.

[Get started](https://app.alphos-services.com/register) · [Talk to sales](https://akaia-platform.de/en/contact)

No per-seat fee · From €399 a month · Cancel monthly
