Why Embedding Model Choice Matters
RAG pipelines rely on embedding models to determine which documents are “relevant” to a user query. Different models produce different vector spaces, meaning the same poison document may rank highly with one model and be ignored by another. RXP validates retrieval behavior across models so you can identify which embeddings are most susceptible.How It Works
The RXP validation pipeline follows four steps:- Embed — Load an embedding model and encode all corpus documents plus the poison document into vectors
- Ingest — Store the embeddings in an ephemeral ChromaDB collection
- Query — Run target queries against the collection and retrieve the top-k results
- Score — Measure how often the poison document appears in results and at what rank
Built-in Components
- 3 embedding models — MiniLM-L6, MiniLM-L12, and BGE-small, with support for arbitrary HuggingFace model names
- Domain profiles — Pre-built corpus/query/poison sets for testing (currently: HR policy knowledge base)
- Multi-model comparison — Run
--model allto validate across every registered model in a single pass
Optional Dependencies
RXP depends onsentence-transformers and chromadb, which are not installed by default. Install them with:
list-models and list-profiles commands work without these dependencies. Only validate requires them.
Next Steps
- RXP CLI Reference — Command reference for
qai rxp - Models & Profiles — Embedding model registry and domain profile structure
- RXP Architecture — Module internals and data flow