# Trustworthy RAG: An Evaluation Agent for Detecting Misinformation and Knowledge Poisoning in Generative AI Systems

DevFeed: [Trustworthy RAG: An Evaluation Agent for Detecting Misinformation and Knowledge Poisoning in Generative AI Systems](<https://devfeed.tech/articles/trustworthy-rag-an-evaluation-agent-for-detecting-misinformation-and-knowledge-poisoning-in-generative-ai-systems-118042.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2608.21095>)

Author: Balkrishna Giri, Md Toufique Hasan, Jussi Rasku, Muhammad Waseem, Pekka Abrahamsson

Published: 2026-11-05T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [LLM security](<https://devfeed.tech/topics/llm-security.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [ai security](<https://devfeed.tech/topics/ai-security.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [application-security](<https://devfeed.tech/tags/application-security.md>), [coding](<https://devfeed.tech/tags/coding.md>), [coding-assistant](<https://devfeed.tech/tags/coding-assistant.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-ir](<https://devfeed.tech/tags/cs-ir.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [cwe](<https://devfeed.tech/tags/cwe.md>), [detection](<https://devfeed.tech/tags/detection.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [generative-ai](<https://devfeed.tech/tags/generative-ai.md>), [inference](<https://devfeed.tech/tags/inference.md>), [knowledge](<https://devfeed.tech/tags/knowledge.md>), [language-model](<https://devfeed.tech/tags/language-model.md>), [large-language-model](<https://devfeed.tech/tags/large-language-model.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llms](<https://devfeed.tech/tags/llms.md>), [rag](<https://devfeed.tech/tags/rag.md>), [recall](<https://devfeed.tech/tags/recall.md>), [relevance](<https://devfeed.tech/tags/relevance.md>)

## AI overview

The proposed RAG Evaluation Agent checks retrieved context before generation, combining NLI factual verification, a five-signal poison detector, and a Trust Index with a dampener for highly contaminated contexts. On TruthfulQA with Llama 3.3 70B, it reports 91% accuracy, 100% precision, and 100% recall for instruction injection; in a secure-coding assistant using OWASP Top 10 and CWE guidance, it reports F1 of 92% for blocking injected unsafe advice. Across three LLMs, Trust Index ROC-AUC is 0.73-0.81, but per-model threshold calibration is needed, and weaker FEVER performance indicates domain-specific calibration matters. Entity swaps, contradictions, and subtle semantic weakening remain difficult to detect. The evaluation measures poisoned-context detection before generation, not whether a model adopts misinformation.

## Source excerpt

arXiv:2608.21095v2 Announce Type: replace Abstract: Retrieval-Augmented Generation (RAG) grounds Large Language Model (LLM) outputs in external knowledge, but RAG systems usually trust whatever they retrieve, creating a Security-Reliability Gap: high semantic relevance does not guarantee factual truth. Adversaries exploit this through knowledge poisoning, inserting malicious documents to cause targeted misinformation. We propose an Evaluation Agent, middleware that combines Natural Language Inference (NLI) factual verification, a five-signal poison detector with relevance-weighted aggregation, and a Trust Index T = 0.4 F + 0.35 C + 0.25 (1 - P ) with a non-linear dampener for high-contamination contexts. On TruthfulQA with Llama 3.3 70B, the agent reaches 91% accuracy and 100% precision, with 100% recall on instruction injection, while in-place edits, such as entity swaps, remain hard to detect. Across three LLMs the Trust Index stays discriminative, with a Receiver Operating Characteristic Area Under the Curve (ROC-AUC) of 0.73 to 0.81; generation style matters more than model size, and per-LLM threshold calibration restores baseline competitive accuracy, whereas a weaker FEVER result shows that cross-dataset generalization requires domain-specific calibration. In a software-engineering use case, a secure-coding assistant over guidance from the Open Worldwide Application Security Project (OWASP) Top 10 and the Common Weakness Enumeration (CWE), the agent reliably blocks instruction injection of unsafe advice (F1 92%), while contradiction and subtle semantic weakening remain hard. Throughout, the agent measures detection of poisoned context before generation, not whether the LLM adopts the injected misinformation. We release the proposed approach, attack generator, and experimental artifacts at the link: https://github.com/GPT-Laboratory/TrustworthyRAG.