Skip to main content

Red Team testing for functional correctness of RAG systems under attack conditions.

Project description

VexRAG

Project: in development

A toolkit for assessing the functional correctness of retrieval-augmented generation (RAG) systems under attack conditions.

Stability notice (pre-0.2.0): VexRAG is currently test-stage software and is not production-ready. Until version 0.2.0, backward compatibility is not guaranteed and updates may include breaking changes.

Sample RAG stacks for getting started: RAG examples.

Quickstart

Prerequisites

python --version  # requires 3.11+
ollama list

Install/pull required Ollama models:

ollama pull llama3:8b
ollama pull nomic-embed-text:latest

You also need a running target API endpoint (for the small example: http://localhost:8080).

1) Install VexRAG

pip install vexrag

For vector DB-specific extras:

pip install "vexrag[qdrant]"
pip install "vexrag[chroma]"
pip install "vexrag[faiss]"

2) Verify installation

vx --help

3) Run a scan from config

vx scan --config path/to/scan.yml

Use sample configs from RAG examples/ as a starting point.

4) First successful scan (small local example)

From RAG examples/small/rag_01_in_memory_en:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python small_rag.py
vx scan --config scan_configs_examples/vexrag-chain-hijack-then-poisoned-semantic-ollama-nomic.yaml

Expected outcome:

  • small_rag.py serves the target API on http://localhost:8080.
  • vx scan completes and prints a scan report with attack/evaluation results (no connection/preflight errors).

Project roadmap

Canonical checklist: notes/TODO.md.

Done

  • Small RAG (in-memory)
  • PoisonedRAG target scan pipeline with core target, scan, and evaluation contracts
  • PoisonedRAG CLI scan flow wired from YAML config with multi-context poisoning runs
  • Core package facade exports clarified for shared APIs
  • StackOverflow XML/TSV to Qdrant ingestion scripts for large dataset indexing
  • PoisonedRAG generation improvements: poisoning styles, corpusN payloads, and query-prefixed adversarial outputs
  • Automatic attack case generation and consolidated example scan configs
  • HijackRAG attack support with CLI generate-cases
  • vLLM target/provider support for scan execution
  • Core modularization for config/retrieval/runtime

In Progress

  • PoisonedRAG hardening: broaden scenario coverage, stabilize metrics, and add end-to-end validation runs
  • Medium RAG examples stabilization across vector DB backends and multi-attack eval flow

Next

  • Finalize full end-to-end runnable demo for the huge StackOverflow + Qdrant pipeline
  • Promote selected wip milestones to stable feature/documented workflow status

Ideas / Backlog

  • Red-team testing methods for API-interacting RAG services (local RAG targets)
  • Red-team testing methods for the VexRAG CLI (local RAG targets)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vexrag-0.1.3.tar.gz (133.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vexrag-0.1.3-py3-none-any.whl (150.9 kB view details)

Uploaded Python 3

File details

Details for the file vexrag-0.1.3.tar.gz.

File metadata

  • Download URL: vexrag-0.1.3.tar.gz
  • Upload date:
  • Size: 133.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vexrag-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b6e501a2b6a16667b044d7981e7f96b8bc8efb60fc01e71cc0075a0c2c5fd4f4
MD5 4c0ff2473eab3fabf1ce8e4e76144e41
BLAKE2b-256 511e76037ce0e49bf564e62f76862688e5a485052a02323502e1b9c46bb15ae0

See more details on using hashes here.

File details

Details for the file vexrag-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: vexrag-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 150.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vexrag-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f2e11a1c4e296a748a0f4e0b20fe0e88a676f390e3391e2ebc9f494ca376230
MD5 ff48c1e1077d4719b2aee4a5d8154cdc
BLAKE2b-256 c34dbef1c3c696afe84b1c11d5c8a5e876659474bfdd0b15469f90ec42f00b72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page