[KongchangAI]
ConceptContext Window / 上下文长度限制

Context Window

The maximum amount of information a large model can receive and process in a single inference pass, measured in tokens. It determines the upper limit of historical information that can be injected into an agent and is a core constraint affecting the coherence of long conversations.

Core Facts

Timeline (last 90 days)

Dec 5

When review instructions are appended within a single long conversation, the model can see the paper's drafting process, revision rationales and data sources through the context window, making confirmation bias easy to arise.

Unverified50%
Dec 5

However large the context window is, it is still limited; in long tasks, how to compress history and retain key points is a highly engineering-intensive part of harness design.

Unverified50%
Dec 5

The model itself has no memory; every action can only be judged based on the content within the current context window.

Unverified50%
Dec 4

When the context window approaches its limit, earlier content is truncated or forced to be compressed, and the model's ability to follow key constraints declines accordingly, a phenomenon the industry often calls "context rot" or "lost in the middle."

Unverified50%
Dec 4

When historical messages exceed the context window, early messages must be truncated or summarized, otherwise the request will return an error.

Unverified50%
Dec 4

Context window refers to the upper limit of the total number of tokens a large language model can remember in a single conversation, with ChatGPT, Claude, and Gemini each having different specifications (ranging from tens of thousands to hundreds of thousands of tokens).

Unverified50%
Dec 4

Cross-file analysis depends on the model's context window capability, that is, the total amount of text the model can read and reason over in a single pass.

Unverified50%
Dec 4

In practice, developers usually need to actively define the scope of relevant files; otherwise the model may be distracted by irrelevant code, reducing localization accuracy.

Unverified50%
Dec 3

Simply expanding the context window cannot solve the persistence problem, because long contexts increase inference cost and latency, and there is also the phenomenon of "lost in the middle".

Unverified50%
Dec 2

Putting all intermediate state and contextual information into the large model's context window wastes tokens and distracts the model's attention.

Unverified50%

40 more timeline events

All Facts (20)

Verified

When new information conflicts with old memories, the memory layer must be able to identify and update them rather than holding on to outdated knowledge.

90%
Verified

The computational complexity of the self-attention mechanism grows approximately quadratically with sequence length, with the attention matrix computation being proportional to n² for a sequence of length n.

90%
Verified

Compared to traditional scripts, AI Agents are unpredictable and carry inherent risks such as hallucinations, context misinterpretation, and susceptibility to prompt injection attacks.

90%
Verified

The context window refers to the maximum amount of text a model can process in a single conversation; early models had only 4K tokens, while modern models have expanded to hundreds of thousands of tokens.

90%
Verified

Context length and computational load grow in an approximately quadratic relationship, influenced by the attention mechanism.

90%
Verified

The context window of a large language model determines the upper limit of information the model can process in a single inference.

90%
Verified

Context window size does not equal effective context length; exceeding the effective attention range causes a forgetting drift phenomenon.

90%
Verified

Long-term memory Agents are typically built on RAG (Retrieval-Augmented Generation) technology, converting information into high-dimensional vectors via vector databases and storing them persistently.

90%
Verified

The context window refers to the total number of tokens the model can "see" at once in a single inference, constituting the physical upper limit of agent memory; long-task agents often need additional memory mechanisms to write important information to external storage and retrieve it when needed.

85%
Verified

The context window refers to the upper limit on the total number of tokens the model can receive in a single LLM call, including the system prompt, conversation history, tool return results and the current user input.

80%
Verified

The context window refers to the maximum total number of tokens a model can process in a single request, including the input prompt and the model output.

80%
Verified

The context window determines how much content the model can remember within a single conversation.

80%
Verified

In large language models, a Token is the smallest unit of text that a model processes

80%
Verified

The context window of large language models has expanded from 4K to the million-token level.

80%
Verified

研究表明当上下文过长时,模型对中间部分信息的注意力会显著下降,即"Lost in the Middle"现象

80%
Verified

Enterprise-grade Agent systems typically introduce external memory modules (such as vector databases) to store long-term memory, in order to overcome context window limitations.

80%
Verified

大语言模型在长时间对话中会因上下文窗口限制而丢失早期信息

80%
Verified

In the conversational architecture of large language models, the System Prompt has the highest priority and can continuously influence the behavioral boundaries of the model throughout the entire session.

80%
Verified

The context window refers to the total amount of input a model can read at one time, while the output window refers to the maximum amount of text a model can continuously generate at one time.

80%
Verified

A context window of 1 million tokens is roughly equivalent to 700,000 to 800,000 Chinese characters, enough to hold an entire long novel or a large code repository.

75%

Source Articles