Overview
Fact-checking predicates form a complete quality framework for verifying AI outputs. The first three work together to catch all major LLM failure modes: The Complete Quality Framework:-
has_facts- Recall check: Does output include all required information?- Service name:
facts_not_missing - Catches: Omissions, incomplete responses, forgotten details
- Question: “Did you forget any critical information?”
- Service name:
-
has_unsupported_facts- Precision check: Are all statements grounded in the source?- Service name:
facts_supported(returns opposite - we check if unsupported facts exist) - Catches: Hallucinations, unsupported claims, made-up information
- Question: “Did you add anything that’s not in the source?”
- Service name:
-
has_conflicting_facts- Consistency check: Does output contradict the source?- Service name:
facts_not_contradict(returns opposite - we check if contradictions exist) - Catches: Contradictions, incorrect values, conflicting statements
- Question: “Did you say anything wrong or conflicting?”
- Service name:
- ✓ Incompleteness (
has_facts) - ✓ Hallucinations (
has_unsupported_facts) - ✓ Inaccuracies (
has_conflicting_facts)
matches_facts- Bidirectional fact matching (combines recall + precision checks)- Service name:
facts_full_match
- Service name:
has_facts
Recall Check - Verify the output includes all required information from the reference. Maps to service assertion:facts_not_missing
What It Catches
- ❌ Omissions - Missing critical information
- ❌ Incomplete responses - Partial answers
- ❌ Forgotten details - Skipped requirements
When to Use
- ✅ Verify AI included key information
- ✅ Check completeness of responses
- ✅ Ensure critical facts aren’t omitted
- ✅ Validate summarization didn’t lose key points
Strict vs Lenient Mode
has_unsupported_facts
Precision Check - Detect hallucinations by finding statements in the output that aren’t supported by the source. Maps to service assertion:facts_supported (we return the inverse - True if unsupported facts exist)
What It Catches
- ❌ Hallucinations - Made-up facts not in source
- ❌ Unsupported claims - Statements without evidence
- ❌ Confabulation - Plausible but false information
When to Use
- ✅ Detect made-up information
- ✅ Find claims without evidence
- ✅ Verify groundedness in RAG systems
- ✅ Check for confabulation
- ✅ Ensure output stays within source boundaries
Example: RAG System
has_conflicting_facts
Consistency Check - Find contradictions where the output directly conflicts with the source. Maps to service assertion:facts_not_contradict (we return the inverse - True if contradictions exist)
What It Catches
- ❌ Contradictions - Direct conflicts with source
- ❌ Incorrect values - Wrong numbers, dates, names
- ❌ Conflicting statements - Incompatible claims
When to Use
- ✅ Verify consistency with source material
- ✅ Check for factual errors
- ✅ Ensure AI doesn’t contradict instructions
- ✅ Validate accuracy of transformations
Example: Multi-turn Consistency
matches_facts
Bidirectional Fact Matching - Ensures both texts contain the same set of facts (combines recall + precision checks). Maps to service assertion:facts_full_match
has_facts(response, reference)- All reference facts are in response (recall)- NOT
has_unsupported_facts(response, reference)- No hallucinations (precision)
When to Use
- ✅ Verify summarization accuracy
- ✅ Check reformulation correctness
- ✅ Ensure translation preserves meaning
- ✅ Validate paraphrasing maintains all information
Example: Summarization
Combining Fact Checks
Use multiple predicates together for comprehensive verification:Real-World Example: Content Generation
Strict Mode Details
TODO: Document exact strict mode behavior once finalized Expected behavior:- Strict mode: Requires explicit, direct statements
- Lenient mode: Allows semantic inference and derivation
Performance Notes
- Each predicate makes one API call
- Typical latency: 1-3 seconds
- Cost: ~$0.01-0.02 per check
- Consider caching for repeated checks