Queries and Conversations

A unit on the query itself as the object of study, for a person typing a few words into a search box and for a language model writing queries in the middle of a conversation. Predicting how well a query will be answered, deciding whether to retrieve at all, rewriting a follow-up question into one that stands alone, asking a clarifying question, recognizing intent, and completing a query as it is typed. Each article says what it proves, what it cites and what its experiment measured, on Cranfield, on public benchmarks and on this site.

Every retrieval method in this collection takes a query as given and asks how to rank documents for it. A query is rarely a good description of what is wanted. A person types three or four words, leaves out what seems obvious, and uses words the documents may not use. A language model writing a query mid-conversation has a different problem: the question it was asked may say "its variance" or "the second one", which mean nothing outside the conversation, and it must decide whether searching will help at all or whether it already knows the answer. This unit studies the query before ranking begins: how good it is, whether to send it, what it means, and how to make it better.

The unit has two readers in mind. The first is the classical searcher, for whom the questions are old: can the system tell when it is failing, what kind of need lies behind a query, how to finish a query as it is typed. The second is a model that retrieves for itself, as in Retrieval-Augmented Generation, for whom the same questions return in a new form: should this turn trigger retrieval, and what standalone query should it send. The two meet in the decision theory: a gate that retrieves, expands or asks only when it pays obeys the same identity whether its signal is a clarity score or a model's confidence.

What the unit assumes

The course's units on retrieval evaluation and on probabilistic retrieval, in particular BM25, Language Models for Retrieval, Query Expansion and Pseudo-Relevance Feedback, which already cover expansion and feedback and are not repeated here; Spelling Correction for correcting a query's words; and How a Web Search Engine Answers a Query, which introduces intent classes and query rewriting at survey level. From this collection, Retrieval in a Loop surveys methods in which a model takes part in retrieval (HyDE, IRCoT, FLARE, Self-RAG, search as a tool call). It introduces the decision to retrieve and the rewriting of a conversational question inside those methods; this unit treats each as a subject in its own right. From statistics: Cross-Entropy and Kullback–Leibler Divergence, Correlation: Pearson, Spearman and Kendall, Bootstrap Confidence Intervals and Calibration and Proper Scoring Rules.

What is proved, cited and measured

Derived or proved on the pages so far: the clarity score as a Kullback–Leibler divergence, with the exact loss under ambiguity (the Jensen–Shannon divergence between the subjects mixed), the concentration of its document weights on long queries, WIG as a normalized difference of query log-likelihoods, a bound that puts BM25's score spread on a common scale, and the identity that says what a gate on expansion can gain; for adaptive retrieval, the optimal gate for any signal, when it is a threshold, the concave frontier it traces between accuracy and retrievals, and the value of reading a ranked list before deciding; and, for rewriting with an additive ranker such as BM25, that appending the conversation history is score fusion of the turns, that word order and stopwords cannot matter (so a rewrite can score zero BLEU and retrieve exactly as the human one does), and when term selection reproduces the human rewrite's ranking. Each article lists its own proofs and citations. Cited and not proved: every published measurement, and the definitions of the methods each article names as cited.

The test beds are Cranfield, with the course's BM25 and the feedback of the course's articles, where every query has judgments; public benchmarks where the question needs them, such as PopQA for adaptive retrieval; and this site's own search, under the rules every page in this collection follows: no claim about the site's rankers that their own top results have not been judged for. Seeded experiments follow the site's convention of 30 runs reported as a median with quartiles. Model runs are on small open models on a processor, pinned by revision, with the scale stated on the page.

Notation

A query is $q$ and a document $d$, as in the course; a passage is $p$, as in Text Embeddings and Dense Retrieval. A predictor or gate signal is $\phi(q)$, and a gate with threshold $\theta$ acts when $\phi(q) \ge \theta$ (or below it, as the article says). The change in effectiveness from an action (expanding, retrieving) is $\Delta_q$. Average precision is AP and its mean over queries MAP. In a conversation the turns are $u_1, \dots, u_n$, with $u_n$ the current utterance; a rewrite is $\hat q$ and a human (gold) rewrite $q^*$. Logarithms are natural unless bits are stated.

How good is a query, and should it be sent?

  • Query Performance Prediction: estimating without judgments how well a query will be answered. Pre-retrieval predictors (IDF, SCQ, query scope), the clarity score derived as a divergence between query and collection language models with its loss under ambiguity proved, WIG and NQC reduced to simpler forms; all measured against average precision on Cranfield with bootstrap intervals; and a test of gating pseudo-relevance feedback on a predictor, which fails there, as an identity proved in the article explains.
  • Deciding Whether to Retrieve: adaptive retrieval as a decision under cost, with the optimal gate for any signal derived, the threshold a calibrated confidence implies, and the value of reading the retrieved list before deciding; entity popularity, the model's own confidence, query performance predictors and the triggers of FLARE and Self-RAG set in that frame; and each gate's trade-off between accuracy and the number of retrievals measured on 1,000 PopQA questions with two small open models.

What does the query mean?

  • Rewriting Questions in a Conversation: turning a follow-up that depends on earlier turns into a query that stands alone; the CANARD task and TREC CAsT 2019 with its manual rewrites, expansion with the history, term selection (QuReTeC) and generative rewriting, with proofs of what an additive ranker such as BM25 makes of a rewrite and why a rewrite is measured by what it retrieves rather than by its likeness to a human one; nine rewrites and the human one compared under BM25 and a dense retriever on conversational versions of the 225 Cranfield queries over 30 seeds.
  • Asking Clarifying Questions: when a query is ambiguous, asking instead of guessing; selecting a question from a pool, the expected gain from asking, the Qulac collection, and conversational search as mixed initiative. Planned.
  • Query Intent and Segmentation: Broder's navigational, informational and transactional intents and their revisions, and splitting a query into phrases by mutual information or by known titles, fed to phrase and proximity scoring. Planned.
  • Query Autocompletion: completing a query as it is typed, from the most popular completion over a trie to time-sensitive and personalized variants, evaluated by mean reciprocal rank and keystrokes saved, worked on this site's titles and headings, since the site keeps no query log. Planned.

References

A reading list for the unit; each article cites its own sources. record

  • Carmel, D., and Yom-Tov, E. (2010). Estimating the Query Difficulty for Information Retrieval. Synthesis Lectures on Information Concepts, Retrieval, and Services. Morgan & Claypool. DOI 10.2200/S00235ED1V01Y201004ICR015; reissued by Springer, DOI 10.1007/978-3-031-02272-2. record · 2 pages
  • Cronen-Townsend, S., Zhou, Y., and Croft, W. B. (2002). Predicting query performance. In Proceedings of SIGIR 2002, 299–306. DOI 10.1145/564376.564429. record · 3 pages