Describe two automated hallucination detection techniques and their tradeoffs
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Describe two automated techniques for detecting hallucinations in LLM outputs. For each, explain how it works and its main tradeoff.
NLI entailment checks each claim against a reference; self-consistency samples N responses and flags claims that vary. NLI needs a strong model; self-check misses confident systematic hallucinations.
Imagine a student writing an essay and you want to catch made-up facts. One way: take each sentence and check it against the textbook. If the textbook says nothing about it, or contradicts it, you flag it. That is the entailment approach, but it only works if you trust whoever is doing the checking. Another way: ask the student to write the same essay five times and see which facts stay the same. Facts that wobble from version to version are probably invented. But if the student always misremembers the same wrong date, every version agrees, and you never catch it. So one method needs a good reference and a sharp checker; the other needs no reference but goes blind whenever the student is confidently wrong the same way every time.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: NLI entailment mechanics and its model-quality cap, self-consistency sampling and its blind spot on confident errors, LLM-judge groundedness with citations, when each fits, and the precision versus recall trade.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating self-consistency as a truth check. It measures agreement, not correctness, so a confidently and repeatedly wrong fact passes every consistency vote undetected.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.