# CORTEX: Token-Level Hallucination Detection in RAG via Comparative Internal Representations

Source: [CORTEX: Token-Level Hallucination Detection in RAG via Comparative Internal Representations](<https://www.sota2.com/research/paper/6a449f02e0224bd4f4992fc1>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-07-02T05:00:05.660Z

Authors: Kazuaki Furumai, Shuichiro Haruta, Kazunori Matsumoto, Daisuke Kamisaka

Published: 2026-06-30T02:04:24.000Z

## Abstract

In this paper, we propose CORTEX, a token-level hallucination detection method for Retrieval-Augmented Generation (RAG). In long-form RAG outputs, hallucinations often arise in localized spans rather than throughout an entire response. CORTEX therefore identifies ungrounded content at the token level, enabling fine-grained localization of hallucinations. The key intuition behind CORTEX is that tokens grounded in retrieved documents should be more strongly influenced by those documents than hallucinated tokens. To capture this document-induced effect, CORTEX compares internal representations of a large language model (LLM) under two conditions: with and without the retrieved documents. Instead of relying solely on each token's immediate sensitivity to the retrieved documents, CORTEX also leverages the propagation of document-grounded information through preceding tokens, reducing false positives for tokens whose evidence has already been absorbed into the context. Finally, CORTEX applies post-processing smoothing step that models the tendency of hallucination labels to persist over contiguous spans, reducing local noise and encouraging span-consistent predictions. Experiments on two RAG benchmarks and three LLMs show that CORTEX substantially improves token-level hallucination detection, with each component consistently contributing to performance gains.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Answer-level hallucination detection on RAGTruth](<https://www.sota2.com/research/sota/answer-level-hallucination-detection-on-ragtruth.md>): Answer-level hallucination detection; RAGTruth; AP: 75.96.

- [Answer-level hallucination detection on HalluRAG](<https://www.sota2.com/research/sota/answer-level-hallucination-detection-on-hallurag.md>): Answer-level hallucination detection; HalluRAG; AP: 80.1.

- [Token-level hallucination detection on RAGTruth](<https://www.sota2.com/research/sota/token-level-hallucination-detection-on-ragtruth.md>): Token-level hallucination detection; RAGTruth; AP (Token-level): 59.4.

- [Token-level hallucination detection on HalluRAG](<https://www.sota2.com/research/sota/token-level-hallucination-detection-on-hallurag.md>): Token-level hallucination detection; HalluRAG; AP: 76.9.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2606.31033>)

[PDF](<https://arxiv.org/pdf/2606.31033.pdf>)
