English

P$^2$RAG: Efficient Privacy-Preserving RAG Service Supporting Arbitrary Top-$k$ Retrieval

Cryptography and Security 2026-05-29 v2 Artificial Intelligence

Abstract

Retrieval-Augmented Generation (RAG) enables large language models to use external knowledge, but outsourcing the RAG service raises privacy concerns for both data owners and users. Privacy-preserving RAG systems address these concerns by performing secure top-kk retrieval, which is typically implemented using secure sorting to identify relevant documents. However, existing systems face challenges supporting arbitrary kk due to their inability to change kk, new security issues, and in particular, efficiency degradation with large kk. This is a significant limitation because applications such as finance, law, and healthcare require a kk that is large enough to cause huge overhead for existing systems. Also, modern long-context models generally achieve higher accuracy with larger retrieval sets. We propose P2^2RAG, an efficient privacy-preserving RAG service that supports arbitrary top-kk retrieval. Unlike existing systems, P2^2RAG avoids sorting candidate documents. Instead, it uses an interactive bisection method to determine the set of top-kk documents. For security, P2^2RAG uses secret sharing on two semi-honest non-colluding servers to protect the data owner's database and the user's prompt. It enforces restrictions and verification to defend against malicious users and tightly bounds the information leakage of the database. The experiments show that P2^2RAG is 3--300×\times faster than the state-of-the-art PRAG for k=16k = 16--10241024.

Keywords

Cite

@article{arxiv.2603.14778,
  title  = {P$^2$RAG: Efficient Privacy-Preserving RAG Service Supporting Arbitrary Top-$k$ Retrieval},
  author = {Yulong Ming and Mingyue Wang and Jijia Yang and Jie Xu and Zihan Wu and Cong Wang and Xiaohua Jia},
  journal= {arXiv preprint arXiv:2603.14778},
  year   = {2026}
}

Comments

14 pages, 3 figures

R2 v1 2026-07-01T11:21:23.442Z