Original title: ContextGuard-RAG: Contextual Integrity-Aware Retrieval-Augmented Generation with Multi-Agent Privacy Enforcement for Sensitive Document Question Answering
Faisal Alhwikem, Amir Raza Khan, Fawwad Hassan Jaskani · September 2026
Retrieval-augmented generation, or RAG, helps artificial intelligence answer questions accurately by finding and reading relevant documents. However, these systems can accidentally leak sensitive information when sharing it breaks real-world privacy expectations. This problem happens because current defenses do not track who sent the data, who receives it, or why it is being shared. To fix this, researchers created ContextGuard-RAG. It protects data through three coordinated steps. First, it tags retrieved documents with social sharing rules. Next, a special ranking filter removes any documents that break those rules. Finally, a protective agent cleans up the final answer so the system does not leak secrets through indirect clues or guesses. Across medical, legal, and privacy tests, ContextGuard-RAG reduced privacy violations by about 34 percent compared to standard RAG. It also kept answer accuracy nearly identical to the best baseline and resisted adversarial attacks across four different language models.
Imagine you are a librarian who hands out documents to people. Normally you check if the person is allowed to see the document. But now suppose the document itself has rules about who can see it and for what purpose, and those rules change depending on who asks and why. If you just hand over the document without checking those rules, you might give a patient's medical record to a researcher who should only see anonymized data. In this paper, the system checks those rules before retrieving and before generating an answer, and it also cleans up the answer to avoid revealing information indirectly.
In legal, medical, and enterprise settings, information must flow only between specific roles and for specific purposes. Current AI question-answering systems can expose facts in ways that violate these norms, even if the facts themselves are not confidential. ContextGuard-RAG reduces such violations by about a third, making AI assistants safer for sensitive documents without sacrificing answer quality.
The abstract doesn't explicitly state limitations, but it indicates that the evaluation is limited to three benchmarks (PrivacyQA, MedQA, LegalBench) and four backbone LLMs. The framework requires document metadata specifying sender, recipient, subject, and transmission norms, which may not always be available. It reduces but does not eliminate CI violations.
Ask anything about this paper. Answers come from its abstract, and say so when the abstract doesn't cover your question.
ContextGuard-RAG: Contextual Integrity-Aware Retrieval-Augmented Generation with Multi-Agent Privacy Enforcement for Sensitive Document Question Answering — Faisal Alhwikem, Amir Raza Khan, Fawwad Hassan Jaskani — Symmetry — doi:10.3390/sym18091572
Abstract licence: CC BY
Explanation generated by Synthesis from the abstract — it is not the original paper.