UCSC at S em E val-2025 Task 3: Context, Models and Prompt Optimization for Automated Hallucination Detection in LLM Output (2025)

Abstract: Hallucinations pose a significant challenge for large language models when answering knowledge-intensive queries. As LLMs become more widely adopted, it is crucial not only to detect if hallucinations occur but also to pinpoint where they arise. SemEval 2025 Task 3, Mu-SHROOM: Multilingual Shared-task on Hallucinations and Related Observable Overgeneration Mistakes, is a recent effort in this direction. This paper describes our solution to the shared task. We propose a framework that first retrieves relevant context, next identifies false content from the answer, and finally maps them back to spans. The process is further enhanced by automatically optimizing prompts. Our system achieves the highest overall performance, ranking #1 in average position across all languages.

## introduction hallucinations in large language model (llm) outputs remain a significant concern @xcite , undermining user trust in knowledge-intensive tasks. in question answering, hallucinations manifest when models generate false or unverified information given world knowledge while maintaining a coherent response structure @xcite . while previous research has developed metrics and benchmarks to detect the presence of hallucinations @xcite , most approaches provide only binary or scalar outputs. these measurements, though valuable, offer limited insight into the specific locations of hallucinated content, despite precise localization being crucial for fact-checking and model improvement. the semeval 2025 task 3, mu-shroom: multilingual shared-task on hallucinations and related observable overgeneration mistakes @xcite , addresses this gap by challenging participants to identify both the spans of hallucinated text and the associated confidence. the task encompasses 14 languages and evaluates system performance on intersection-over-union (iou) and spearman correlation (corr) on llm outputs with human-annotated ground truth labels. the ucsc team approached this challenge using a multi-step framework consisting of: (i) context retrieval from external knowledge sources, (ii) detection of false or unverifiable content, and (iii) mapping error contents back to text spans. additionally, we explored the use of automatic prompt optimization in step (ii) and showed this further improved system performance. the proposed pipeline grounds llm responses in the retrieved context to distinguish true from fabricated content, while prompt optimization enhances detection reliability and span labeling accuracy. our systems rank highly among the submitted systems, achieving a win in 5 languages and a top two position in 11 of the 14 languages on iou and 10 of the 14 languages on corr. our participation in mu-shroom revealed an important insight: when paired with "good context," a simple promptingbased approach can reliably detect hallucinations with better-than-human accuracy. ## conclusion in this paper we described our system architecture, exploration and submission systems to semeval 2025 task 3 (mu-shroom) for multilingual hallucination span labeling in llm output. our multistage framework, which combines context retrieval, hallucination detection, and span mapping with prompt optimization, achieves strong performance, ranking in the top two positions in 11 of the 14 languages in the evaluation set. through our work, we discovered that (i) retrieving relevant context is crucial for hallucination detection, (ii) simple text-extraction often outperforms more complex approaches, and (iii) prompt optimization improves system performance. moreover, we find significant variations in annotated spans among human annotators, even when agreeing on underlying facts, suggesting that a more well-defined framework for annotation could benefit both automatic and human labeling of hallucinated spans.