A research technique called RAGP compresses long AI prompts by modeling text as a graph network instead of a flat string of tokens.
Most prompt compression tools scan text linearly, which misses the way meaning actually spreads across a document — through sentence structure, cross-paragraph references, and semantic echoes. RAGP builds a multiplex graph where tokens or sentences become nodes and their relationships become edges, then prunes that graph to remove redundant information. To navigate the mix of dense local clusters and sparse long-range connections, it uses Lévy walks — a search pattern whose occasional long jumps help it escape local traps and cover global structure. On the LongBench benchmark, RAGP scores 49.3 at a 4x compression ratio, edging out LongLLMLingua's 48.8 — which it hit only at the less aggressive 3x ratio.
The gap matters because compression ratio and quality usually trade off hard: squeezing more out tends to degrade output. Beating a competitor on both dimensions simultaneously is the kind of result that earns attention from teams trying to cut inference costs without sacrificing accuracy. The method also claims wins over image-based text compression approaches, which broadens the comparison beyond the obvious LLM-only field.
The code is published under an anonymous repository, which is standard for blind peer review — so treat the benchmark numbers as promising but not yet independently replicated.