Recipe: Fact-check pipeline
RAG retrieval paired with a verifier model to ground claims against source documents before surfacing them to users.
Overview
This pipeline ingests a user query, retrieves candidate passages from a vector store, and then runs each generated claim through a dedicated verifier. Only claims with a confidence score above the configured threshold reach the final response.
Pipeline stages
Embed & retrieve
Query → vector → top-k chunks from the knowledge base.
Generate claims
LLM drafts factual assertions from retrieved context.
Verify & filter
Verifier scores each claim; low-confidence items are dropped.
Verifier model
The verifier is a lightweight classifier fine-tuned on claim–evidence pairs. It outputs a probability that the claim is fully supported by the provided passage. We recommend a threshold of 0.82 for production workloads.
Configuration
| Parameter | Default | Notes |
|---|---|---|
| top_k | 8 | Retrieval candidates |
| threshold | 0.82 | Min verifier score |
| max_claims | 5 | Claims per response |
Next step
Pair this recipe with the embedding store guide for end-to-end retrieval.