context management

Structuring, truncating and augmenting the data fed to LLMs to fit context window limits using techniques like retrieval-augmented generation (RAG), chunking, summarization, system/user role framing, and caching embeddings, plus orchestration patterns (sliding windows, relevance scoring) to maintain coherent multi-turn behavior.

contextmanagement

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

RAG systems frequently suffer from hallucinations and factual inaccuracies due to retrieval of irrelevant or weakly relevant passages; existing approaches are limited to coarse-grained, document-level filtering, resulting in low precision. This paper proposes the first LLM-driven, fine-grained block-level filtering framework, integrating semantic chunking, query-block alignment scoring, and LLM-based re-ranking to enable precise noise suppression prior to generation. Its core innovations are: (1) dynamic relevance assessment and filtering at the semantic block level—departing from conventional document-level paradigms; and (2) a lightweight LLM agent for efficient, interpretable block re-ranking and adaptive threshold-based pruning. Experiments demonstrate substantial hallucination reduction and consistent superiority over mainstream RAG baselines across multi-hop reasoning and fact-checking tasks, with an average 12.7% improvement in factual accuracy.

Enhances reliability for fact-checking and multi-hop reasoning tasksFilters irrelevant chunks in RAG systems to reduce inaccuraciesImproves factual accuracy by semantic chunk-level relevance scoring

Don't Do RAG: When Cache-Augmented Generation is All You Need for Knowledge Tasks

Dec 20, 2024
BJ
Brian J Chan
🏛️ National Chengchi University | Academia Sinica

This work addresses key limitations of Retrieval-Augmented Generation (RAG) for knowledge-intensive tasks—namely, high retrieval latency, document selection errors, and architectural complexity. We propose Cache-Augmented Generation (CAG), a novel paradigm that eliminates real-time retrieval by preloading a bounded knowledge corpus into the extended context window of large language models (e.g., 128K+ tokens) and leveraging parameter-based caching for zero-latency, zero-retrieval-error inference. To our knowledge, CAG is the first systematic architecture to replace retrieval entirely with caching, demonstrating that, under constrained knowledge settings, long-context LLMs can bypass retrieval modules altogether—yielding significantly simplified, more robust systems. Experiments across multiple benchmarks show CAG matches or exceeds RAG performance while eliminating the need for vector databases and dedicated retrievers, thereby drastically reducing system complexity.

Cache-Augmented Generation alternative to RAGEliminates retrieval latency and errorsOptimizes performance for constrained knowledge bases

FlashRAG: A Modular Toolkit for Efficient Retrieval-Augmented Generation Research

May 22, 2024
JJ
Jiajie Jin
🏛️ Renmin University of China

Existing RAG research suffers from the absence of a unified, lightweight, and scalable standardized framework, hindering efficient method reproduction, comparative analysis, and evaluation. To address this, we propose RAGFlow: an open-source, modular, and highly customizable RAG research toolkit. Its key contributions are threefold: (1) a novel fine-grained modular architecture that decouples core components—including retrieval, re-ranking, prompt engineering, and evaluation—enabling flexible composition and independent optimization; (2) integrated support for 16 state-of-the-art RAG methods and 38 standardized benchmarks spanning textual and multimodal scenarios; and (3) a unified interface abstraction for LLMs and multimodal LLMs (MLLMs), coupled with efficient preprocessing and evaluation pipelines. Implemented in Python, RAGFlow significantly lowers the barrier to algorithmic experimentation and has been widely adopted for validating novel RAG methods and supporting pedagogical practice.

Challenges in comparing RAG methodsExisting toolkits are heavy and inflexibleLack of standardized RAG framework

RAGGED: Towards Informed Design of Retrieval Augmented Generation Systems

Mar 14, 2024
JH
Jennifer Hsia
🏛️ Carnegie Mellon University

RAG system performance critically depends on the retriever-reader configuration, retrieval depth, and context quality; suboptimal settings often degrade performance rather than improve it. Method: We propose RAGGED, a systematic evaluation framework that—through multidimensional controlled experiments, controlled noise injection, and response attribution analysis—quantifies language models’ sensitivity spectra to contextual signals versus noise, and establishes a behavior-driven diagnostic paradigm for RAG configuration. Contribution/Results: We identify two canonical performance patterns—monotonic improvement and inverted-U—as context quality varies. Crucially, we reveal fundamental disparities across models in noise robustness and signal utilization capacity. Based on these insights, we distill reusable, model-aware configuration principles, validated across multiple DBQA benchmarks for both effectiveness and generalizability.

Analyzing retriever-reader interactions across diverse datasetsAssessing reader robustness impact on RAG stability and scalabilityEvaluating RAG system performance under varied configurations

Multi-Source Knowledge Pruning for Retrieval-Augmented Generation: A Benchmark and Empirical Study

Sep 03, 2024
SY
Shuo Yu
🏛️ University of Science and Technology of China | Kuaishou Technology

Existing RAG methods predominantly rely on single knowledge sources, rendering them inadequate for real-world scenarios requiring integration of heterogeneous, cross-domain knowledge—spanning structured (e.g., databases, tables) and unstructured (e.g., text, images) modalities—while lacking standardized benchmarks and systematic evaluation. Method: We formally define the multi-source knowledge RAG task and introduce PruningRAG, a novel framework featuring a three-stage, multi-granularity knowledge filtering mechanism: semantic similarity pruning, domain-adaptive filtering, and hierarchical attention distillation—dynamically suppressing noise and redundancy. Contribution/Results: We release the first open-source benchmark encompassing multimodal, cross-domain, structured, and unstructured knowledge. On this benchmark, PruningRAG achieves an average 12.7% improvement in QA accuracy and a 31.4% reduction in hallucination rate over state-of-the-art RAG baselines.

Developing a benchmark for diverse knowledge sourcesMitigating misinformation in language modelsMulti-source knowledge integration in RAG

Latest Papers

What's happening recently
View more

To address low semantic recall accuracy and high latency in large-enterprise knowledge base retrieval, this paper proposes a retrieval-augmented framework leveraging large language models (LLMs) to dynamically generate structured metadata. Methodologically, it integrates semantic, recursive, and naive chunking strategies; enhances vector representations via TF-IDF–weighted embeddings and prefix fusion; and employs a cross-encoder for re-ranking to construct high-quality ground-truth labels. A novel metadata consistency metric is introduced to rigorously evaluate retrieval effectiveness. Experimental results demonstrate that recursive chunking combined with TF-IDF–weighted embeddings achieves 82.5% precision, while naive chunking with prefix fusion attains a Hit Rate@10 of 0.925—both significantly outperforming content-only baselines. The framework delivers superior accuracy, low latency, and strong scalability, making it suitable for enterprise-scale knowledge retrieval.

Comparing chunking strategies and embeddings to improve retrieval accuracyEnhancing document retrieval in RAG systems using LLM-generated metadataReducing retrieval latency and optimizing enterprise knowledge base efficiency

This work addresses the challenge of generating personalized, factually accurate, and topically relevant reading materials tailored to user-specified queries and target readability levels. To this end, the authors propose a four-module system that integrates retrieval-augmented generation (RAG) with large language models (LLMs), uniquely combining RAG with multiple prompting strategies—including Chain-of-Thought, zero-shot, and few-shot prompting—for personalized reading recommendations. The system further incorporates an LLM-as-a-Judge mechanism to automatically evaluate the factual accuracy, relevance, and readability alignment of generated content. Experimental results demonstrate that RAG consistently enhances the performance of diverse models—including LLaMA 4 Scout, LLaMA 3.1 8B, and Gemma2 9B—across all prompting strategies, yielding improvements of up to 26–35 percentage points in relevance and factual accuracy, thereby enabling high-quality customized reading material generation.

content recommendationlarge language modelspersonalized reading content

This study addresses the limitations of current retrieval-augmented generation (RAG) systems in handling complex engineering documents from the oil and gas industry—particularly multimodal,图文混排 P&ID diagrams—where suboptimal chunking strategies hinder performance. For the first time in a real-world oil and gas documentation setting, the authors systematically evaluate four chunking approaches: fixed sliding window, recursive, semantic breakpoint, and structure-aware chunking, comparing their retrieval effectiveness and computational overhead within an end-to-end RAG framework. Results demonstrate that structure-aware chunking significantly outperforms other methods by preserving logical document structure, achieving superior top-K retrieval metrics while incurring lower computational costs. Moreover, all text-only chunking strategies exhibit fundamental limitations when applied to multimodal documents like P&IDs, underscoring the necessity of integrating multimodal information for effective retrieval.

document chunkingmultimodal limitationsoil and gas documents

Less LLM, More Documents: Searching for Improved RAG

Oct 02, 2025
JN
Jingjie Ning
🏛️ Carnegie Mellon University

This work addresses the challenge of improving retrieval-augmented generation (RAG) accuracy and cost-efficiency without scaling up language model (LM) parameters. We propose the “corpus–generator trade-off” principle, systematically demonstrating that expanding high-quality retrieval corpora significantly reduces reliance on large-parameter LMs. Through rigorous experimentation, we show that a medium-scale LM (e.g., 7B) augmented with a quadrupled corpus achieves performance on multiple open-domain QA benchmarks comparable to that of a much larger LM (e.g., 70B). The primary driver of improvement is increased coverage of answer-relevant passages; however, gains exhibit diminishing returns and saturate as corpus size grows. Crucially, this study provides the first quantitative characterization of corpus expansion as a viable alternative to model scaling—establishing its effectiveness, practical limits, and scalability properties. Our findings establish a new paradigm for lightweight, cost-effective RAG deployment grounded in corpus optimization rather than LM parameter growth.

Exploring corpus-generator trade-off for RAG efficiencyImproving retrieval coverage to substitute model sizeReducing LLM reliance through corpus scaling

When Retrieval Succeeds and Fails: Rethinking Retrieval-Augmented Generation for LLMs

Oct 10, 2025
YW
Yongjie Wang
🏛️ Nanyang Technological University | Tongyi Lab | Alibaba Group

Large language models (LLMs) suffer from static training data, limiting their adaptability to dynamic information updates and domain-specific tasks; meanwhile, conventional retrieval-augmented generation (RAG) exhibits diminishing marginal utility as LLM capabilities advance. This paper systematically analyzes RAG’s core components, applicability boundaries, and critical failure modes through a comprehensive literature review, multi-scenario case studies, and systematic evaluation of collaborative architectures. Results demonstrate that RAG retains indispensable advantages in complex reasoning, real-time knowledge integration, and expert-domain question answering. We propose a novel conceptualization of RAG in the LLM era—not merely as a capability “patch,” but as a synergistic enhancement paradigm targeting controllability, interpretability, and knowledge recency. The study establishes a theoretical framework and practical design principles for next-generation RAG systems that are lightweight, precise, and verifiable.

Analyzing limitations of LLMs with static training dataEvaluating effectiveness of retrieval-augmented generation systemsIdentifying scenarios where RAG enhances LLM performance

Hot Scholars

ZJ

Zhi Jin

Sun Yat-Sen University, Associate Professor
YS

Yangqiu Song

HKUST
Artificial IntelligenceData MiningNatural Language ProcessingKnowledge Graphs
KG

Kun Gai

Senior Director & Researcher, Alibaba Group
Machine LearningComputational Advertising
JZ

Jingren Zhou

Alibaba Group, Microsoft
Cloud ComputingLarge Scale Distributed SystemsMachine LearningQuery Processing
PW

Pengfei Wan

Head of Kling Video Generation Models, Kuaishou Technology
Generative ModelsComputer VisionMultimodal AIComputer Graphics