Million Token Context: Definition and Examples
Capacity of a language model to process up to a million tokens in a single request, enabling analysis of very large documents, entire codebases, or long conversations without loss of information.
Full definition
The Million Token Context refers to the ability of an artificial intelligence model to accept and process approximately one million tokens within its context window. With an average token representing 3 to 4 characters in French, this equates to about 750,000 words, or the equivalent of several complete books or a large-scale codebase.
This technical advancement represents a major qualitative leap compared to early language models, whose context windows were limited to a few thousand tokens. With a context of one million tokens, it becomes possible to submit a 500-page legal document, a complete code repository, or an entire conversation spanning several months without having to split or summarize the information beforehand.
The main benefit lies in preserving overall coherence. When a model can 'see' an entire document or project at once, it establishes connections between distant sections, detects subtle inconsistencies, and produces responses that take into account the entirety of the provided context.
However, a larger context does not automatically mean better performance. The quality of the model's attention can vary depending on the position of the information within the window, and the computational cost increases significantly. Good prompt engineering remains essential to guide the model toward the relevant parts of the context.
Etymology
The term combines 'million' (order of magnitude), 'token' (unit of text segmentation used by language models), and 'context' (window of information accessible to the model when processing a request). It emerged in 2024 with the launch of Gemini 1.5 Pro by Google, the first mass-market model to offer this capability, followed by Anthropic's Claude.
Concrete examples
Analysis of a complete codebase
Here is the complete source code of our application (450 files). Identify all potential security flaws, particularly SQL injections and XSS vulnerabilities, and propose fixes for each.
Review of a legal document corpus
I submit to you the 12 contracts signed with our suppliers this year. Compare the liability clauses across all contracts and flag those that present conditions less favorable than average.
Summary of a long conversation history
Here is the complete 6-month history of our product team's discussions. Extract the key decisions made, recurring unresolved topics, and generate a structured summary report by theme.
Practical usage
In prompt engineering, the million token context allows replacing complex strategies of splitting and summarizing with direct submission of the complete document. It is recommended to place key instructions at the beginning and end of the prompt, and to structure large documents with clear tags or headings to facilitate the model's navigation of the context.
Related concepts
FAQ
How many pages does a million tokens represent?
Does the model really retain everything in such a long context?
Should I always use the maximum available context?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More definitions
Model Card: Definition and Examples
A model card is a standardized document that accompanies an AI model to describe its performance, limitations, potential biases, and conditions of use
Model Registry: Definition and Examples
A Model Registry is a centralized system for storing, versioning, and managing machine learning models throughout their lifecycle, from training to production deployment.
Multimodal RAG: Definition and Examples
Multimodal RAG is an extension of Retrieval-Augmented Generation that allows an AI model to search and leverage information from sources
Needle In Haystack: Definition and Examples
The Needle In a Haystack (NIAH) test is an evaluation method that measures a language model's ability to retrieve a specific piece of information buried in a long context.
Negative Prompting: Definition and Examples
Negative prompting is a technique that involves explicitly telling an AI model what it should not generate, thereby refining the results by excluding undesirable elements.
Neural Architecture Search: Definition and Examples
Neural Architecture Search (NAS) is a machine learning technique that automates the design of neural network architectures by exploring...
Get new prompts every week
Join our newsletter.