Evals & Observability·Question 81 of 83Quick-fire

Hallucination in LLMs a known issue, how can you evaluate and mitigate it?

Quick-fire answer from the Awesome Generative AI Guide (MIT)

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Some approaches to detect and mitigate hallucinations (source):

  1. Log Probability (Seq-Logprob):
    • Introduced in the paper "Looking for a Needle in a Haystack" by Guerreiro et al. (2023).
    • Utilizes length-normalized sequence log-probability to assess the confidence of the model's output.
    • Effective for evaluating translation quality and detecting hallucinations, comparable to reference-based methods.
    • Offers simplicity and ease of computation during the translation process.
  2. Sentence Similarity:
    • Proposed in the paper "Detecting and Mitigating Hallucinations in Machine Translation" by David et al. (Dec 2022).
    • Evaluates the percentage of source contribution to generated translations and identifies hallucinations by detecting low source contribution.
    • Utilizes reference-based, internal measures, and reference-free techniques along with measures of semantic similarity between sentences.
    • Techniques like LASER, LaBSE, and XNLI significantly improve detection and mitigation of hallucinations, outperforming previous approaches.
  3. SelfCheckGPT:
    • Introduced in the paper "SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models" by Manakul et al. (2023).
    • Evaluates hallucinations using GPT when output probabilities are unavailable, commonly seen in black-box scenarios.
    • Utilizes variants such as SelfCheckGPT with BERTScore and SelfCheckGPT with Question Answering to assess informational consistency.
    • Combination of different SelfCheckGPT variants provides complementary outcomes, enhancing the detection of hallucinations.
  4. GPT4 Prompting:
    • Explored in the paper "Evaluating the Factual Consistency of Large Language Models Through News Summarization" by Tam et al. (2023).
    • Focuses on summarization tasks and surveys different prompting techniques and models to detect hallucinations in summaries.
    • Techniques include chain-of-thought prompting and sentence-by-sentence prompting, comparing various LLMs and baseline approaches.
    • Few-shot prompts and combinations of prompts improve the performance of LLMs in detecting hallucinations.
  5. G-EVAL:
    • Proposed in the paper "G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment" by Liu et al. (2023).
    • Provides a framework for LLMs to evaluate the quality of Natural Language Generation (NLG) using chain of thoughts and form filling.
    • Outperforms previous approaches by a significant margin, particularly effective for summarization and dialogue generation datasets.
    • Combines prompts, chain-of-thoughts, and scoring functions to assess hallucinations and coherence in generated text.
Full worked answer

Some approaches to detect and mitigate hallucinations (source):

  1. Log Probability (Seq-Logprob):
    • Introduced in the paper "Looking for a Needle in a Haystack" by Guerreiro et al. (2023).
    • Utilizes length-normalized sequence log-probability to assess the confidence of the model's output.
    • Effective for evaluating translation quality and detecting hallucinations, comparable to reference-based methods.
    • Offers simplicity and ease of computation during the translation process.
  2. Sentence Similarity:
    • Proposed in the paper "Detecting and Mitigating Hallucinations in Machine Translation" by David et al. (Dec 2022).
    • Evaluates the percentage of source contribution to generated translations and identifies hallucinations by detecting low source contribution.
    • Utilizes reference-based, internal measures, and reference-free techniques along with measures of semantic similarity between sentences.
    • Techniques like LASER, LaBSE, and XNLI significantly improve detection and mitigation of hallucinations, outperforming previous approaches.
  3. SelfCheckGPT:
    • Introduced in the paper "SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models" by Manakul et al. (2023).
    • Evaluates hallucinations using GPT when output probabilities are unavailable, commonly seen in black-box scenarios.
    • Utilizes variants such as SelfCheckGPT with BERTScore and SelfCheckGPT with Question Answering to assess informational consistency.
    • Combination of different SelfCheckGPT variants provides complementary outcomes, enhancing the detection of hallucinations.
  4. GPT4 Prompting:
    • Explored in the paper "Evaluating the Factual Consistency of Large Language Models Through News Summarization" by Tam et al. (2023).
    • Focuses on summarization tasks and surveys different prompting techniques and models to detect hallucinations in summaries.
    • Techniques include chain-of-thought prompting and sentence-by-sentence prompting, comparing various LLMs and baseline approaches.
    • Few-shot prompts and combinations of prompts improve the performance of LLMs in detecting hallucinations.
  5. G-EVAL:
    • Proposed in the paper "G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment" by Liu et al. (2023).
    • Provides a framework for LLMs to evaluate the quality of Natural Language Generation (NLG) using chain of thoughts and form filling.
    • Outperforms previous approaches by a significant margin, particularly effective for summarization and dialogue generation datasets.
    • Combines prompts, chain-of-thoughts, and scoring functions to assess hallucinations and coherence in generated text.

What a good answer covers

  • Introduced in the paper "Looking for a Needle in a Haystack" by Guerreiro et al
  • Utilizes length-normalized sequence log-probability to assess the confidence of the model's output
  • Effective for evaluating translation quality and detecting hallucinations, comparable to reference-based…
  • Offers simplicity and ease of computation during the translation process
  • Proposed in the paper "Detecting and Mitigating Hallucinations in Machine Translation" by David et al

Key terms: Log Probability (Seq-Logprob) · Sentence Similarity · SelfCheckGPT · GPT4 Prompting · G-EVAL

Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep