Are LLMs Hallucinating When Answering Specific Questions? Experiments with a RAG Pipeline
摘要
While the industry aims to automate more and more tasks with the help of Large Language Models (LLMs), assessing their capacity to provide reliable responses represents a legitimate concern. LLMs are trained over general knowledge bases, thus they are not intrinsically able to respond to questions over private, specific knowledge regarding the automated processes. This issue represents the main source of hallucination, as the LLM will not recognize its inability to supply a truthful response. This paper introduces a RAG pipeline for query answering from a specific text corpus, allowing to evaluate the quality of the retrieved responses. Inspecting the variability of LLM performance in time over the same query answering task, we strive to detect potential hallucinations. Results show that by analyzing the computed metrics we could advance toward a framework for hallucination detection and for assessing the confidence on the LLM performance.