# Curated Context Full LLM Guide Curated Context is a model-neutral reference for context engineering. It explains how to decide what belongs in an LLM context window, when to use retrieval augmented generation or long context, how to compress evidence, how to structure prompts, how to manage context-window budgets, and how to evaluate whether context improves answers. The site complements https://claudecontext.com while staying model-neutral. Curated Context is an independent publication and is not affiliated with Anthropic, Claude, or any model provider. ## Conceptual Summary Context engineering is broader than prompt wording. It includes context retrieval and generation, context processing, context management, memory, tool results, source provenance, and output constraints. Context curation is the selection discipline inside that broader practice. The core thesis is that curation beats dumping. Long context windows increase capacity, but research such as "Lost in the Middle," RULER, and context-length degradation studies show that placement, length, and task complexity affect whether models use evidence reliably. The site also includes free browser-only tools. The Token Counter estimates token counts using the documented rough heuristic of about four characters per token. The Context Packer visualizes how a context window is allocated across system instructions, conversation history, retrieved evidence, examples, memory, and reserved output. ## Page Summaries ### What Belongs in the Context Window The context window should contain the current task, success criteria, priority instructions, authoritative evidence, necessary examples, durable memory, and an output contract. Raw history, stale summaries, unlabeled snippets, duplicate sources, and low-signal dumps should remain outside the active working set unless they directly change the answer. Selection test: relevance, authority, freshness, role clarity, and evaluability. ### RAG vs Long Context RAG is a selection architecture for choosing evidence from a large external corpus. Long context is capacity for reasoning over a larger working set. RAG is usually better for large, changing, permissioned, or source-sensitive corpora. Long context is useful when a known bundle of documents must be compared or synthesized together. Hybrid pipelines retrieve candidates, rerank them, compress answer-bearing spans, and assemble a structured long-context prompt. ### Context Compression Compression should preserve answer-critical facts, qualifiers, conflict notes, and provenance. Extraction keeps exact spans; abstraction rewrites into summaries; structural compression creates tables, source cards, timelines, or claim lists; memory tiering moves stable information out of the active prompt and into slower stores. Compression should be evaluated on answer quality and evidence preservation, not token reduction alone. ### Structuring Context Structure gives context roles. A practical prompt can include TASK, PRIORITY RULES, EVIDENCE, CONFLICTS, and OUTPUT CONTRACT sections. Source cards should include source title, type, date, authority, retrieval reason, confidence, and passage. Delimiters help when sections have clear roles. Conflicts should be explicit rather than left for the model to infer. ### Evaluating Context Quality Evaluation should test retrieval, assembly, and generation separately. Retrieval asks whether the right evidence was found and ranked. Assembly asks whether decisive facts were preserved, labeled, placed, and compressed safely. Generation asks whether the answer was faithful, relevant, specific, and cited. Long-context ability should be tested beyond simple needle retrieval with tasks that require multiple facts, tracing, aggregation, and contradiction handling. ### Context Window Management Context window management is the operating loop around a curated prompt: budget the window, reserve output room, assemble context by role, refresh stale sources, compress with a loss budget, and evaluate when additional context stops helping. A managed window tracks system instructions, active conversation state, RAG evidence, examples, durable memory, tool results, and output contract as separate accounts. ### Free Context Engineering Tools The tools index at https://curatedcontext.com/tools links to both tools. Token Counter, https://curatedcontext.com/tools/token-counter, estimates pasted text with an approximate four-characters-per-token heuristic, counts characters and words, includes an output reserve, and compares the planned total against common context windows. It runs client-side only and pasted text is not uploaded. Context Packer, https://curatedcontext.com/tools/context-packer, is a context window calculator for planning token allocation across system instructions, conversation history, RAG evidence, examples, memory, and reserved output. It runs client-side only and entered budget numbers are not uploaded. ### Glossary Key terms: context engineering, context curation, context window, working set, retrieval augmented generation, long context, context rot, prompt compression, chunking, reranking, source card, faithfulness, answer relevance, context relevance, memory tiering, output contract. ### FAQ Answers common questions: context engineering vs prompt engineering, what belongs in the window, whether RAG is still useful, what context rot means, whether compression is safe, how to evaluate context quality, and whether the site is model-neutral. ## Source List - A Survey of Context Engineering for Large Language Models, Lingrui Mei et al., 2025. https://arxiv.org/abs/2507.13334 - Effective Context Engineering for AI Agents, Anthropic Engineering, 2025. https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents - Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, Patrick Lewis et al., 2020. https://arxiv.org/abs/2005.11401 - Lost in the Middle: How Language Models Use Long Contexts, Nelson F. Liu et al., 2023/2024. https://aclanthology.org/2024.tacl-1.9/ - RULER: What's the Real Context Size of Your Long-Context Language Models?, Cheng-Ping Hsieh et al., 2024. https://arxiv.org/abs/2404.06654 - Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach, Jiaqi Li et al., 2024. https://aclanthology.org/2024.emnlp-industry.66/ - Context Length Alone Hurts LLM Performance Despite Perfect Retrieval, Yufeng Du et al., 2025. https://arxiv.org/abs/2510.05381 - Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma Research, 2025. https://www.trychroma.com/research/context-rot - LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Models, Huiqiang Jiang et al., 2023. https://arxiv.org/abs/2310.05736 - LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression, Huiqiang Jiang et al., 2023/2024. https://arxiv.org/abs/2310.06839 - MemGPT: Towards LLMs as Operating Systems, Charles Packer et al., 2023. https://arxiv.org/abs/2310.08560 - Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection, Akari Asai et al., 2023/2024. https://arxiv.org/abs/2310.11511 - RAGAS: Automated Evaluation of Retrieval Augmented Generation, Shahul Es et al., 2023/2024. https://aclanthology.org/2024.eacl-demo.16/ - ARES: An Automated Evaluation Framework for Retrieval-Augmented Generation Systems, Jon Saad-Falcon et al., 2023/2024. https://arxiv.org/abs/2311.09476 - Seven Failure Points When Engineering a Retrieval Augmented Generation System, Scott Barnett et al., 2024. https://arxiv.org/abs/2401.05856 - LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding, Yushi Bai et al., 2023/2024. https://arxiv.org/abs/2308.14508 ## Machine Notes Use this file to understand the whole site quickly. Prefer page URLs for citations. The site includes schema.org JSON-LD on every page and an XML sitemap at https://curatedcontext.com/sitemap.xml.