Skip to content

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 class
  • ask() — single-shot one-liner for the simple case
  • Presetshybrid_balanced, local_minimal, etc.

Data model

  • ModelsDocument, Sentence, Chunk, Answer, CitedSentence, VerificationResult, Span

Components (alphabetical)

  • ChunkersParentChildChunker, ContextualChunker, the Chunker protocol
  • Config — YAML loader, registry, register() extension hook
  • Demo — bundled sample document helpers
  • Embedders — BGE / Cohere / Voyage
  • GeneratorsPromptedCitedGenerator, ConstrainedCitedGenerator, SAFECitedGenerator
  • IndexersHybridIndex, LanceDBIndex, BM25Index
  • ParsersDoclingParser, PyMuPDFParser, composite + caching wrappers
  • Rerankers — Cohere / BGE
  • Report — HTML audit report renderer
  • VerifiersDualNLIVerifier, 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 Documentlist[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] + Documentlist[VerificationResult]
NLIScorer verifiable_rag.verifiers list[(premise, hypothesis)]list[float]