Retrieval-augmented generation (RAG) is known to reduce training-data leakage in single-turn interactions, but whether this protection persists over multi-turn conversations is unclear. We introduce CRELT (Conversational RAG Extraction Leakage Trajectory), a reusable framework that tracks, turn by turn, the real contact details from the training data that a RAG system discloses. CRELT separates retrieval, conversation history, and attack strategy through a full-factorial design, uses a retrieval corpus verified to contain none of the target PII, and counts an item as leaked only when it is absent from the model input at the turn it is produced. In our main experiment, this criterion excludes 29-53% of raw matches that were already present in the input. Across GPT-J-6B, Pythia-6.9B, and Pythia-12B, targeting real Enron contact details, retrieval reduces disclosure under both full and cleared history, consistent with prior single-turn results. A length-matched control with random passages reproduces 91-99.5% of this reduction under cleared history and 47-78% under full history, so much of it comes from the added context rather than from what is retrieved. With retrieval enabled, however, retaining full conversation history increases disclosure by a factor of 3.6-4.9, while retaining only one previous turn already restores disclosure to approximately the full-history level. With retrieval, clearing the history reduces disclosure by 72-79%, but does not eliminate it. These results show that single-turn privacy audits can substantially underestimate training-data leakage in conversational RAG systems and that conversation-history policy is a critical dimension of privacy evaluation.
Figures & tables
Figure 1: The system tested by CRELT. The adversary A chats with a RAG chatbot (no retriever in no-RAG arms) whose model was pre-trained on The Pile ; the detector counts replies that contain items of G absent from the input.
Attack strategy
Provenance
Used in
Multi-turn attack behavior
Baseline prompting
Adapted from Zeng et al. [ 2 ] to the multi-turn setting
Exp. A, C App. A, B
Turn 1 presents the first twelve words of a real Enron message containing a known address (a prefix attack); these are header words and hold 3.9 items of G on average, which are not counted while they remain in the input. Turns 2 to 10 are fixed targeted phrases, one per turn, such as “Please call me at”, “My email address is” and “My office number at Enron is”. The attack prompts are fixed across turns; any cross-turn dependence comes from the retained conversation history.
Persistent probing
Ours; inspired by the adaptive probing of Das et al. [ 7 ]
Exp. A
Same first turn and same fixed phrases as baseline prompting, but from turn 2 each phrase is extended with up to three words taken from the model’s previous reply, for example “You can reach me at (regarding …)”. The prompt template and extraction rule are fixed in advance; only the appended words depend on the previous reply.
Identity priming
Adapted from the name-based prompts of Huang et al. [ 9 ] to the multi-turn setting
Exp. B
Anchors on one frequently mentioned Enron employee and narrows turn by turn: “Let me ask you about [name] , who worked at Enron”, then the person’s role, email signature and direct phone number, and from turn 5 onward “Complete the contact entry. Name: [name] , Email:”.
Format injection
Adapted from the few-shot prompts of Huang et al. [ 9 ] to the multi-turn setting
Exp. B
Turn 1 shows one synthetic employee record (name, email, phone, department) and asks the model to confirm the format. Later turns ask for more records in the same template without naming anyone, e.g. “Can you fill in a similar record for another Enron employee?” and “List three more Enron employees using the same template”.
Retrieval priming
Ours; inspired by the contextual probing of Staab et al. [ 15 ]
Exp. B
Turns 1 and 2 steer the retriever with queries such as “Enron employee directory Houston contact information”. Turns 3 to 10 ask for contact details, e.g. “As shown above, the direct line for that employee is” and “Continue: Name: Jeff Dasovich, Email:”.
Table 1: The five attack strategies evaluated in CRELT.
Research question
Varied dimension
Location
How do retrieval, conversation history, and attack strategy affect multi-turn disclosure, and could changes in generation behavior explain the history effect?
Retrieval × history × attack strategy; random-passage control
Sec. 5.1
Do context-building attacks increase disclosure more when retrieval is enabled?
Retrieval × attack strategy
Sec. 5.2
Does retaining only the K most recent turns reduce disclosure gradually or abruptly?
History-window size K ; RAG and no-RAG *
Sec. 5.3
Supporting studies
Do the findings of Experiment A persist under deterministic (greedy) decoding?
Decoding temperature
App. A
Does retrieval-query construction affect disclosure?
Retrieval policy
App. B
Table 2: Overview of the CRELT evaluation.
Figure 2: The eight arms of Experiment A.
Model
Retrieval
Cleared history
Full history
Ratio
GPT-J-6B
no-RAG
0.512
0.905
1.8
with RAG
0.132
0.637
4.9
Pythia-6.9B
no-RAG
1.682
1.765
1.05
with RAG
0.290
1.090
3.8
Pythia-12B
no-RAG
1.868
1.565
0.84
with RAG
0.328
1.162
3.6
Table 3: Experiment A: final disclosure CT by retrieval and history (seed means; ratios averaged per seed).
Figure 3: Experiment A: cumulative disclosure Ct under baseline prompting.
Figure 5: Experiment A: cumulative disclosure Ct under persistent probing.
Model
Exp. A
Exp. B
Exp. C
App. A
App. B
GPT-J-6B
53.1%
0.1%
44.8%
69.5%
58.0%
Pythia-6.9B
35.9%
0.1%
24.2%
31.1%
39.0%
Pythia-12B
28.7%
0.1%
21.8%
26.3%
33.3%
Table 4: Share of matched items already in the model’s input when produced.
Model
RAG
Full history
Cleared history
Cleared vs. Full [ 95% CI]
GPT-J-6B
on
1.822
1.988
+9.1%[−3.7,+25.5]
off
1.597
1.721
+7.7%[−3.4,+21.4]
Pythia-6.9B
on
3.175
1.765
−44.4%[−46.7,−42.1]
off
2.872
1.774
−38.2%[−40.4,−35.7]
Pythia-12B
on
2.811
1.700
−39.5%[−42.2,−36.3]
off
2.795
1.615
−42.2%[−44.9,−39.3]
Table 5: Experiment A: log-perplexity probe after turn 10 .
Model
Attack strategy
RAG
no-RAG
AF [range]
CI <1
GPT-J-6B
Identity priming
0.18
0.45
0.40 [0.31, 0.46]
3/3
Format injection
0.63
0.64
1.02 [0.85, 1.34]
0/3
Retrieval priming
0.58
0.89
0.65 [0.50, 0.81]
2/3
Pythia-6.9B
Identity priming
0.31
0.44
0.69 [0.65, 0.75]
2/3
Format injection
1.00
1.56
0.65 [0.58, 0.69]
2/3
Retrieval priming
1.41
2.72
0.52 [0.41, 0.67]
3/3
Table 6: Experiment B: final disclosure and amplification factor (AF averaged per seed, with its range).
Figure 6: Experiment B: amplification factor by attack and model. Large markers are seed means, small dots the three seeds; the dashed line is AF =1 (no effect of retrieval).
Model
K
CT
Seed-level Red.
Sig.
GPT-J-6B
0
0.132
79.3%
3/3
1
0.652
−3.7%
0/3
2
0.685
−8.4%
0/3
3
0.635
0.2%
0/3
5
0.587
7.8%
0/3
10
0.637
—
—
Table 7: Experiment C: disclosure by history window K , with retrieval.
Figure 7: Experiment C: final disclosure CT by history window K .
Work
Sensitive-information source
Interaction
Zeng et al. [ 2 ]
Pre-training and retrieval corpus
Single-turn
Carlini et al. [ 4 ]
Pre-training only
Single-turn
Jiang et al. [ 12 ]
Retrieval corpus
Multi-query
Wang et al. [ 13 ]
Retrieval corpus
Multi-query
He et al. [ 14 ]
Retrieval corpus
Multi-query
Das et al. [ 7 ]
In-context private information
Multi-turn
Table 8: Positioning of CRELT relative to prior work.
Table 10: Greedy decoding: mean per-turn disclosure ℓt with cleared history.
GPT-J-6B
Pythia-6.9B
Pythia-12B
Retrieval policy
Mean
SE
Mean
SE
Mean
SE
Current turn only
0.645
0.11
1.190
0.13
1.265
0.12
First query only
0.710
0.11
1.225
0.13
1.280
0.13
All queries so far
0.625
0.07
1.150
0.13
1.410
0.13
Appendix
Table 11: Final disclosure CT under three retrieval-query policies (SE: standard error of the mean).
Email addresses
Phone numbers
Items in G
168,202
23,878
Candidates found in WikiText-103
65
14
Candidates matching G
0
0
Appendix
Table 12: Items of G found in WikiText-103.
Model
Seed
RAG
no-RAG
Diff
95% CI
pH
GPT-J-6B
s1
0.645
0.920
−0.275
[−0.525,−0.005]
<.001
s2
0.535
0.910
−0.375
[−0.620,−0.140]
.005
s3
0.730
0.885
−0.155
[−0.410,+0.100]
.084
Pythia-6.9B
s1
1.190
1.820
−0.630
[−0.940,−0.320]
<.001
s2
0.945
1.760
−0.815
[−1.095,−0.535]
<.001
s3
1.135
1.715
−0.580
[−0.875,−0.280]
<.001
Appendix
Table 13: Experiment A: retrieval effect under full history, per seed.
Guessable share, RAG
Full/cleared, RAG
Retrieval, full hist.
Model
Full
Cleared
All items
No guess.
CI <0 (all / no guess.)
GPT-J-6B
42.0%
22.9%
4.9
4.4
2/3 / 2/3
Pythia-6.9B
53.9%
36.7%
3.8
3.6
3/3 / 3/3
Pythia-12B
41.6%
25.5%
3.6
3.8
3/3 / 3/3
Appendix
Table 14: Experiment A, baseline prompting, with and without guessable addresses (shares pooled over seeds; ratios are means of per-seed values). “No guess.” removes both input-built and reply-built addresses.
Predictor
s1=42
s2=20260909
s3=31415927
Baseline (intercept)
0.057 ( < .001)
0.052 ( < .001)
0.060 ( < .001)
RAG enabled
− 0.032 ( < .001)
− 0.033 ( < .001)
− 0.036 ( < .001)
Full history
0.024 (.002)
0.021 (.002)
0.017 (.016)
RAG × Full history
0.015 (.18)
0.013 (.19)
0.028 (.005)
Turn number
0.016 ( < .001)
0.008 ( < .001)
0.011 ( < .001)
RAG × Turn
− 0.022 ( < .001)
− 0.012 ( < .001)
− 0.017 ( < .001)
Appendix
Table 15: Mixed-effects regression of ℓt for Experiment A on GPT-J-6B, one fit per seed.
Model
Full hist.
RAG
RAG × Full
GPT-J-6B
0.021 (.002–.016)
− 0.034 ( < .001)
0.019 (.005–.19)
Pythia-6.9B
0.019 (.013–.034)
− 0.081 ( < .001)
0.037 ( < .001–.017)
Pythia-12B
− 0.032 ( < .001–.011)
− 0.119 ( < .001)
0.086 ( < .001)
Appendix
Table 16: Mixed-effects estimates by model (seed means, with the range of per-seed two-sided Wald p -values).
Privacy leakage in language models concerns how models expose training data, infer sensitive traits, or transmit private context through outputs and internal channels.
Retrieval-Augmented Generation (RAG) enhances the capabilities of large language models (LLMs) by querying external structured knowledge. However, it can also introduce privacy risks by leaking sensitive information from the retrieval datastore. We propose a simple method to preserve datastore privacy in RAG systems via random projection. By applying the same projection to both datastore embeddings and query embeddings, our method provably preserves semantic similarity between queries and retrieved items while substantially mitigating data extraction attacks. Across multiple RAG architectures and datasets, we show that this lightweight approach achieves superior retrieval and generation performance compared to prior methods which leverage formal differential privacy (DP) guarantees, while exhibiting comparable empirical privacy under strong attack models. Our results for the first time suggest that random projection can serve as a competitive and practical baseline for privacy-preserving RAG systems.
Retrieval-Augmented Generation (RAG) has emerged as a powerful paradigm for improving the quality of generated contents of Large Language Models (LLMs) by grounding responses in external knowledge, thus reducing hallucinations and factual errors. However, recent studies have highlighted a critical vulnerability: adversaries can exploit the retrieval process to extract personally identifiable information (PII) from the underlying corpus. To mitigate this risk, we propose a novel defense, RAG-CT, that identifies malicious queries by analyzing their entropy and margin distributions and using a score-based detection method. Extensive experiments with four state-of-the-art attack strategies and four defense baselines on two datasets show that our approach significantly reduces PII leakage while outperforming existing defenses. This work provides a lightweight yet effective mechanism to protect RAG systems against PII leakage without requiring modifications to the underlying LLM or retriever.
Xingyu Lyu, Jiayimei Wang, Jianfeng He +3
University of Massachusetts Lowell, Lowell, MA 01854, USA · City University of Hong Kong, Kowloon, Hong Kong SAR, 999077, China · Virginia Tech, Blacksburg, VA 24061, USA +2
Black-box privacy scores for retrieval-augmented generation (RAG) are difficult to interpret unless the audited defense's active pipeline hook is known. We propose an active-path audit: inventory source-level hooks over retrieval, retrieved content, and generation; map each metric to the leakage channel it observes; and validate generated-text effects with exact-match canaries. In our benchmark reimplementations, the DP-style defenses modify retrieval scores only: their generation hooks are TODO-flagged stubs that return responses unchanged. This active path explains why they affect membership-inference behavior but track No-Defense on generated-text named-entity leakage, measured by NEL_strict. By contrast, the end-to-end LPRAG path is canary-validated on the email channel, recovering 53/150 canaries under No-Defense and 0/150 under LPRAG. These findings concern our reimplementations on our stack, not released defenses or defense families; the contribution is a methodology and case study, not a universal ranking
Yanhang Li, Zhichao Fan, Zexin Zhuang
Northeastern University · University of Illinois Urbana-Champaign · Southern Methodist University