API reference¶
Auto-generated from the live docstrings in src/verifiable_rag/. Use the sidebar to jump to a module, or browse the highlights:
Top-level entry points¶
Pipeline— the core orchestration classask()— single-shot one-liner for the simple case- Presets —
hybrid_balanced,local_minimal, etc.
Data model¶
- Models —
Document,Sentence,Chunk,Answer,CitedSentence,VerificationResult,Span
Components (alphabetical)¶
- Chunkers —
ParentChildChunker,ContextualChunker, theChunkerprotocol - Config — YAML loader, registry,
register()extension hook - Demo — bundled sample document helpers
- Embedders — BGE / Cohere / Voyage
- Generators —
PromptedCitedGenerator,ConstrainedCitedGenerator,SAFECitedGenerator - Indexers —
HybridIndex,LanceDBIndex,BM25Index - Parsers —
DoclingParser,PyMuPDFParser, composite + caching wrappers - Rerankers — Cohere / BGE
- Report — HTML audit report renderer
- Verifiers —
DualNLIVerifier,HHEMVerifier,MiniCheckVerifier,LLMJudgeVerifier
Protocols¶
Every component is defined by a Protocol — swap implementations freely:
| Protocol | Defined in | What it does |
|---|---|---|
Parser |
verifiable_rag.parsers |
PDF → Document |
Chunker |
verifiable_rag.chunkers |
Document → list[Chunk] |
Embedder |
verifiable_rag.embedders |
list[str] → list[list[float]] |
Reranker |
verifiable_rag.rerankers |
Rerank list[RetrievedChunk] |
Generator |
verifiable_rag.generators |
Query + chunks → list[CitedSentence] |
Verifier |
verifiable_rag.verifiers |
list[CitedSentence] + Document → list[VerificationResult] |
NLIScorer |
verifiable_rag.verifiers |
list[(premise, hypothesis)] → list[float] |