🤖 AI Summary
This paper addresses the challenge of hallucination detection in large language model (LLM) inference. Methodologically, it proposes a lightweight, unsupervised automatic detection framework: first, a systematic hallucination taxonomy is constructed, and diverse hallucinated responses are controllably generated via prompt engineering; second, response embeddings—obtained using a pre-trained embedding model—are projected into a low-dimensional space, where dimensionality reduction and unsupervised clustering reveal distributional separability between hallucinated and truthful responses; finally, the distance from each response’s embedding to the centroid of truthful responses quantifies its hallucination severity. Key contributions include: (i) the first demonstration of controllable hallucination re-generation via prompt engineering; (ii) empirical discovery of a strong correlation between hallucination severity and embedding-space distance to the truthful centroid; and (iii) validation that even simple classifiers achieve high detection accuracy, confirming the framework’s effectiveness in enhancing LLM reliability and its practical deployability.
📝 Abstract
This work introduces a novel methodology for the automatic detection of hallucinations generated during large language model (LLM) inference. The proposed approach is based on a systematic taxonomy and controlled reproduction of diverse hallucination types through prompt engineering. A dedicated hallucination dataset is subsequently mapped into a vector space using an embedding model and analyzed with unsupervised learning techniques in a reduced-dimensional representation of hallucinations with veridical responses. Quantitative evaluation of inter-centroid distances reveals a consistent correlation between the severity of informational distortion in hallucinations and their spatial divergence from the cluster of correct outputs. These findings provide theoretical and empirical evidence that even simple classification algorithms can reliably distinguish hallucinations from accurate responses within a single LLM, thereby offering a lightweight yet effective framework for improving model reliability.