Detect hallucinations in legal AI outputs using Entity Grounding and Relation Preservation. Audit every claim back to source documents with full traceability.
Adjust detection sensitivity
Scores below this value are flagged as hallucinations
Balance between Entity Grounding (High) and Relations (Low)
Test HalluGraph on different legal scenarios
Process multiple pairs to measure throughput
Extract named entities (parties, dates, amounts, provisions) from source and response using NER.
Build knowledge graphs G_c (context) and G_a (answer) with entities as nodes and relations as edges.
Compute EG: fraction of response entities that match entities in the source document.
Compute RP: fraction of response edges that are supported by source graph edges.
CFI = α·EG + (1-α)·RP provides a unified score with full audit trail for each flagged issue.