Recipe

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

01

Embed & retrieve

Query → vector → top-k chunks from the knowledge base.

02

Generate claims

LLM drafts factual assertions from retrieved context.

03

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

ParameterDefaultNotes
top_k8Retrieval candidates
threshold0.82Min verifier score
max_claims5Claims per response
📖

Next step

Pair this recipe with the embedding store guide for end-to-end retrieval.