Paper 2026/709

zkRAG: Efficiently Proving RAG Retrieval in Zero Knowledge

Yanze Jiang, National University of Singapore
Xinyang Yang, National University of Singapore
Xuanming Liu, Zhejiang University
Yanpei Guo, National University of Singapore
Jiaheng Zhang, National University of Singapore
Abstract

Retrieval-augmented generation (RAG) systems critically depend on a vector-retrieval stage that selects relevant documents from a large embedding database. In a RAG-as-a-Service setting, however, clients have no visibility into the server's proprietary embeddings and index structures, and thus cannot distinguish faithful execution from arbitrary deviations. This motivates service consistency for retrieval: the returned results must be consistent with executing an agreed approximate nearest neighbor search (ANNS) algorithm on a fixed, committed database together with a fixed, committed ANNS index, while revealing nothing beyond the outputs themselves. We present the first polynomial interactive oracle proof (PIOP) tailored to the widely deployed HNSW ANNS algorithm. Building on this PIOP, we introduce zkRAG, a zero-knowledge, succinct, non-interactive argument for RAG retrieval that enables practical verification. Our design achieves asymptotically optimal online prover efficiency, with prover time linear in the HNSW search trace length, while keeping verification succinct. We introduce several new techniques that may be of independent interest, including a hybrid lookup argument, a highly efficient checker-based PIOP for checking priority-queue updates, and an efficient checker for membership selector vectors. For a benchmark with $10^6$ vectors of dimension $128$, single-thread zkRAG proves a typical HNSW query in $50$ seconds-over $1000\times$ faster than existing baselines--while keeping verification lightweight, demonstrating the feasibility of efficient zero-knowledge service-consistent RAG retrieval.

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Preprint.
Keywords
zero-knowledge proofsRAGverifiable vector retrievalapproximate nearest neighbors
Contact author(s)
yanzejiang @ u nus edu
e1374509 @ u nus edu
hinsliu @ zju edu cn
guo yanpei @ u nus edu
jhzhang @ nus edu sg
History
2026-04-12: approved
2026-04-11: received
See all versions
Short URL
https://ia.cr/2026/709
License
Creative Commons Attribution-NonCommercial-NoDerivs
CC BY-NC-ND

BibTeX

@misc{cryptoeprint:2026/709,
      author = {Yanze Jiang and Xinyang Yang and Xuanming Liu and Yanpei Guo and Jiaheng Zhang},
      title = {{zkRAG}: Efficiently Proving {RAG} Retrieval in Zero Knowledge},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/709},
      year = {2026},
      url = {https://eprint.iacr.org/2026/709}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.