Private-RAG: Answering Multiple Queries with LLMs while Keeping Your Data Private
Ruihan Wu, Erchi Wang, Zhiyuan Zhang, Yu-Xiang Wang
TL;DR
This work tackles the challenge of answering multiple queries with retrieval-augmented generation (RAG) while preserving privacy of a sensitive external corpus. It introduces MuRAG and MuRAG-Ada, two differentially private multi-query RAG algorithms that use per-document Rényi DP filters to bound privacy loss based on how often each document is retrieved, avoiding naive composition over queries. MuRAG employs a fixed relevance threshold, whereas MuRAG-Ada privately releases query-specific thresholds to better handle correlated queries; both can incorporate any single-query private RAG method and prove DP guarantees. Empirical results across standard QA tasks, a correlated multi-hop dataset, and a privacy-sensitive ChatDoctor setting show that the methods achieve practical utility for hundreds of queries within $\varepsilon \approx 10$, and MuRAG-Ada especially excels with correlated queries while defending against multi-query membership inference attacks. The work offers a principled, scalable path toward private RAG deployment in real-world, multi-query environments.
Abstract
Retrieval-augmented generation (RAG) enhances large language models (LLMs) by retrieving documents from an external corpus at inference time. When this corpus contains sensitive information, however, unprotected RAG systems are at risk of leaking private information. Prior work has introduced differential privacy (DP) guarantees for RAG, but only in single-query settings, which fall short of realistic usage. In this paper, we study the more practical multi-query setting and propose two DP-RAG algorithms. The first, MURAG, leverages an individual privacy filter so that the accumulated privacy loss only depends on how frequently each document is retrieved rather than the total number of queries. The second, MURAG-ADA, further improves utility by privately releasing query-specific thresholds, enabling more precise selection of relevant documents. Our experiments across multiple LLMs and datasets demonstrate that the proposed methods scale to hundreds of queries within a practical DP budget ($\varepsilon\approx10$), while preserving meaningful utility.
