From Retrieved Context to Runtime Control: Adaptive Compression for Edge-based RAG

Zlatan Feric, Amir Taherin, Yanzhi Wang, David KaeliarXiv 2026

TL;DR

Running Retrieval-Augmented Generation (RAG) on edge devices is heavily bottlenecked by the energy and latency costs of processing long retrieved contexts. While context compression can mitigate this, the compressor itself consumes precious on-device resources. This paper demonstrates that instead of using a fixed compression rate, edge systems should use a telemetry-informed runtime controller to dynamically adjust compression, unlocking up to 53% GPU energy savings with negligible impact on response quality.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) is a powerful way to keep Large Language Models (LLMs) accurate and up-to-date by injecting relevant document passages directly into the prompt. However, when you move RAG from massive cloud data centers to resource-constrained edge devices (like robotics, smart glasses, or local privacy-focused agents), a major problem emerges: tokens are expensive.

Every retrieved passage lengthens the prompt, which drastically increases prefill latency, memory traffic, and energy consumption on edge System-on-Chips (SoCs). Context compression—pruning irrelevant words or sentences before feeding them to the LLM—seems like an obvious fix. But on an edge device, compression isn't free. The compressor runs on the exact same chip as the LLM, consuming its own share of time and power. If you only compress a little bit, the overhead of running the compressor can actually make your system less efficient than not compressing at all.

Existing systems use a static, one-size-fits-all compression rate decided offline. The authors argue that this completely ignores live device states (like battery levels or thermal throttling) and workload variations.

Methods

The authors build and evaluate an edge RAG pipeline on the NVIDIA Jetson AGX Thor platform. They evaluate a suite of open-source LLMs, specifically the Llama-3.2/3.1 (1B, 3B, 8B) and Qwen-2.5 (1.5B, 3B, 7B) families running in fp16 precision.

For the context compression stage, they employ LLMLingua-2, a state-of-the-art, lightweight, extractive hard-compression method. Unlike abstractive methods that use an LLM to summarize text (adding massive autoregressive overhead), LLMLingua-2 uses a smaller model to directly drop low-importance tokens from the text.

The core methodology involves sweeping the compression rate (the fraction of tokens kept, from 1.0 down to 0.15) while continuously monitoring hardware telemetry (latency, power, memory utilization, and temperature) using a stage-level RAG benchmarking framework called RAGMark. This allows them to map out the exact trade-offs between hardware efficiency and answer accuracy.

Overview of the proposed telemetry-informed adaptive compression framework for edge RAG.

Datasets

The evaluation relies on two standard open-domain question-answering benchmarks via the FlashRAG framework:

  • Natural Questions (NQ): A dataset consisting of real Google search queries.
  • HotpotQA: A multi-hop reasoning dataset that requires gathering information across multiple retrieved passages.

For each configuration, they evaluate 100 seed-paired queries against an index built from a 2018 English Wikipedia corpus (~9.4 million passages).

Key Insights and Ideas

  • The "Generation Dominance" Threshold: For smaller models (1B parameters), embedding and retrieval dominate the execution budget, leaving very little headroom for compression to help. However, once a model scales past 3B parameters, the generator completely dominates the budget, accounting for roughly 90% of per-query latency and 91% of GPU energy. This is where compression becomes highly viable.
  • The Two Knees of Compression: Plotting accuracy (F1 score) against energy savings reveals two distinct inflection points or "knees."
    • The Efficiency Knee (Rate = 0.7 to 0.9): Mild compression is a net loss. The fixed overhead of running LLMLingua-2 (130–310 ms) outweighs the minor savings of dropping only 10-20% of tokens.
  • The Quality Knee (Rate = 0.3): Compressing down to 30% of the original size represents a stable, safe-aggressive sweet spot. Compressing any further (< 15% tokens kept) causes accuracy to collapse because the LLM can no longer reconstruct meaning from the heavily butchered context.
Figure 3: Answer F1 (left axis) and per-query GPU energy (right axis) vs. LLMLingua-2 rate on HotpotQA. Shaded band: adaptive operating room between the two dotted-line knees.

Key Results

  • Massive Net Energy Savings: At the optimal safe-aggressive setpoint (keeping 30% of tokens), the system achieved up to 53.2% GPU energy reduction and up to 48.2% total SoC energy savings for the Llama-8B model (at retrieval depth $k=10$) with negligible quality loss.
  • The Cost of Mild Compression: Conversely, setting a mild compression rate of 0.9 resulted in a 1% to 13% increase in net energy usage across workloads due to unamortized compressor overhead.
  • Workload-Dependent Scaling: The quantitative benefit of compression scales dramatically with workload weight. Moving from $k=5$ to $k=10$ on Llama-8B nearly doubles the latency savings (from +25.2% to +32.6%), proving that a dynamic runtime controller has substantial room to optimize based on context length.
Net GPU energy delta and accuracy delta comparing mild (0.9) vs. safe-aggressive (0.3) compression rates against an uncompressed baseline.

Limitations and Future Work

While this paper establishes a strong case for runtime control, the authors note several areas for future exploration:

  1. Compressor Variety: The study only uses LLMLingua-2. Exploring streaming, token-level, or hardware-accelerated compressors could shrink the "negative-savings" region seen at milder compression rates.
  2. Quantization Effects: The experiments were conducted using fp16 models. In production, edge LLMs are typically quantized to 4-bit integers, which drastically alters memory bandwidth dynamics and could shift where the efficiency "knees" occur.
  3. Multi-Knob Control: Context compression is just one variable. A truly holistic edge RAG controller should dynamically balance compression rate alongside retrieval depth ($k$), reranker cutoffs, and query rewriting steps under a unified token and energy budget.

Summary updated

BibTeX
@misc{feric2026from,
  author = {Zlatan Feric and Amir Taherin and Yanzhi Wang and David Kaeli},
  title = {{From Retrieved Context to Runtime Control: Adaptive Compression for Edge-based RAG}},
  year = {2026},
  eprint = {2608.19535},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.19535},
}
Figure