Seedlabs
Source research

SeCon-RAG: A Two-Stage Semantic Filtering and Conflict-Free Framework for Trustworthy RAG

Xiaonan Si, Meilin Zhu, Simeng Qin, Lijia Yu, Lijun Zhang, Shuaitong Liu et al. · 2025 · 5 citationsRead the paper

Retrieval-augmented generation (RAG) systems enhance large language models (LLMs) with external knowledge but are vulnerable to corpus poisoning and contamination attacks, which can compromise output integrity. Existing defenses often apply aggressive filtering, leading to unnecessary loss of valuable information and reduced reliability in generation. To address this problem, we propose a two-stage semantic filtering and conflict-free framework for trustworthy RAG. In the first stage, we perform a joint filter with semantic and cluster-based filtering which is guided by the Entity-intent-relation extractor (EIRE). EIRE extracts entities, latent objectives, and entity relations from both the user query and filtered documents, scores their semantic relevance, and selectively adds valuable documents into the clean retrieval database. In the second stage, we proposed an EIRE-guided conflict-aware filtering module, which analyzes semantic consistency between the query, candidate answers, and retrieved knowledge before final answer generation, filtering out internal and external contradictions that could mislead the model. Through this two-stage process, SeCon-RAG effectively preserves useful knowledge while mitigating conflict contamination, achieving significant improvements in both generation robustness and output trustworthiness. Extensive experiments across various LLMs and datasets demonstrate that the proposed SeCon-RAG markedly outperforms state-of-the-art defense methods.

What the full text shows

Working prototype
  • SeCon-RAG improved answer accuracy (ACC) and reduced attack success rate (ASR) across multiple LLMs compared to VanillaRAG and other defense methods. — ACC up to 98.0% and ASR down to 0.0% (MS-MARCO, Mistral-12B) (Under Prompt Injection Attack (PIA) and corpus poisoning scenarios)
  • SeCon-RAG outperformed TrustRAG in accuracy on the MS-MARCO dataset using Mistral-12B. — 98.0% ACC vs 85.0% ACC (Clean setting, Mistral-12B model)
  • SeCon-RAG reduced ASR significantly compared to VanillaRAG under 100% corpus poisoning. — 0.8% ASR vs 40.0% ASR (HotpotQA, Mistral-12B) (100% corpus poisoning, Mistral-12B model)
Setup
Tested on Natural Questions (NQ), HotpotQA, and MS-MARCO datasets using five LLMs (Mistral-12B, Qwen-7B, LLaMA-3.1-8B, GPT-4o, DeepSeek-R1) on NVIDIA A100-SXM4-40GB GPUs.
How
The framework uses a two-stage process: first, a joint semantic and cluster-based filter guided by an Entity-intent-relation extractor (EIRE) to clean the retrieval database; second, a conflict-aware filtering module to remove contradictions between queries, candidate answers, and retrieved knowledge.
Limitations
Moderate inference latency due to multiple LLM calls for extraction and decision-making. · Dependency on high-quality semantic extraction. · Requirement of a small set of manually verified clean documents (Dcor).

Summarized by Gemma 4 from the open-access full text · 12 Nov 2026. Read it