Research & Papers

RAGP compresses prompts 4x using graph pruning and Lévy walks

Outperforms LongLLMLingua even at higher compression ratios—here's how.

Deep Dive

Existing prompt compression methods treat text as flat token sequences, missing the distributed nature of important information that spans local syntactic dependencies and global semantic relations. To address this, researchers from multiple institutions propose RAGP (Redundancy-Aware Graph Pruning), which models a prompt as a multiplex graph—where tokens or sentences become nodes and dependencies become edges. This heterogeneous structure includes both fine-grained attention-based dependencies and coarse-grained semantic relations. To efficiently prune redundant nodes while preserving essential information, RAGP employs Lévy walks, whose heavy-tailed step distribution naturally balances local exploitation and global exploration.

Evaluated on the LongBench benchmark, RAGP achieves an average score of 49.3 under a 4x compression ratio, outperforming existing LLM-based compression methods like LongLLMLingua (48.8 at only 3x compression). The method also surpasses state-of-the-art vision-based text compression paradigms on multiple tasks. By framing prompt compression as graph pruning, RAGP offers a more structured and efficient approach to reducing token costs without sacrificing performance, making it particularly valuable for long-context applications in production systems.

Key Points
  • RAGP transforms prompts into a multiplex graph with attention-based and semantic edges
  • Uses Lévy walks for efficient pruning—heavy-tailed steps balance local and global search
  • Achieves 49.3 on LongBench at 4x compression, beating LongLLMLingua's 48.8 at 3x

Why It Matters

Cuts token costs 4x while improving accuracy—game-changer for long-context LLM applications.

📬 Get the top 10 AI stories daily