TL;DR
Researchers from TH Köln investigated the dual challenge of using Large Language Models (LLMs) to both generate and detect hallucinations in translation and paraphrasing tasks. By benchmarking Llama 3, Gemma, GPT-3.5, and GPT-4, they found that while GPT-4 remains the gold standard for detection, ensemble majority voting and strategic prompt engineering are essential for building reliable "hallucination-aware" systems.
What Problem Does This Paper Address?
As LLMs become ubiquitous, their tendency to "hallucinate"—generating factually incorrect or unsupported information—remains a significant barrier to trust. The authors participated in the CLEF 2024 ELOQUENT HalluciGen shared task, which asks a meta-question: Can we use LLMs as evaluators for other LLMs?
The challenge is two-fold:
- Generation: Can a model take a source sentence and intentionally produce one accurate version and one plausible but hallucinated version?
- Detection: Can a model distinguish between the two?
This "builder task" is the first phase of a multi-year effort to create multilingual models that are inherently aware of their own potential for error.
Methods
The researchers evaluated four prominent models: Llama 3 (8B), Gemma (7B), GPT-3.5 Turbo, and GPT-4. Their approach focused heavily on prompt engineering and structured output.
Key methodological components included:
- Prompt Engineering: They experimented with four prompt types, ranging from simple label requests to complex "Chain of Thought" (CoT) prompts that included formal definitions of hallucinations and few-shot examples.
- Structured Frameworks: The team utilized the
guidanceframework to ensure models adhered to specific output formats (like JSON), which is often a struggle for smaller open-source models like Gemma. - Ensemble Voting: For the detection task, they implemented a simple majority voting mechanism to combine the strengths of all four models, mitigating the specific weaknesses of any single architecture.
Datasets
The study utilized datasets provided by the ELOQUENT Lab, focusing on two primary scenarios:
- Paraphrase Generation (PG): Datasets in English and Swedish.
- Machine Translation (MT): Four language pairs, including German-English (de-en), English-German (en-de), French-English (fr-en), and English-French (en-fr).
The trial sets were relatively small (10-19 samples), while the test sets expanded to roughly 100-118 samples per category, providing a rigorous benchmark for cross-model evaluation.
Key Insights and Ideas
- The Gender Bias Trap: One of the most striking findings was Llama 3’s struggle with gendered nouns in German. For example, it failed to recognize that Wirtschaftsprüferin (a female auditor) was gender-specific, labeling it as gender-neutral and then hallucinating a male auditor in the translation.
- Unit and Date Confusion: Models frequently tripped over "common sense" conversions. Llama 3 often flagged correct translations as hallucinations because it couldn't reconcile different units (e.g., thinking "kilometers" was a hallucination because the source used "km") or date formats (e.g., "21. Januar" vs "Jan. 21st").
- Prompt Sensitivity: The performance of open-source models like Llama 3 and Gemma was highly volatile based on the prompt. Simpler prompts often worked better for Gemma, which struggled with overly technical or scientific instructions.
- GPT-4’s Nuance: GPT-4 was the only model capable of consistently detecting subtle hallucinations involving incorrect pronouns, a task where all other models failed.
Key Results
The quantitative results highlighted a clear hierarchy in model performance:
- Detection Excellence: In English paraphrasing detection, GPT-4 achieved a top score of 0.91 Accuracy/F1. The Ensemble Majority Voting approach followed closely with an accuracy of 0.85.
- Multilingual Challenges: Performance dipped slightly in other languages; for Swedish paraphrasing, GPT-4 reached an accuracy of 0.81.
- Generation Strengths: GPT-3.5 Turbo proved to be the most efficient at generating correct translations (hyp+), while Llama 3 showed a strong ability to generate convincing, non-entailed hallucinations (hyp-).
- Baseline Comparison: The LLM-based approaches significantly outperformed simple baseline classifiers like Logistic Regression and Random Forest, which hovered around an F1-score of 0.5.
Limitations and Future Work
The authors noted several hurdles:
- Sample Size: The small size of the trial datasets made it difficult to perform extensive prompt optimization before the final test phase.
- Latency: Open-source models, particularly Llama 3, were significantly slower than their closed-source counterparts, with Swedish generation tasks taking hours to produce just a few outputs.
- Inherent Logic Errors: Prompt engineering could not entirely solve fundamental reasoning failures regarding unit conversions and gender bias.
Future work will transition to the "Breaker" phase of the ELOQUENT Lab, where the goal shifts to creating adversarial examples designed to fool these very detection systems.
Summary updated