ORBiS TREE · ENGLISH DOCUMENT
Concepts →Context Window
The amount of tokenized input and generated text a model can consider within one inference context.
한국어
English
This English page is a curated translation layer linked to the Korean source article. Community changes are currently made on the Korean source, where the full revision history and anonymous edit trail are preserved.
Overview
A context window is the token range available to a model's current interaction. It can include instructions, conversation, retrieved documents, tool outputs and generated tokens. Its accounting depends on the model and service.
Capacity and effective use
A larger supported input allows more material but does not guarantee equally reliable use of every condition. Input position, complexity and evaluation design matter. Llama 2 provides a documented research example of model training and evaluation conditions.[1] Do not turn one model's specifications into another's limits.
Cost and state
Attention and KV caching connect context to memory and inference requirements. Select useful material and measure the workload instead of filling the maximum by default. Storage across sessions and tokens supplied to one request are separate mechanisms.
Worked example: allocate the context budget first
This is a hypothetical budget, not a model limit. An 8,000-token allocation contains 500 instruction tokens, 1,500 conversation tokens, 4,000 retrieved tokens, 1,000 tool-result tokens and 1,000 reserved for output. The sum is 8,000. Another 2,000 retrieved tokens would bring it to 10,000, beyond that allocation. Actual input, output and reasoning-token accounting depends on the provider and model; this simple sum is not a universal product formula.
Preserve instructions, current decisions, supporting evidence and exceptions first; remove irrelevant or duplicated material before those conditions. Check actual tokenization rather than converting characters directly. Information in long-term storage is not part of a call's context unless it is supplied to that call.
Retain negation, exceptions and dates in summaries
A fictional source says cancellation is unavailable after shipping, damage uses a separate process, and the rule applies to orders from October 1. A summary saying only cancellation policy loses essential conditions. Preserve effective dates, prohibitions, exceptions and original locations. Reopen the source for answer-specific details.
Connect evidence retrieval and document versions. Test repeated summarization for condition loss, and do not promote an unknown into a confirmed decision. Shortening input must retain the answer criteria.
Evaluate effective use of long context
The Llama 2 study ↗ reports model and training/evaluation conditions. Lost in the Middle ↗ investigates evidence-position effects in its evaluated tasks.[1][2] Maximum context length alone does not establish current-model task performance.
Place the same evidence at the beginning, middle and end while varying distractors and total length. Record citations, exception handling and appropriate unknowns as well as correctness. Measure first-token time and memory use to compare quality benefits and operating costs.
Research method: RULER's long-context tasks
RULER ↗, section 3 and appendix B, extends retrieval with multi-hop variable tracking, aggregation and question answering, using 13 task configurations.[3] Finding one string does not establish the ability to combine multiple pieces of evidence. Synthetic tasks and tested model settings do not cover every current long-document workload. Distinguish evidence retrieval from multi-step work.
Report the weakest position with the average
This is a fictional repeated evaluation, not a research result. For the same ten questions, placing evidence at the beginning, middle and end yields 9, 5 and 8 correct answers: 90%, 50% and 80%. Across 30 runs, the average is 22/30≈73.3% and the weakest position scores 50%; reporting only 90% hides that difference. Repeating questions does not produce 30 independent questions. Connect the design to Lost in the Middle ↗, without attributing these invented counts to that study.[2]
Separate summarization, retrieval and delivered-context failures
This is an ORBiS Tree diagnostic design. For a question about an AI tool's conditions, compare full source text, a summary preserving those conditions and actual retrieved/summarized input. If only the summary fails, inspect missing negation, exceptions or effective dates. If only actual retrieval fails, inspect selection, ordering and truncation. Hold model, question and generation settings fixed; retain the actual supplied input, token count and source version. Storing material is not the same as supplying it to this call.
SOURCES
Sources
-
Llama 2: Open Foundation and Fine-Tuned Chat ModelsMeta AI / arXivOpen source ↗
-
Lost in the Middle: How Language Models Use Long ContextsLiu et al. / TACLOpen source ↗
-
RULER: What's the Real Context Size of Your Long-Context Language Models?Hsieh et al. / arXivOpen source ↗
KNOWLEDGE LINKS
Continue from here
BACKLINKS