arXiv:2610.13810cs.IROct 2026

Manuscript Offprint

arXiv:2610.13810

Tracing and Taming Hallucinated Terms via Subsequence-Association Filtering and Breadth-Aware Selection for LLM Query Expansion

Amit Kumar Jaiswal, Sagar Uprety, Prayag Tiwari

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Amit Kumar Jaiswal 1^{1}, Sagar Uprety 2^{2}, and Prayag Tiwari 3^{3}

1^{1} Indian Institute of Technology (BHU), Varanasi, India

amit.chr@iitbhu.ac.in

2^{2} University College London, London, UK

s.uprety@ucl.ac.uk

3^{3} Halmstad University, Halmstad, Sweden

prayag.tiwari@hh.se

Abstract. Large language models (LLMs) are now a standard source of query expansion terms but they hallucinate. They inject non-existent entities and off-topic terms that add ranking noise and can hurt strong retrievers. Existing remedies such as corpus grounding, mutual verification and preference alignment treat hallucinated terms as an undifferentiated nuisance to be filtered by agreement heuristics, without a mechanistic account of why a given term appears or a principled criterion for how many terms to keep. We propose Subsequence-Association Filtered, breadth-aware query expansion (SAFE-QE), a training-free, retriever agnostic method that draws on the subsequence-association account of hallucination. We score each candidate expansion term by its corpus conditioned cross-context reproducibility, terms that reappear under randomised query contexts yet lack support in the pseudo-relevant set are flagged as products of dominant hallucinatory associations and down-weighted. Drawing on the characterisation of language generation as a trade-off between consistency (no hallucination) and breadth (coverage), we cast term selection as constrained coverage maximisation over the pseudo-relevant set, keeping a set that is approximately broad but consistent and stable across resampling. We also introduce the Hallucinated Expansion Term Rate, a query side faithfulness metric that counts injected expansion terms no relevant document supports. We evaluate our approach on benchmarked TREC and BEIR collections. Our SAFE-QE is statistically indistinguishable from generative and corpus-steered expansion on nDCG@10 while injecting fewer unsupported terms 4.3 per query against 27.8 for Query2doc and 57.5 for HyDE and on a strong learned sparse retriever, where every expansion method regresses. Faithfulness is therefore available at no measurable cost in ranking quality.

Keywords: Query expansion · Hallucination · Large language models · Pseudo-relevance feedback · Neural retrieval.

A. K. Jaiswal et al.

1 Introduction

Query expansion augmenting a short query with related terms to close the vocabulary gap between queries and documents is one of the oldest and most reliable levers in information retrieval (IR). The current wave of query expansion replaces corpus derived pseudo-relevance feedback (PRF) with terms, keywords, or hypothetical documents generated by large language models (LLMs). Methods such as Query2doc [14], HyDE [2], query expansion by prompting [4], and generative relevance feedback [10] report substantial gains, especially for lexical retrievers such as BM25. Yet these gains are fragile. LLMs hallucinate, they produce fluent text that is factually wrong or unsupported by any relevant document. In query expansion, this manifests as injected non-existent entities and off-topic terms. Two empirical studies make the cost concrete. Weller et al. [15] show across many methods, retrievers, and datasets, a negative correlation between retriever strength and the benefit of expansion, generated expansions help weak retrievers but add additional noise that harms strong ones by introducing false positives near the top of the ranking. Abe et al. [1] identify two failure modes unfamiliar queries, where the LLM introduces non-existent entities or unrelated terms, and ambiguous queries, where expansions collapse onto the most popular sense and narrow coverage. Recent work to ground generation in the corpus are CSQE [7], LameR [12], ThinkQE [8] to cross verify generated and retrieved evidence [5], to filter smaller model generations [9], or to align the generator with ranking preferences via training [16]. These are effective but they share two blind spots. They are mechanism agnostic, a term is kept or dropped by whether it happens to co-occur with retrieved evidence. They lack a principled selection criterion, how many terms to keep, and how to trade coverage against faithfulness is left to a fixed top-k or a tuned weight. We argue that two recent theoretical results [13, 6] supply exactly the missing ingredients, and that is understudied in IR. Sun et al. [13] explain hallucination mechanistically, decoder only transformers behave as subsequence-association models, and hallucination occurs when a dominant hallucinatory association between an input subsequence and an output token outweighs faithful ones. Also, Kalavasis et al. [6] characterise language generation as an intrinsic trade-off between consistency i.e., eventually producing only valid outputs or no hallucination, and breadth refers to covering a rich subset of the target, formalising exact and approximate breadth and the role of generator stability. We detail our underlying notion schematically in Fig. 1.

Inspired by these approaches, we propose SAFE-QE that treats expansion term generation as generation-in-the-limit over the target corpus vocabulary and asks for a term set that is approximately broad but consistent, broad enough to improve recall, yet consistent enough to avoid injecting hallucinated terms. It (a) generates candidate terms with an open LLM, (b) scores each by a lightweight, corpus conditioned analogue of SAT that rewards terms grounded in the pseudo-relevant set and penalises terms whose presence is reproducible across randomised contexts but corpus unsupported, (c) selects a set by submodular coverage maximisation under a grounding constraint. And, (d) keeps only terms that are stable across resampled generations. SAFE-QE is training-free

Figure

Fig. 1. A schematic pipeline of a dominant hallucinated subsequence association makes the LLM emit context-free, ungrounded expansion terms that inject false positives into the ranking, and these terms hurt stronger retrievers.

and retrieve agnostic wrapping any generate-then-expand pipeline. Our contributions can be summarised as follows.

  1. We reframe hallucination in query expansion through the lens of subsequence associations [13] and the consistency breadth stability characterisation of language generation [6].

  2. We introduce SAFE-QE, a training-free method combining a corpus conditioned reproducibility score with breadth-aware, stability checked selection.

  3. We propose HETR, a Hallucinated Expansion Term Rate that quantifies unsupported injected terms via atomic corpus verification, adapting the HALOGEN method [11] to query expansion.