FENJI at S em E val-2025 Task 3: Retrieval-Augmented Generation and Hallucination Span Detection (2025)

Abstract: Large Language Models (LLMs) have significantly advanced Natural Language Processing, however, ensuring the factual reliability of these models remains a challenge, as they are prone to hallucination - generating text that appears coherent but contains innacurate or unsupported information. SemEval-2025 Mu-SHROOM focused on character-level hallucination detection in 14 languages. In this task, participants were required to pinpoint hallucinated spans in text generated by multiple instruction-tuned LLMs. Our team created a system that leveraged a Retrieval-Augmented Generation (RAG) approach and prompting a FLAN-T5 model to identify hallucination spans. Despite contradicting prior literature, our approach yielded disappointing results, underperforming all the “mark-all” baselines and failing to achieve competitive scores. Notably, removing RAG improved performance. The findings highlight that while RAG holds potential for hallucination detection, its effectiveness is heavily influenced by the retrieval component’s context-awareness. Enhancing the RAG’s ability to capture more comprehensive contextual information could improve performance across languages, making it a more reliable tool for identifying hallucination spans.

## introduction the rapid advancement of large language models (llms) has significantly transformed natural language processing (nlp), pushing breakthroughs in text generation, reasoning, and contextual understanding @xcite . as these models continue to evolve, researchers have explored their potential across various domains, yet some challenges persist in ensuring the reliability and factual accuracy of their outputs @xcite . a significant challenge in assessing llm output is the phenomenon of hallucination, where models produce text that appears coherent but contains fac-tually incorrect or unsupported information @xcite . this issue can stem from limitations in training data @xcite , overgeneralization @xcite , and the tendency of models to prioritize linguistic fluency over factual accuracy @xcite . existing evaluation metrics often focus on grammaticality and coherence, which is not able to properly account for, and penalize factual inconsistencies, making hallucinations more common @xcite . addressing this challenge is important for applications such as automated knowledge retrieval @xcite , decision support systems @xcite , and scientific content generation @xcite , where misinformation can lead to potential consequences @xcite . in a collaborative effort to develop the field of mitigating llm hallucinations, the semeval-2025 mu-shroom shared task focuses on detecting hallucinated spans in text generated by instructiontuned llms across multiple languages @xcite . unlike its previous iteration, this task focuses on character-level hallucination detection in 14 different languages. participants were given llm-generated text, produced by multiple llms, and had to identify hallucinated characters while assigning confidence scores to their predictions. evaluation was based on intersection-overunion (iou) accuracy and the correlation between assigned probabilities and empirical annotations. to approach this task, our team used a rag approach for passage retrieval and the prompting of a flan-t5 model @xcite as a method to detect spans of hallucinations. this method relied on using relevant and factually correct passages to be given to the t5 model, then leveraging its abilities to specifically identify what parts of a given piece of text could be a hallucination with a probability estimate. while our experiments showed middling results, it provides promis-ing insight into using rag as a tool for detecting hallucination spans. our evaluations across 14 languages indicate that while the rag component sometimes aids in pinpointing hallucinated spans, it often falls short. our findings offer practical insights into further refining retrieval-augmented methods in hallucination detection. ## background as per the definition provided by the mu-shroom organizers, hallucinations are understood as content that contains or describes facts that are not supported by the provided reference @xcite . broadly, hallucinations in llms can be classified into intrinsic and extrinsic hallucinations. intrinsic hallucinations arise when some generated text is inconsistent with the input or reference material, introducing inaccuracies even when the model remains within its contextual boundaries. on the other hand, extrinsic hallucinations occur when a model produces information that extends beyond the provided context, fabricating unsupported claims @xcite . in the context of the mu-shroom task, detection of hallucination spans must be able to specifically identify intrinsic hallucinations, as extrinsic hallucinations do not fall under the definition of the task. although several methods have been explored for handling hallucinations in llm output @xcite , one notable method is rag, which integrates external knowledge sources into llm generation to improve factual consistency @xcite . this is typically implemented through a neural retriever, which retrieves relevant passages from a structured dataset @xcite . unlike traditional sparse retrieval methods like bm25, which rely on keyword matching, neural retrievers use dense embeddings to capture semantic relationships, which should improve retrieval accuracy @xcite . by incorporating external knowledge retrieval, rag has been shown to improve factual accuracy in nlp tasks as it reduces hallucinations by grounding responses in verifiable sources @xcite @xcite . a key component that enhances rag's retrieval process is dense passage retrieval (dpr), which is a technique that uses dense vector representations to index and retrieve relevant passages for a given input. dpr uses a dual-encoder framework, where one encoder processes the input query while another encoder retrieves semantically similar documents. this allows dpr to efficiently retrieve top-k passages, which are then given to the rag model for more context-aware generation @xcite . although more traditional methods could be effectively employed for rag applications @xcite , by retrieving high-quality relevant passages, dpr has been shown to improve the factual reliability of ragbased models @xcite . the model focused on in this study, flan-t5, is a fine-tuned variant of the t5 model trained on diverse instruction-following tasks, and it is well-suited for applications that require contextual consistency and fact verification @xcite . its ability to generalize across unseen tasks makes it particularly effective for detecting semantic inconsistencies in generated texts, which is a great benefit in hallucination detection. since flan-t5 works in a text-to-text format, it could also be prompted to extract hallucinated spans directly, making it a promising tool for fine-grained hallucination detection. in last years shroom task, a study fine-tuned a flan-t5 for definition modeling, where it achieved an accuracy of 72.4% in detecting inconsistencies between input and generated definitons, demonstrating its potential for hallucination detection @xcite . ## system overview the implementation of our system is publicly available on github foot_0 . figure 1 shows the pipeline of our system. ## conclusion this study explored hallucination span detection as part of the semeval-2025 mu-shroom task using rag with the flan-t5 model. this approach integrated dpr with generative capabilities to identify hallucination spans. however, the system underperformed across all languages compared to the "mark-all" baselines. notably, the removal of the rag component led to improved performance, highlighting fundamental challenges with the retrieval mechanism's contextual relevance. the findings underscore the importance of robust retrieval mechanisms that can capture comprehensive contextual information. future work could explore using different generative models, running detailed tests on the parts of the rag system, and studying how language differences affect performance. improving overlap detection could also help the system better identify hallucination spans. by working on these areas, rag could become a more reliable method for detecting hallucinations.