StateRAG: Typed State Contracts for Complex Retrieval-Augmented Generation

Miaohe Niu, Pengxiang Li, Jingbo Zhu, Tong Xiao
5/25/2026
cs.CL
rag

No confident code implementation found for this paper.

Abstract

Complex retrieval-augmented generation requires evidence retrieval and control over what to retrieve next, which paths to explore, whether evidence is sufficient, and which intermediate results to retain. Existing RAG paradigms encode these decisions through method-specific model contexts, traversal procedures, verification signals, and memory. We introduce StateRAG, which represents retrieval control as a typed state external to the final reader. The state records the query plan, typed traversal path, candidate evidence, verification verdict, and reusable artifacts, with defined field semantics and designated update sources. Ordered role operators propose field values, and the controller validates and commits accepted proposals. A one-time compact-evidence check may select Bypass. Otherwise, the controller combines the committed verdict with the remaining budget to select Release, Revise, or Fallback. The final reader is invoked only after a terminal action and at most once per query. Among the evaluated methods, StateRAG achieves the best score on 10 of 11 reported quality metrics across LongBench, QASPER, and DocVQA. Its LongBench macro-average EM and F1 exceed ReAct by 6.3 and 6.1 percentage points, and its largest task-level gain is 9.8 F1 points on MuSiQue. Under normalized model-size weighting, StateRAG records lower mean LLM-token use per query than ReAct across all five workloads. In a matched LongBench control, the typed, role-owned carrier exceeds a free-form shared carrier by 1.3, 2.2, and 3.0 percentage points in macro EM, F1, and accuracy, with 6.2% lower mean RET. Removing TAM, MARS, or SMP lowers every reported LongBench and QASPER ablation metric.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{niu2026staterag,
  title  = {StateRAG: Typed State Contracts for Complex Retrieval-Augmented Generation},
  author = {Miaohe Niu and Pengxiang Li and Jingbo Zhu and Tong Xiao},
  year   = {2026},
  eprint = {2605.25379},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.25379v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.25379.svg)](https://codeofpaper.com/paper/2605.25379)

Discussion