Confundo: Learning to Generate Robust Poisoning Content for Real RAG SystemsConfundo: Learning to Generate Robust Poison for Practical RAG Systems
Confundo fine-tunes a poisoning generator; factual manipulation ASR on Harry Potter with Llama3-8b is 88% (Figure 8).
The attacker wants the target RAG to output a specified wrong answer, specific bias, or hallucination for a predetermined question. They do not know the document processing, retriever, generator, and configuration, and cannot query the system; they can only prepare documents that will be ingested. Section 6.2 calls this black-box.
- Real RAG systems chunk documents, and user queries often differ from those at design time, so existing poisoning becomes weaker and deployers may underestimate the risk. Confundo aims to still induce false facts, biases, or hallucinations under these conditions.
- Poisoning is formulated as reward optimization, with GRPO fine-tuning Qwen3-0.6b as the generator. Rewards cover retrieval similarity, target behavior on a surrogate model, query paraphrasing and random chunking, as well as length and perplexity. Short poisoned texts are embedded into documents to be ingested.
- Harry Potter, Llama3-8b exact queries: Confundo 88%, AuthChain 54% (Figure 8). Qwen3-8b has a negative rate of 60% on PROCON and a hallucination rate of 98% on RAGTruth; Llama3-8b has a hallucination rate of 95%.
- The paper does not have a dedicated section discussing limitations. The Conclusion states that more robust defenses are needed and positions the work as a foundation for studying multi-objective poisoning and mitigation. Experiments cover three attack objectives, black-box transfer, and three defenses; the number of questions, number of repetitions, and the determination method for factual ASR are not reported.
- Evaluated models
- Qwen3-8bLlama3-8bGemini-2.5-ProDeepSeek-LLM-7B-Chatbge-small-en-v1.5all-MiniLM-L6-v2contrievere5-base-v2
- Benchmarks
- Harry PotterNewsQAOCR-BenchPROCONRAGTruth
- Metrics
- ASRnegative sentiment proportionhallucination rateretrieval ratePPL
The researchers propose Confundo, a learned poisoning framework that fine-tunes a large language model into a poison generator to attack deployed RAG systems in practice. The paper notes that existing poisoning attacks degrade severely in real RAG systems, due to content being processed before use, which fragments the poison, and due to mismatches between user queries and the attacker's design-time expectations. Confundo supports multiple attack goals, including manipulating factual correctness, inducing biased opinions, and triggering hallucinations, and substantially outperforms existing specialized attacks across multiple datasets and RAG configurations, while remaining effective in the presence of defenses. The paper also presents a defense use case that can prevent web content from being scraped into RAG systems without authorization, without affecting user experience.
Paper analysis
What problem does this paper attempt to solve?
Actual chunking and query variants weaken existing RAG poisoning; Confundo turns poison generation into fine-tuning.
Real RAG first chunks documents before indexing, and user queries are often not the exact sentences used when designing attacks; poisoning based on these two assumptions will fail.
- Scenario: The authors state that RAG has been used in enterprise knowledge assistants, legal and medical decision support, customer service, and financial analysis. Retrieval from external libraries followed by generation makes outputs appear grounded; libraries often come from sources with weak review, so malicious documents, once retrieved, can influence answers.
- Existing shortcomings: The authors state that existing attacks are mostly evaluated on very short documents where chunking does not take effect. When chunk boundaries fall in the middle of a poison text, or when the attacker does not know the chunk length, the poison text is split and retrieval is weakened (Figure 2, Figure 3). Methods are also often tied to a single query and a single target.
- Authors' assessment: The gap is the lack of pipeline awareness. Documents are tokenized, split by bounded chunk length, and indexed by chunk; the same question has multiple phrasings. When these attacks are used for evaluation, their effectiveness is weaker than originally reported, and deployers may gain a false sense of security.
- This paper proposes: Confundo formulates poisoning as optimization, fine-tunes an LLM as a generator, and demonstrates factual correctness manipulation, opinion manipulation, and hallucination induction in one framework; it also provides a use case where poisoned HTML interferes with web pages being scraped into RAG without authorization.
- Threat model:
- Goal: For a pre-given set of questions, make outputs align with specified targets: attacker-specified wrong answers, specific biases or opinions, or hallucinated content (Section 3).
- Knowledge: Cannot access the target RAG, nor have its internal knowledge, including document processing pipeline, retriever and generator architectures, and system configuration.
- Capability: Cannot query the target system; can only prepare documents that will be ingested, embedding short poison texts into seemingly normal documents (Figure 5). This step can be repeated for more target questions.
- Terminology: Section 6.2 calls systems where ingestion, retrieval, and generation configurations are unknown to the attacker "black-box RAG systems."
What related research exists?
The paper mainly discusses single-objective RAG poisoning; the authors state that these do not account for real chunking and query variation.
The relevant discussion is mainly in the introduction and Section 2.2; the paper has no separate Related Work section.
Factual correctness poisoning
- PoisonedRAG (Zou et al., USENIX Security 2025) — uses LLMs to generate adversarial content and keyword stacking to improve relevance ranking.
- PR-Attack (Jiao et al., SIGIR 2025) — formulated as a bi-level optimization: maintaining retrieval relevance of malicious documents while increasing the probability that the generator outputs a target answer for specific queries.
- Joint-GCG (Wang et al., AAAI 2025) and AuthChain (Chang et al., EMNLP 2025) — the former applies gradient-based adversarial prompt optimization to RAG, jointly optimizing retrieval and generation; the latter aligns queries in three stages, constructs evidence chains, and injects authority signals.
Opinion manipulation poisoning
- Topic-FlipRAG (Gong et al., USENIX Security 2025) — injects stance keywords, limits the amount of modification, and then uses lightweight triggers to amplify the influence of poisoned content on generated opinions.
- FlippedRAG (Chen et al., CCS 2025) — uses a surrogate retriever to perform gradient-guided word substitution under semantic constraints, making the output reflect the attacker's desired stance.
Section 2.2 criticizes the above attacks collectively: the evaluations simplify the RAG setup, assume poisoned documents are indexed as-is, and can anticipate the exact query, thus failing to explicitly handle real document processing and system differences.
Hallucination-related work and defenses in experiments
- The generation reward draws on hallucination attacks against standalone LLMs (Chen et al., ICLR 2024; Du et al., NeurIPS 2024; Duan et al., ACL 2024). The experimental baselines OoD (Yao et al., 2023) and BEAST (Sadasivan et al., ICML 2024) are described by the authors in Section 6.1.3 as relying only on prompt injection.
- Section 6.3 uses perplexity detection, re-ranking, and paraphrasing to measure survival rates. Section 7 cites unauthorized crawling and hiding text with HTML/CSS.
Baselines and datasets
- Factual manipulation: PoisonedRAG, AuthChain, PR-Attack, Joint-GCG; datasets are Harry Potter (default), NewsQA, OCR-Bench.
- Opinion manipulation: Topic-FlipRAG, FlippedRAG; dataset is PROCON. The evaluation model is twitter-roberta-base-sentiment-latest, with VADER used for rewards.
- Hallucination induction: OoD, BEAST; dataset is RAGTruth. The judging model is lettucedect-large-modernbert-en-v1.
The authors position Confundo as a learned, multi-objective poisoning generation framework and write morphological variation and unknown preprocessing into the optimization; the authors state that specialized attacks therefore do not reflect risks under real pipelines.
How does the paper address this problem?
Fine-tune Qwen3-0.6b with GRPO as a poisoning generator, with rewards covering target, chunk robustness, and fluency.
Confundo fine-tunes an LLM as a poison generator: given a target question, attack goal, and configuration, it produces a short poison text, which is then embedded into documents that will be ingested by the target RAG. The authors list three principles: induce specified misbehavior, remain effective on semantically equivalent query variants, and be hard for system owners to detect.
How the goal enters the prompt
- Configuration varies with the goal: factual manipulation specifies an answer, opinion manipulation specifies a desired bias, and hallucination induction specifies content the answer should avoid.
- The prompt bundles the goal and configuration together. The three templates respectively require a short guiding corpus, guiding a question without a standard answer in a specified direction, or a confident-sounding but incorrect statement. The full text is in Section 4.1; we do not repeat the sentences here.
- The authors state that simply wrapping a pretrained model in these templates does not meet the above principles, so fine-tuning must incorporate retrieval, generation, robustness, and stealth signals.
Rewards
For question q, configuration α, and poison text p, the total reward is
R(p; q, α) = Rret(p; q) + Rgen(p; q, α) + Rlex(p; q, α) + Rppl(p)
The first two terms correspond to whether the attack succeeds, and the last two correspond to lexical robustness and fluency. Retrieval is further decomposed into lexical and semantic:
Rret(p; q) = Rrettf(p; q) + Rretemb(p; q)
Word co-occurrence and vector similarity are added to increase the chance that an unknown retriever hits the poison text.
- Lexical: Uses the term frequency part of BM25, because target library entries are unavailable. Saturation parameters k1 and b take common values 1.5 and 0.75.
- Semantic: Over a set of embedding models, the expected cosine similarity between the poison text and the question. The authors state in the methods section that retrieval mechanisms not separately modeled above have negligible differences in Section 6.2.2.
- Generation: A surrogate LLM simulates RAG with the poison text as the only retrieved entry. The factual reward checks whether the specified answer is a substring of the response; the opinion reward checks whether a sentiment classifier judges it as α; the hallucination reward checks whether ROUGE is ≤ 0.5. The authors state this threshold is common in prior work. Surrogate components need not be identical to the target system.
Robustness and stealth
- Query variants: An auxiliary LLM generates a set of paraphrases, and the retrieval and generation rewards are averaged over the variants. The paper does not name this auxiliary LLM.
- Chunking: The poison text is randomly split into a prefix and suffix, and the larger of the two rewards is used for updates, so that no matter where the cut falls, at least one segment still induces the target behavior.
- Length and fluency: The maximum generation token limit is set, with a default budget of 40. Fluency uses a perplexity reward from a pretrained language model. The paper does not name this language model.
Fine-tuning and default implementation
- Warm-up: For each question and configuration, 8 poison texts are generated with temperature 0.70, and the minimum and maximum of each reward term are recorded for min-max normalization.
- Update: GRPO updates all parameters. Each step samples a batch of target questions, generates poison texts, and normalizes rewards. The paper does not specify learning rate, training steps, or group size. The authors state that rewards increase during training (Figure 6b).
- Default models: The fine-tuned model is Qwen3-0.6b. The surrogate retrieval set is bge-small-en-v1.5, all-MiniLM-L6-v2, contriever; generation optimization uses frozen Qwen3-0.6b. By default, one poison text is injected per query.
What experiments did the paper conduct?
The authors claim superiority over specialized attacks on all three objectives; the factual ASR for Llama3-8b with exact questions is 88%.
Experimental Setup
- Generators: Main experiments use Qwen3-8b and Llama3-8b, with retriever bge-small-en-v1.5 for both. Figure 19 also includes same-family Qwen3, as well as DeepSeek and Gemini2.5-Pro; the text names examples but does not list all models in the figure.
- Datasets: Factual manipulation uses Harry Potter (default), NewsQA, OCR-Bench; opinion uses PROCON; hallucination uses RAGTruth. The paper does not report the number of questions.
- Baselines: Factual: PoisonedRAG, AuthChain, PR-Attack, Joint-GCG; opinion: Topic-FlipRAG, FlippedRAG; hallucination: OoD, BEAST.
- Metrics: Factual ASR is the proportion of questions where the output is the specified wrong answer; the paper does not specify whether judgment is substring, human, or LLM. Opinion uses twitter-roberta-base-sentiment-latest for negative sentiment, and VADER for training reward. Hallucination requires the answer not to contain the original correct answer, and uses lettucedect-large-modernbert-en-v1 to judge whether it is a hallucination.
- System configuration: Accuracy is maximized on the validation set: chunk size 128 tokens, retrieving the top 3 most relevant chunks. When space is limited, the default generator is Llama3-8b. The paper does not report the number of repetitions.
- Poisoning side: Fine-tuned Qwen3-0.6b, default token budget 40, 1 per query. When the non-fine-tuned Qwen3-0.6b directly applies templates, the authors claim it cannot produce effective attacks (Figure 6a), with no percentage in the text.
Main Results
Below are the main comparisons with numbers in the text. Figure 8 also plots Qwen3-8b and NewsQA, OCR-Bench, but the text gives no ASR numbers for these, so they are not listed.
Swipe horizontally to read the table
Objective Setting Confundo Baseline Source Factual ASR Harry Potter, Llama3-8b, exact questions 88% AuthChain 54% Figure 8 Negative answer rate PROCON, Qwen3-8b 60% No poisoning 6%; specialized attack at most 10% Figure 12 Hallucination rate RAGTruth, Qwen3-8b 98% No poisoning 6% Figure 14 Hallucination rate RAGTruth, Llama3-8b 95% No poisoning 2% Figure 14 - The authors claim that in Figure 8, Confundo substantially outperforms baselines on both generators, with AuthChain second; poison texts are shorter, averaging 30.69 words, versus AuthChain's 114.65 words (Figure 9). The word count sentence does not specify the dataset. For Llama3-8b opinion results, the authors claim similar trends, without giving proportions.
- When questions are paraphrased, the authors claim Confundo's ASR drops only 7%, while existing methods drop 40%–50% (Figure 10). The introduction also states that slight rewriting can halve attack effectiveness.
- For opinion, the authors claim that specialized attacks' poison texts may be judged as negative, but may not be retrieved, or may have limited impact on the generator. For hallucination, the authors claim this is, to their knowledge, the first work to amplify hallucination via RAG poisoning; the hallucination rates for OoD and BEAST are not given in the text. The contributions claim that relative to specialized attacks, factual manipulation improves up to 1.68x, opinion bias 6x, and hallucination induction 1.78x. The 6x matches the 60% vs. at most 10% in the table; the 1.68x and 1.78x do not have corresponding two numbers given.
Transfer to Unknown Configurations
- Chunking: Figure 15: the authors claim Confundo has the highest ASR across chunk sizes, with ASR slightly decreasing for longer chunks; the explanation is that short poison texts are diluted. ASR per chunk size is not given in the text. The authors claim smaller chunk sizes are more common, and in this experiment 128 tokens is a relatively favorable choice.
- Retriever and K: Figure 16: the authors claim that even with e5-base-v2, rank-bm25, and DSRC not seen during fine-tuning, retrieval rate is near-perfect, attributed to the three-embedding-model ensemble (Figure 17). Both figures have no percentages in the text. Figure 18: the authors claim K=3 performs best on their data, and larger K still outperforms previous methods, without giving ASR per K.
- Generator: In Figure 19, Confundo's ASR ranges from 86% to 92%. The authors claim some methods (e.g., Joint-GCG) vary by at most 10%, while Confundo's improvement is at least 22%. The alternative generation model is Qwen3-0.6b. The paper does not specify which generator corresponds to 86% and 92%.
Survival under Defenses
- Perplexity: Table 1 is a single example, not repeating the poison text. PPL: PoisonedRAG 33.09, PR-Attack 52.02, AuthChain 50.19, Joint-GCG 94.80, Confundo 25.03; Harry Potter full set is 23.36. The authors claim Joint-GCG is the least natural, and that most attacks except PoisonedRAG repeat the question and target answer.
- Re-ranking: Uses bge-reranker-large. In Figure 20, Confundo's ASR is 78%, AuthChain's is 55%. The authors claim the order of items has limited impact on the answer. The generator is not specified in that paragraph.
- Rewriting: On Llama3-8b, after question rewriting 81%, after passage rewriting 76%, after both 73%, without defense 88% (Figure 21b). The authors claim both together are strongest. On the same-family generator, the authors claim it only drops from 88% to 83% (Figure 21a), without specifying which rewriting. The authors claim that across rewriting levels and generators, Confundo remains higher than existing attacks.
Unseen Data and Webpage Defense
- Questions and datasets: Figure 22 only states that on unseen questions it remains highly competitive, without ASR. Figure 23: a generator fine-tuned on NewsQA used on unseen NewsQA questions drops ASR from 83% to 74%; a generator fine-tuned on Harry Potter used on the same unseen NewsQA questions gives ASR 78%. The authors claim that for unseen questions, whether they come from the same dataset seems less important.
- Webpage case: Poison text is written into HTML, using CSS display:none as an example, making it invisible to visitors. The authors claim the page looks the same as the unprotected version (Figure 25). Of 40 questions that could be correctly answered without defense, only 2 remain answerable after crawling the protected page. The paper does not specify the generator, retriever, or judgment method for this case.
Other Ablations and Analyses
- Table 2 full Confundo: retrieval rate 100%, ASR 88% for both Qwen3 and Llama3, PPL 13.1274; the table does not specify dataset and retriever.
- Removing Retrieval Optimization: retrieval rate 66%, ASR 53% and 61%, PPL 46.0725.
- Removing Generation Optimization: retrieval rate 5%, ASR 9% and 6%, PPL 8.6826.
- Removing Stealthiness Optimization: retrieval rate 93%, ASR 77% and 72%, PPL 64.0713.
- Removing Pipeline Optimization: retrieval rate 91%, ASR 62% and 59%, PPL 20.7496. The authors claim removing any component reduces ASR.
- Figure 24: ASR saturates at token budget 40 (the authors claim about 32 words); 1 per query is sufficient, and further increases give only marginal gains. ASR per budget is not given in the text.
What are some points that can be further explored?
The paper does not have a dedicated section listing limitations; the Conclusion states that more robust RAG defenses are needed.
Limitations and future directions pointed out by the authors
The paper does not have dedicated Limitations, Discussion, or Future Work sections, nor does it describe any design as its own limitation. The Conclusion states: Confundo exposes vulnerabilities in current RAG and emphasizes the need for more robust defenses; this paper provides a foundation for studying multi-target poisoning and designing mitigation strategies in real scenarios. The same section states that changing the prompt template and generation optimization rewards can extend to other attack goals; this is a statement about extensibility, not a sentence marked as a pending experiment.
Experimental coverage
- Attack goals include wrong facts, negative opinions, and hallucinations. The main result generators are Qwen3-8b and Llama3-8b; Figure 19 additionally names DeepSeek and Gemini2.5-Pro and gives an ASR range of 86%–92%, without per-model numbers.
- Datasets are Harry Potter, NewsQA, OCR-Bench, PROCON, RAGTruth. The factual manipulation results with per-cell numbers in the text are for Harry Potter, Llama3-8b, exact queries.
- Defense conditions include the perplexity example in Table 1, bge-reranker-large reranking, and query rewriting, entry rewriting, and both. Transfer conditions include chunk size, multiple retrievers, K, and generators.
- Ablations remove retrieval, generation, stealth, and Pipeline Optimization (Table 2). The web use case hides poison text in HTML; 2 out of 40 questions remain answerable after scraping.
- The paper does not report the number of questions per dataset, number of repetitions, the procedure for determining factual ASR, the auxiliary LLM used for rewriting queries, the language model used for perplexity reward, the learning rate and steps for GRPO, and the hallucination rates for OoD and BEAST.
Summarize the main content of the paper
Confundo uses a fine-tuned generator for RAG poisoning; the authors report attack results on three objective types: factual, opinion, and hallucination.
Confundo turns RAG poisoning into fine-tuning: a small model generates short poison texts for target questions, which are then placed into documents that will be ingested by the knowledge base.
It targets the fact that real systems chunk documents and users do not copy preset queries verbatim, so specialized poisoning becomes weaker. The attacker has no internal knowledge of the target system and cannot query it; they can only prepare documents to be ingested. The specified behavior can be wrong facts, specific biases, or hallucinations.
The reward covers retrieval similarity, target behavior on a surrogate generator, rewritten queries, the better segment after random chunking, and perplexity. Optimization uses GRPO, the fine-tuned model is Qwen3-0.6b, and the surrogate retrieval is an ensemble of three embedding models. Changing the template and generation reward allows changing the target.
The authors report numbers including:
- On Harry Potter, Llama3-8b, exact queries, factual ASR is 88%, while AuthChain in the same setting is 54% (Figure 8); under paraphrased queries, the authors state ASR drops only 7%.
- On PROCON, Qwen3-8b has a negative answer rate of 60%, compared to 6% without poisoning and at most 10% for specialized attacks (Figure 12).
- On RAGTruth, hallucination rates are 98% for Qwen3-8b and 95% for Llama3-8b, compared to 6% and 2% without poisoning, respectively (Figure 14).
- Across different generators, ASR is 86%–92% (Figure 19). After rewriting both queries and retrieval entries, it is 73% on Llama3-8b (Figure 21b). In the web example, only 2 out of 40 originally answerable questions remain answerable.
The authors conclude that lacking pipeline awareness makes specialized attack success rates appear higher, and deployers may underestimate risk; existing perplexity, reranking, and rewriting do not yet block this poisoning, so more robust defenses are needed. In contributions, the authors state that relative to specialized attacks, factual manipulation improves up to 1.68 times, opinion bias 6 times, and hallucination induction 1.78 times.