Hypothetical Documents or Knowledge Leakage? Rethinking LLM -based Query Expansion (2025)

Abstract: Query expansion methods powered by large language models (LLMs) have demonstrated effectiveness in zero-shot retrieval tasks. These methods assume that LLMs can generate hypothetical documents that, when incorporated into a query vector, enhance the retrieval of real evidence. However, we challenge this assumption by investigating whether knowledge leakage in benchmarks contributes to the observed performance gains. Using fact verification as a testbed, we analyze whether the generated documents contain information entailed by ground-truth evidence and assess their impact on performance. Our findings indicate that, on average, performance improvements consistently occurred for claims whose generated documents included sentences entailed by gold evidence. This suggests that knowledge leakage may be present in fact-verification benchmarks, potentially inflating the perceived performance of LLM-based query expansion methods.

## introduction zero-shot retrieval aims to identify relevant documents without requiring any relevance supervision for training a retriever @xcite . because obtaining query-document pairs, such as ms-marco @xcite , for supervised training is challenging, developing zero-shot retrieval methods is both difficult and highly desirable for effectively addressing knowledge-intensive applications @xcite , including question answering @xcite and fact verification @xcite . recent studies have leveraged the natural language generation capabilities of large language models (llms) to enhance the performance of zero-shot retrieval @xcite . llmbased query expansion (qe) uses llms to generate documents that extend a query @xcite @xcite . approaches such as hyde @xcite and query2doc @xcite , which have been widely adopted in recent research @xcite @xcite , have achieved notable performance gains across various benchmarks without retriever parameter updates. these approaches prompt llms to generate documents that answer a question or verify a claim. although these generated documents, referred to as hypothetical documents, may contain factual errors or hallucinations, it is assumed that incorporating them into a query can enhance retrieval of relevant real documents @xcite . in this paper, we challenge the underlying assumption, as illustrated by a counterexample in figure 1 : do llms truly generate hypothetical documents, or are they merely reproducing what they already know? llms are extensively pretrained on vast corpora, primarily collected from the web. as common retrieval targets, such as wikipedia and web documents, are often included in these pretraining corpora @xcite @xcite , many available llms may already contain knowledge relevant to a given query and retrieval targets in benchmark datasets, a phenomenon we refer to as knowledge leakage. if knowledge leakage occurs and an llm reproduces what it already knows about a given query, its generation cannot be seen as hypothetical documents. furthermore, assessing qe performance on a benchmark where leakage occurs could lead to overestimation, as retrieving verbatim or semantically equivalent sentences is a much more trivial task than predicting the relevance between a query and document when the relevance signal is not explicit. to investigate whether knowledge leakage exists in popular benchmarks and how it affects downstream performance, this study uses fact verification as a testbed. we analyze whether llmgenerated documents contain sentences entailed by gold evidence and assess their impact on performance. across experiments spanning three benchmarks and seven llms, we observed a consistent trend: qe methods were effective, on average, only when the generated documents included sentences entailed by gold evidence. these findings suggest that knowledge leakage may be present in these benchmarks, potentially inflating the perceived effectiveness of llm-based qe methods. ## experimental results we conducted evaluation experiments on three factverification benchmarks. based on eight repetitions of llm generation, we report the average performance along with the standard error. as shown in ## discussion query2doc and hyde boosted fact-verification performance across three benchmarks. our findings support the effectiveness of llm-based query expansion in zero-shot retrieval tasks @xcite @xcite , particularly on factverification benchmarks. the increased verification performance through query expansion further highlights the crucial role of retrieving suitable evidence for claim verification @xcite , suggesting a need for further research into evidence retrieval methods, such as claim decomposition @xcite . documents generated by llm-based query expansion methods frequently included sentences that were entailed by ground-truth evidence, indicating potential knowledge leakage. by applying an nli-based matching algorithm, we examined whether llms reproduced gold evidence in response to query expansion prompts. our results suggest that the seven llms studied in this paper were likely exposed to knowledge sources from the three benchmarks during training. this observation aligns with prior research on data leakage @xcite and memorization in llms @xcite , representing the first empirical demonstration in the context of fact verification and query expansion. performance improvements from query expansion were consistent only when llm-generated documents contained sentences entailed by gold evidence. this finding suggests that the success of hypothetical document generation may be largely attributable to the llm's internal knowledge encompassing benchmark knowledge sources. furthermore, these results indicate that llm-based query expansion may be limited in real-world scenarios that require retrieving niche or novel knowledge. future research could address these limitation by incorporating external knowledge sources into the query expansion process, as demonstrated in a recent study @xcite . ## conclusion this study examined the leakage hypothesis for query expansion, questioning whether an llm generates truly hypothetical documents or merely reproduces what was exposed during the llm's training phase. through experiments on three widely used fact-verification benchmarks, we observed a consistent trend: on average, retrieval and verification performance increased only when the expanded query was entailed by gold evidence. this finding suggests that knowledge leakage may be present in these benchmarks, artificially inflating the perceived effectiveness of llm-based query expansion. since verifying claims involving niche or novel knowledge is often essential in real-world scenarios, such leakage can hinder accurate evaluation and, consequently, impede method development. these results highlight the need for future research on llm-based query expansion methods capable of handling unknown queries, as well as the creation of evaluation benchmarks that more accurately reflect real-world conditions involving previously unseen knowledge.