Can Generative LLMs Create Query Variants for Test Collections? An Exploratory Study

Marwah Alaofi, Luke Gallagher, Mark Sanderson, Falk Scholer, Paul ThomasarXiv 2025 · DOI

TL;DR

This paper investigates whether Large Language Models (LLMs) can replace expensive crowdsourcing for generating "query variants"—the different ways users phrase the same search intent. The researchers found that while GPT-3.5 doesn't perfectly mimic human phrasing, it retrieves a remarkably similar set of relevant documents, achieving up to a 71.1% overlap with human-driven document pools.

What Problem Does This Paper Address?

In Information Retrieval (IR), we evaluate search engines using "test collections" (like TREC). Traditionally, these collections assume a single query represents a single information need. However, real users are diverse; ten people looking for the same thing will type ten different queries. These "query variants" can lead to vastly different search results, making system evaluation inconsistent if only one variant is tested.

While researchers recognize the need for multiple variants per topic, collecting them is a bottleneck. It currently requires hiring hundreds of crowd workers to read "backstories" (descriptions of a search task) and write queries. This study asks: Can we skip the humans and use an LLM to generate these variants automatically?

Methods

The authors employed GPT-3.5 (text-davinci-003) to generate query variants using an In-Context Learning (ICL) approach.

  1. Prompting Strategy: They used a "one-shot" learning technique. The model was given a task description, one example of a backstory paired with human-generated queries, and then a new target backstory to process.
Figure 1: The prompt used to feed the GPT-3.5 model.
  1. Temperature Variation: They tested three temperature settings ($temp = \{0.0, 0.5, 1.0\}$) to observe how randomness affects the diversity and quality of the generated queries.
  2. Evaluation Metrics:
    • Query Similarity: They compared the LLM queries to human queries using the Jaccard Index and Coverage Ratio, applying text transformations (like removing punctuation or stop words) to find "near-matches."
    • Retrieval Similarity: They ran both sets of queries through a BM25 retriever on a large web corpus and measured the overlap in the resulting document pools.

Datasets

  • UQV100: A specialized test collection containing 100 search backstories and a large set of human-generated query variants for each.
  • ClueWeb12-B: A standard large-scale web crawl used as the document corpus for the retrieval experiments.

Key Insights and Ideas

  • Intent vs. Syntax: The LLM rarely produces the exact same strings as humans (low query similarity). However, the intent it captures is highly effective at finding the same relevant information (high retrieval similarity).
  • The Diversity Gap: Human-generated variants still result in larger and faster-growing document pools. Humans seem to explore a wider "semantic space" of phrasing than the LLM, which tends to be more constrained by the language of the provided backstory.
  • Unjudged Potential: GPT-generated queries retrieved a higher proportion of "unjudged" documents (documents not in the original human-built pool). This suggests LLMs might actually help discover relevant documents that human queries missed, potentially making test collections more complete.

Key Results

  • Modest Query Overlap: Even with relaxed matching (ignoring word order and stop words), the maximum Jaccard index between human and LLM query sets was only 13.5%.
  • High Document Overlap: Despite the phrasing differences, the document pools generated by LLM queries overlapped with human pools by 71.1% for relevant documents at a pool depth of 100.
Comparison of document pool overlap between human and GPT sets. The overlap for relevant documents (right) is significantly higher than for the general pool (left).
  • Effectiveness: Human-generated queries generally outperformed LLM queries on standard metrics like P@10 and NDCG@10, though the gap was relatively small.

Limitations and Future Work

The study was limited to one-shot learning; the authors suggest that "few-shot" learning (providing multiple examples) might further improve the diversity and human-likeness of the queries. Additionally, the "human baseline" (UQV100) is not an exhaustive set of all possible human queries, meaning the LLM might be generating perfectly valid human-like queries that simply weren't present in the specific crowdsourced dataset used for comparison.

Future work could involve human experts manually auditing the "unjudged" documents retrieved by LLMs to see if they are indeed relevant, which would further validate LLMs as a tool for building more robust, comprehensive test collections.

Summary updated

BibTeX
@misc{alaofi2025can,
  author = {Marwah Alaofi and Luke Gallagher and Mark Sanderson and Falk Scholer and Paul Thomas},
  title = {{Can Generative LLMs Create Query Variants for Test Collections? An Exploratory Study}},
  year = {2025},
  eprint = {2501.17981},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.17981},
}
Figure