[Integration]: RAGDefender — filter poisoned passages out of retrieved documents

未关闭
#781 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 13 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
25/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
python

调研方向

The integration page is already written in the branch from PR #749, which the issue says can be reopened against this issue. Review that page against the listed RAGDefender package, component, example, tests, and integration documentation links. Done means the existing integration page is reviewed and the PR is reopened for review.

由索引模型根据 Issue 内容生成。

描述

Stage

Ready: integration exists and works, proposing to list it

Integration or project name

RAGDefender

Integration type

Custom Component

Published package or repo (if it exists)

https://pypi.org/project/ragdefender (install with pip install "ragdefender[haystack]") and https://github.com/SecAI-Lab/RAGDefender

Need or proof of use

The Haystack integration is published, exercised and tested rather than planned:

It ships as a declared extra on the published package (ragdefender[haystack], currently 0.3.0, four releases), so a Haystack user installs it without pulling in the other framework adapters.

Why Haystack users would want it: RAGDefenderFilter sits between the retriever and the prompt builder and drops passages that carry knowledge-corruption injections before they reach the LLM. A pipeline that indexes any corpus the operator does not fully control — scraped pages, user uploads, a shared wiki — currently has no in-framework defence against an attacker who gets a crafted passage indexed and retrieved. This is a drop-in component for that gap.

It is the reference implementation of a peer-reviewed method, not a heuristic: "Rescuing the Unpoisoned: Efficient Defense against Knowledge Corruption Attacks on RAG Systems", ACSAC 2025, https://doi.org/10.1109/ACSAC67867.2025.00093

Short description

RAGDefender is a defence component for retrieval-augmented generation pipelines. Its Haystack component, RAGDefenderFilter, takes the documents a retriever returned, removes the ones carrying knowledge-corruption (RAG-poisoning) content, and passes the rest to the prompt builder. Because it is a filter in the pipeline, it needs no change to the retriever, the document store or the generator.

Published on PyPI as ragdefender with a haystack extra; source and paper artifacts at https://github.com/SecAI-Lab/RAGDefender


The integration page itself is already written: it was #749, which was closed under the new process before review. The branch still holds the commit, so I can reopen that PR against this issue once approved rather than rewriting it.

主要语言
Python
星标
114
派生
324
平均合并
7 天 2 小时
30 天内合并 PR
13

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

deepset-ai/haystack-integrations 的其他 Issue

查看 deepset-ai/haystack-integrations 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。