Urgent.News

What's breaking now, across thousands of outlets.

Culture

A word-overlap check beat a DeBERTa NLI model at spotting RAG hallucinations

I expected the neural entailment model to win. It didn't. I wanted to know how far the cheap, no-API-call hallucination checks get on real RAG output before you need an LLM judge or a human. So I built three small detectors, ran them on RAGTruth , and compared them. The one that costs microseconds per response beat the one that costs about seven seconds on a CPU. The setup RAGTruth (Niu et al.,…

I built three detectors to identify hallucinations in Retrieval-Augmented Generation (RAG) outputs. The lexical detector scores the share of content tokens in a response that do not appear in the source. The numeric detector measures the share of numbers in a response that are not found in the source. The NLI detector uses a cross-encoder model called DeBERTa V3 small to compare response sentences with the closest source sentences.

The lexical detector proved to be the fastest and most effective, catching most hallucinations with a high precision of 0.476. The ensemble model, which combined the three detectors, did not outperform the lexical detector alone. The lexical detector's strength lies in identifying plausible-sounding details or new vocabulary not present in the source.

The NLI detector struggles with data-to-text tasks, where the source is flattened JSON, and its performance varies depending on the LLM used. The detectors can be used as a triage signal to prioritize human review of flagged responses, rather than blocking or rewriting every flagged answer, which could degrade good ones.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Culture

More from Wednesday 11 November →