Skip to main content
A context window is the maximum amount of text that a large language model (LLM) can work with at once. It’s like the model’s short-term memory. In a conversation, everything counts toward it: your messages, the agent’s instructions, the attached files, the data that tools return, and the agent’s answers.

How it works

  1. The text is split into tokens. A token is about four characters.
  2. The model reads all the tokens of the conversation.
  3. The model writes its answer, which also uses tokens.
Each model has its own context window size.

Why context windows matter

  • Memory of the conversation: with a larger context window, the agent can use more details from earlier in the conversation.
  • Data processing: with the Include all data knowledge lookup method, the agent loads your most recent documents until it fills the context window. A larger context window lets it read more documents.
  • Long conversations: a long conversation can fill the context window. Start a new conversation for each new topic or task.

The “Context limit reached” chip

You may see a Context limit reached chip on an agent’s answer. It’s not an error, and it’s not related to your credits. It means that Dust had to trim part of the tool output used for that answer, so that the conversation fits in the model’s context window. Why a short conversation can reach the limit: the context holds more than the messages you see. Attached files, documents that the agent found, search results, and other tool output all count. They’re usually much larger than the visible text, so a conversation with a few messages can still fill the context window. What it means for answers: the model no longer sees the trimmed output, so the answer can miss details from it. Later answers in the same conversation can also be less accurate. What to do:
  • Click the context indicator in the message input and click Compact now. Dust summarizes the conversation to free up context. See Context compaction.
  • When you move on to a new task, start a new conversation and attach only the files you still need.
  • Ask a narrower question so that tools return less data. For example, ask about one document or folder instead of a whole connection.
  • If you build agents, choose a model with a larger context window.
When to contact Support: if the chip appears in a new conversation where you attached no large files and the agent used few or no tools, contact support@dust.tt with a link to the conversation.

Large context windows: benefits and limits

A larger context window lets the agent hold longer conversations and work with larger documents. It also has limits: answers can take longer and cost more, and too much information, or information that contradicts itself, can make answers less consistent.

Tips for your agents

  • Give relevant data: give the agent the data it needs, not all the data you have.
  • Write clear instructions: see How to write effective instructions.
  • Choose the right model: pick a model that fits your use case, including its context window size. See Auto models and the model picker.
  • Start new conversations: ask your users to start a new conversation for each new topic or task.

Context Compaction

Summarize a long conversation to free up context.

Auto models and the model picker

Choose a model for an agent or for your messages.