Cranfield query 185 asks for experimental studies on panel flutter. Suppose the same need arrives at the end of a short conversation. The first turn is what is known about panel flutter?, the second panels subjected to aerodynamic heating?, and the last experimental studies on it? A search engine given only the last turn sees experimental studies on it. The unit's Cranfield analyzer drops on and it as stopwords, so BM25 sees two terms, experimental and studi. Neither says what was studied. The query's nDCG@10 falls from 0.807 with the full question to 0.070. A reader of the conversation knows at once that it is panel flutter. What should a system send to the search engine in place of the last turn, and how should we judge what it sent?
Conversational query rewriting maps the earlier turns of a conversation $u_1, \dots, u_{n-1}$ and its current turn $u_n$ to one query $\hat q$ that can be searched without the conversation. It is also called query resolution, or question-in-context rewriting. Elgohary, Peskov and Boyd-Graber (2019, Abstract) put the task this way: "given the context of a conversation's history, rewrite a context-dependent into a self-contained question with the same answer." A rewrite written by a person is the gold rewrite, written $q^*$ here. The earlier turns are the history $H = (u_1, \dots, u_{n-1})$. On Cranfield the gold rewrite of the conversation above is query 185 itself.
Here is the route. First we see why a follow-up fails as a query. Two evaluation efforts framed the problem: the CANARD dataset scores a rewrite by its likeness to a human rewrite, and TREC CAsT 2019 scores it by what it retrieves. Then come three ways to rewrite, in order of how much they change the follow-up:
- appending the history;
- selecting history terms (QuReTeC);
- generating a new question with a sequence-to-sequence model.
Three short proofs, for an additive ranker such as BM25, explain what appending history does, why string likeness and retrieval can disagree completely, and when term selection is as good as the human rewrite. Finally an experiment builds conversational versions of all 225 Cranfield queries and measures each kind of rewrite with BM25 and a dense retriever. The article assumes Okapi BM25, nDCG and Dense Passage Retrieval. Most of what follows is a case of Query Expansion. Numbers on this page are computed by tools/experiments/queries-and-conversations/conversational-query-rewriting.py.
Why a follow-up fails as a query
People do not repeat themselves in conversation. Dalton, Xiong and Callan (2020, Section 2) wrote the CAsT conversations to include "common conversation phenomena including coreference and omission". Among the challenges these posed for their relevance assessors (Section 4.1), each question "must be interpreted in the context established by the preceding turn", as in What is throat cancer? followed by Is it treatable? And many turns have "some form of ellipsis, for example, pronouns and implied context that omits words that can be understood from the preceding context." The organizers' resolved version of Is it treatable? is Is throat cancer treatable? (Section 4.1).
Two kinds of omission recur, and they fail differently:
- Anaphora. A pronoun or a short noun phrase stands for something named earlier: it, them, the method. For a lexical ranker the pronoun is usually a stopword. It simply vanishes, and the query loses its subject without any sign of the loss. For a dense encoder the pronoun is encoded, but its vector carries no trace of the thing it stands for.
- Ellipsis. Part of the question is left out altogether: what about its variance? after a question about the mean of an estimator. Nothing in the follow-up marks the gap. The missing words, estimator and the relation between the two questions, must come from the history.
The searcher's need has not changed in either case; only its wording has. So the problem is one of rewriting, not of retrieval. A retriever that works for standalone questions works for these too, once the question stands alone again. The rest of the article takes three ways of rewriting in turn. The system can append the history to the follow-up and let the ranker sort out which words matter. It can select a few words from the history and append those. Or it can write a new, complete question.
The same problem appears in the memory of a language model agent, read from the other side. In MemGPT the model searches its own past messages with queries it writes itself, such as recall_storage.search("six flags") (MemGPT). A query written mid-conversation inherits all the omissions above unless the model resolves them first. LongMemEval found that expanding the query with a time range inferred from the question raised recall on its temporal questions (LongMemEval); that is query rewriting with a structured target. LoCoMo found that retrieving extracted observations about each speaker beat retrieving raw dialogue (Evaluating Very Long-Term Conversational Memory). This article treats the opposite direction. The history is the context, and the collection is searched with a rewritten question.
The task as CANARD defined it
The idea in plain words. Ask people to rewrite each question of real information-seeking dialogues so that it stands alone. Then train systems to reproduce what they wrote.
Elgohary, Peskov and Boyd-Graber (2019) built CANARD from QuAC. QuAC is a dataset of dialogues in which a student asks free-form questions about a hidden Wikipedia section, and a teacher answers with excerpts from it (Choi et al., 2018, Abstract and Section 2.1). CANARD's task is defined in Section 2. The input is the topic, a history of $m - 1$ question and answer turns, and the question $q_m$; the output is a rewrite of $q_m$. The authors state the criterion for a valid rewrite in one sentence: "A valid rewrite $q_m$ should be self-contained: a correct answer to $q_m$ by itself is a correct answer to $q_m$ combined with the question's preceding history H." (In the paper the rewrite carries a bar that distinguishes it from the question.)
How the rewrites were collected (Section 3). Workers on Mechanical Turk saw a dialogue one question at a time, with the answer shown after each rewrite. They were asked to write "in natural sounding English while preserving the sentence structure of the original question", and the authors "encourage workers to create minimal edits". Automatic checks warned about very short rewrites, leftover pronouns and ambiguous words. A script flagged about 15% of the data for an author to review, and 19.9% of submissions were rejected. In a manual check of 50 rewrites, 0.90 were understandable without context and 1.0 had correct coreferences (Table 1). The data has 40,527 questions: 31,538 for training, 3,418 for development and 5,571 for testing. The test set comes from QuAC's development dialogues (Section 3).
How it was scored (Section 4, Table 3). Rewrites were compared with the human rewrites by BLEU, the n-gram overlap measure of machine translation (Papineni et al., 2002), defined in the section after next. Three systems were scored:
| System | BLEU, development | BLEU, test |
|---|---|---|
| Copy (the question unchanged) | 33.84 | 36.25 |
| Pronoun substitution (first pronoun replaced by the article title) | 47.72 | 47.44 |
| Sequence-to-sequence with attention and copying | 51.37 | 49.67 |
A second rewrite by another worker, scored against the first on 100 pairs from the validation set, reached 59.92. The authors note that the neural model improves on the simple baselines by 2 to 4 points and is "still 9 BLEU points below human-accuracy" (Section 4). The paper does not run a question answering or retrieval system on the rewrites. Whether a higher BLEU means better answers is therefore not something CANARD measured, as Vakulenko et al. (2021) note in their review of related work.
Measuring a rewrite by what it retrieves
The idea in plain words. A rewrite is for a search engine. So score the search engine's results for the rewrite, and compare them with its results for the human rewrite of the same turn.
The Conversational Assistance Track of TREC 2019 (CAsT) did this (Dalton, Xiong and Callan, 2020). For each turn of a conversation, systems retrieved short passages "approximately 1-3 sentences in length" that answer it. They were given only the earlier turns: "later turns only depended on the previous utterances, not on system responses" (Section 2). The collection combined about 8 million MS MARCO passages and about 30 million TREC CAR paragraphs. There were 30 training topics and 50 evaluation topics, each with about ten turns. NIST assessors judged 173 turns of 20 evaluation topics on a five-point scale. The pools came from each team's two highest-priority runs, to depth 10 (Section 4.2, Table 2). The main measure was the mean nDCG@3, with MAP and MRR beside it.
The track had two kinds of run. Automatic runs read the raw turns. Manual runs read the organizers' rewrites: "Each utterance was rewritten by two organizers. The results were compared and the disagreements adjudicated to a canonical form" (Section 3.1). A manual run measures the rest of a system with the rewriting done perfectly. The difference between the two kinds therefore measures what rewriting costs. The organizers report it directly: "the gap between the best manual and automatic runs is large, a 26% relative difference in median and 35% relative difference in the best runs" (Section 6). In Tables 4 and 5 the medians are 0.286 (automatic) and 0.361 (manual), and the best runs 0.436 and 0.589. The percentages follow: $0.361/0.286 = 1.262$ and $0.589/0.436 = 1.351$. The gap grew with the depth of the conversation. Automatic runs fell from about 0.3 nDCG@3 at the first turn to 0.23 at the eighth (Section 6.1, Figure 1).
Two of the organizers' findings bear on the methods below (Section 7.1):
- "The most effective method was a form of query expansion leveraging results from previous turns."
- "The only significant gains are from manually designed rules that used query term reweighting and conversational stopword removal."
Query understanding with deep learning models was used by 57% of runs and did 8% worse on average in that year's results (Section 7.1).
Why string likeness is not retrieval effectiveness
CANARD scores a rewrite by how many of its word sequences match the human rewrite. CAsT scores it by what it retrieves. The two can disagree completely, and for a ranker of the kind used on Cranfield the reason can be proved.
BLEU (Papineni et al., 2002, Section 2.3) compares a candidate text with a reference. For $n = 1, \dots, 4$ it counts the candidate's word sequences of length $n$, its $n$-grams. Each count is clipped at the number of times the $n$-gram occurs in the reference. The clipped total divided by the number of the candidate's $n$-grams is the modified precision $p_n$. Let $c$ be the candidate's length and $r$ the reference's. The brevity penalty is $\mathrm{BP} = 1$ if $c > r$ and $e^{1 - r/c}$ otherwise, and
$$\mathrm{BLEU} = \mathrm{BP} \cdot \exp\Big(\sum_{n=1}^{4} \tfrac14 \ln p_n\Big).$$
The counts are summed over a whole test set before the division. For one sentence the same formula applies with that sentence's counts. If any $p_n$ is zero, BLEU is zero.
An additive ranker. BM25 as the Cranfield experiments compute it scores document $d$ by a sum over the query's analyzed terms, counting a repeated term again:
$$s(Q, d) = \sum_{t \in Q} w(t, d).$$
Here $Q$ is the query's list of terms after lowercasing, stopword removal and stemming. The weight $w(t, d)$ is BM25's weight of term $t$ in document $d$, and it does not depend on the other query terms. Okapi BM25 derives the weight; it also discusses the form with saturation in the query, which is not additive in this sense. Query likelihood with smoothing, a sum of log probabilities over the query terms, has the same additive form.
Proposition 1 (what an additive ranker cannot see). Let two rewrites have the same multiset of analyzed terms. Then an additive ranker gives every document the same score for both. So it ranks the collection identically for them, whatever their word order, their stopwords and their surface forms.
Proof. $s(Q, d)$ is a sum of $w(t, d)$ over the elements of $Q$, counted with multiplicity. A sum does not depend on the order of its terms. Equal multisets therefore give equal sums for every $d$, and equal sums give equal rankings. $\square$
Corollary (BLEU zero, retrieval exact). Reverse the order of the gold rewrite's words. The reversed text has the gold rewrite's multiset of terms, so by Proposition 1 an additive ranker retrieves exactly as for the gold rewrite. Its BLEU against the gold rewrite is zero unless some two words occur next to each other in both orders in the gold rewrite. Otherwise the reversed text shares no 2-gram with it, so $p_2 = 0$ and BLEU is zero. For query 185, flutter panel on studies experimental has BLEU 0 against experimental studies on panel flutter, and BM25's ranking for it is identical to the gold rewrite's. The same holds for every one of the 225 Cranfield queries: each reversed query has BLEU 0 against the original and the same BM25 ranking.
The disagreement runs the other way too. Drop the last word, flutter. The candidate experimental studies on panel has four words, and every one of its $n$-grams occurs in the reference. So $p_1 = p_2 = p_3 = p_4 = 1$, and BLEU is the brevity penalty alone, $e^{1 - 5/4} = 0.779$. BM25's nDCG@10 for it is 0.636, against 0.807 for the gold rewrite. One word of five carries much of what the query retrieves, and BLEU charges it only a length penalty. Worked Problem 3 takes this case further.
Vakulenko et al. (2021) found a string measure useful at a coarser level. On CANARD and CAsT they scored rewriting models by ROUGE-1 recall against the human rewrites. They report that this measure "correlates with the human judgement of the question rewriting performance (Pearson 0.69)" (Section 5.2); that is agreement with people's judgments of the rewrites, not with retrieval. Separately, they found that "the QR performance metric is able to correctly predict the model that performs consistently better across both QA tasks" (Section 6). That is a statement about ranking whole rewriting models, the original questions, a coreference system and three neural rewriters, by their average. It does not say that a single rewrite's likeness predicts its retrieval, and Proposition 1 shows it cannot in general. The same paper has a case in point. Keyword baselines that add high-IDF terms from the previous one to three turns to the question ("Original + 1-DT" to "3-DT") "prove to be very strong outperforming both Co-reference and PointerGenerator models on all three performance metrics" of retrieval (Section 6, Table 3). The experiment below shows the same divergence on the methods of this article.
Expanding the follow-up with the history
The idea in plain words. Append the earlier turns to the follow-up. The missing subject is somewhere in the history, so the combined text contains it, along with everything else that was said.
Voskarides et al. (2020, Section 5.4) use four versions of this as baselines:
- the current turn alone (cur);
- the current turn with the previous turn (cur+prev);
- the current turn with the first turn (cur+first);
- all turns (all).
For an additive ranker, appending text has an exact meaning.
Proposition 2 (appending history is score fusion). Let $Q_1, \dots, Q_n$ be the analyzed term lists of the turns. Let the query $Q$ be their concatenation, with turn $i$ repeated $a_i \ge 0$ times. Then for every document $d$
$$s(Q, d) = \sum_{i=1}^{n} a_i\, s(Q_i, d).$$
So ranking by the concatenated query is ranking by a weighted sum of the turns' separate scores. That is CombSUM over the turns' rankings without normalization (Rank Fusion), with integer weights $a_i$.
Proof. The analyzer treats each word on its own: it lowercases, drops stopwords and stems word by word. So the analyzed terms of a concatenation are the concatenation of the analyzed term lists: $Q$ is the list made of $a_i$ copies of each $Q_i$. The sum $\sum_{t \in Q} w(t, d)$ therefore splits into a sum over those copies. Each copy of turn $i$ contributes $\sum_{t \in Q_i} w(t, d) = s(Q_i, d)$, and there are $a_i$ copies. $\square$
Proposition 2 explains the behavior of the four baselines. A turn's weight in the fusion is not chosen. It is whatever the turn's length and term weights make it. A long earlier question on a neighboring subject brings many terms with large weights. It can outvote a short follow-up and pull the ranking toward the earlier subject. Counting the follow-up twice doubles its weight in the sum. That is the simplest form of the "query term reweighting" that CAsT's organizers found effective. A dense encoder has no such identity. It reads the concatenated text as one input, and the vector of a concatenation is not a sum of the turns' vectors. What appending history does to a dense ranking is an empirical question, which the experiment answers for one encoder.
Voskarides et al. (2020, Table 7) report the effect on CAsT for their first-stage ranker, query likelihood with Dirichlet smoothing (Section 3.2). With the current turn alone NDCG@3 was 0.155; with the previous turn appended, 0.235; with the first turn, 0.282; with all turns, 0.256; with the organizers' rewrites, 0.361. On those conversations every way of appending history helped, and the first turn helped most.
Selecting terms from the history: QuReTeC
The idea in plain words. Most of the history is noise for the current turn. Decide, word by word, which history words the current turn needs, and append only those.
Voskarides, Li, Ren, Kanoulas and de Rijke (2020, Section 1) cast query resolution as "a binary term classification task: for each term in the previous turns of the conversation decide whether to add it to the current turn query or not". Terms classified as relevant "are appended to the current turn query". Their model, QuReTeC, reads the history and the current turn as one sequence through a BERT encoder:
$$[\langle\mathrm{CLS}\rangle, \mathrm{terms}(q_1), \dots, \mathrm{terms}(q_{i-1}), \langle\mathrm{SEP}\rangle, \mathrm{terms}(q_i)].$$
A dropout layer, a linear layer and a sigmoid sit on the first sub-token of each history term (Section 4.2). The model is trained with binary cross-entropy.
The labels. For training, a history term is labeled relevant when it is in the gold rewrite, in the history, and not in the current turn (Equation 2):
$$E_{q_i} = \mathrm{terms}(q^*_i) \cap \mathrm{terms}(q_{1:i-1}) \setminus \mathrm{terms}(q_i).$$
To evaluate other methods on the same footing, the authors apply Equation 2 with a method's rewrite in place of $q^*_i$. They compare the resulting term set with $E_{q_i}$ by precision, recall and F1 (Section 5.4.1). The experiment below uses the same device. In this article $\mathrm{terms}(\cdot)$ means the analyzer's stems, so that the labels and the ranker see the same units; the paper uses words.
Distant supervision (Section 4.3). Gold rewrites are expensive. Equation 2 with a relevant passage in place of $q^*_i$ gives labels from relevance judgments alone. The assumption is that a relevant passage shares with the history the context that the current turn omits. The labels are noisier: in the paper's Table 1 example the distant labels add band to the gold labels Saosin and first. Trained on distant labels only, QuReTeC reached an F1 of 56.5 on QuAC, against 41.6 for the distant labels used directly as predictions. Pretrained on distant labels and then trained on 200 gold resolutions, 1% of the gold data, it outperformed the BiLSTM-copy rewriter trained on all of the gold data (Section 6.2, Figure 3).
Results (Tables 5 and 7). On the QuAC test questions QuReTeC's terms had precision 71.5, recall 66.1 and F1 68.7. The BiLSTM-copy rewriter of Elgohary et al. reached an F1 of 59.3, and appending all history 21.9, with recall 100 by construction. In first-stage retrieval on CAsT, QuReTeC's expanded queries reached NDCG@3 0.341. The organizers' rewrites reached 0.361, BiLSTM-copy 0.205 and all history 0.256.
When is term selection as good as a human rewrite? For an additive ranker, Proposition 1 answers exactly.
Proposition 3 (when the labels reproduce the gold ranking). Suppose the follow-up's analyzed terms $\mathrm{terms}(u_n)$, as a list, together with the label set $E$ of Equation 2, form the same multiset as the gold rewrite's analyzed terms. Then an additive ranker ranks the current turn with $E$ appended exactly as it ranks the gold rewrite. The condition holds when three things are true:
- the gold rewrite is the follow-up with a phrase put back in place of a stopword pronoun;
- every term of that phrase occurs in the history;
- no term of the phrase occurs twice in the gold rewrite.
Proof. The first claim is Proposition 1 applied to the two multisets. For the second, write the gold rewrite as $A\,S\,B$ and the follow-up as $A\,p\,B$. Here $S$ is the phrase, $p$ a pronoun on the stop list, and $A$ and $B$ the rest. The analyzer drops $p$, so as multisets $\mathrm{terms}(u_n) = \mathrm{terms}(A) + \mathrm{terms}(B)$ and $\mathrm{terms}(q^*) = \mathrm{terms}(A) + \mathrm{terms}(S) + \mathrm{terms}(B)$. Every term of $S$ is in the history. None is in $A$ or $B$, since otherwise it would occur twice in the gold rewrite. So $E = \mathrm{terms}(S)$ as a set, and also as a multiset because no term of $S$ repeats. Appending $E$ to $u_n$ therefore gives the multiset of $q^*$. $\square$
The proposition also says what can break it. If the pronoun is not on the stop list, the follow-up keeps an extra term; the unit's Cranfield list has it but not them. If a term of the phrase also occurs elsewhere in the question, Equation 2 leaves it out of the label set: the gold rewrite counts it twice, and the follow-up with the labels appended counts it once. And a gold rewrite that adds words found nowhere in the history, as CANARD's rewrites sometimes do, cannot be reached by selecting history terms at all.
Generating the rewrite
The idea in plain words. Train a sequence-to-sequence model on pairs of (history and question, human rewrite), and let it write the whole question.
Elgohary et al. (2019, Section 4) trained a BiLSTM encoder and decoder with attention and a copy mechanism. Its input was the history turns joined by separator tokens, followed by the question. Lin et al. (2020) fine-tuned pretrained sequence-to-sequence and language models on CANARD's training rewrites. Their T5-base model reached BLEU 58.08 on the CANARD test set, against the human 59.92 (Table 3). On the CAsT 2019 evaluation questions, with the organizers' rewrites as references, it reached 75.07. That version of the paper reports BLEU only, not retrieval.
Vakulenko, Longpre, Tu and Anantha (2021) measured generated rewrites by what they retrieved. Their Transformer++ model was initialized with GPT-2 and trained on CANARD. On CAsT 2019, with BM25 retrieval followed by BERT reranking, it reached NDCG@3 0.529 (Table 3). The human rewrites reached 0.589 and the raw questions 0.265 under the same retrieval. Their error analysis attributes most failures to retrieval and answering rather than to the rewriting. By what they call a rough estimate at P@1, retrieval failed on "29% of the test samples" against "11%" for the rewriting (Section 6). They also report that "only 10% of the questions in TREC CAsT were rewriten by human annotators that did not need rewriting to retrieve the correct answer" (Section 6, spelling as printed).
A generated rewrite is the only one of the three kinds that can add words found nowhere in the conversation. It is also the only one that can make the follow-up worse in ways that appending text cannot. It can drop a word of the follow-up, or resolve a pronoun to the wrong thing. Both happen in the experiment below.
An experiment: conversational versions of the Cranfield queries
No conversational test collection is part of this site's experiments, so the experiment makes one from Cranfield. The earlier units use its 225 queries and graded judgments. The construction keeps the judgments valid: each conversation's information need is exactly one Cranfield query, and that query is its gold rewrite.
The construction. For each query and each seed $s = 0, \dots, 29$, a generator random.Random(1000 s + q), with $q$ the query number, makes three choices in this order.
-
A phrase to hide. The query is split into words at spaces. A run is a maximal sequence of consecutive content words. A word is not a content word if it is in a fixed list of function words, if it has no letter, or if punctuation is attached to it (a comma or a parenthesis). The list holds articles, prepositions, question words, auxiliaries, and words that Cranfield queries use to ask, such as study, work and papers. Each run is trimmed so that it starts and ends like a noun phrase:
- words ending in -ly are dropped from either end;
- words ending in -ing are dropped from the start;
- words ending in -ed or -ing are dropped from the end.
A run qualifies if three conditions hold. The start of the query or a word of a first fixed list comes before it: articles, prepositions, and and or. The end of the query or a word of a second fixed list comes after it: prepositions other than of, and, or, as, when, which, that, auxiliaries and modal verbs. It contains no word ending in -ly. Both lists are in the script. The phrase is drawn uniformly from the qualifying runs of two or more words; failing that, from all qualifying runs; failing that, from all runs. Over the 6,750 conversations the three rules chose 5,490, 570 and 690 phrases.
-
The first turn. One of three templates holds the phrase: what is known about …?, tell me about …., i would like to learn about ….
-
An intervening turn. One of the query's five nearest other Cranfield queries is asked in between. Nearness is the cosine of their TF-IDF vectors over the analyzed query terms.
The follow-up is the query with the phrase replaced by it. The pronoun is them instead when the phrase's last word looks plural: it ends in s but not in ss, is, us or ics. An article directly before the phrase is removed with it. The running example is query 185 under seed 0. Its phrase is panel flutter, its first turn what is known about panel flutter?, its intervening turn query 109, panels subjected to aerodynamic heating?, and its follow-up experimental studies on it? The rule is crude, and some follow-ups are ungrammatical (what are them at junctions in pressurized structures?). Of the 6,750 follow-ups, 2,707 use them. Every follow-up hides exactly one phrase, and the phrase is always in the first turn. The intervening turn is always a complete Cranfield query on a neighboring information need. Both are properties of this construction, not of conversations in general.
The rewrites. Ten rewrites of each follow-up are scored:
| Rewrite | What is sent to the retriever |
|---|---|
| gold rewrite | the Cranfield query itself |
| follow-up alone | $u_3$ |
| + previous turn | $u_2$ then $u_3$ |
| + first turn | $u_1$ then $u_3$ |
| + all history | $u_1$, $u_2$, $u_3$ |
| + all, follow-up twice | $u_1$, $u_2$, $u_3$, $u_3$ |
| rule terms | $u_3$ and the history words chosen by the rule below |
| label terms | $u_3$ and the history words in QuReTeC's label set (Equation 2) |
| model referent | $u_3$ with the pronoun replaced by the model's answer to "what does it refer to?" |
| model rewrite | the model's rewrite of $u_3$ |
The rule adds a history term, a stem not in the follow-up, when it occurs in at least 2 of the 10 abstracts that BM25 ranks highest for the follow-up alone. It keeps history terms that co-occur with what the follow-up does say. The label terms use the gold rewrite, so they are not a method. They are the target a term classifier is trained to reproduce, and play the part of QuReTeC trained to perfection. They bound a classifier's agreement with the labels, not its retrieval: another set of terms could retrieve better for a given query.
The model is google/flan-t5-large at revision 0613663d0d48ea86ba8cb3d7a44f0f65dc596a2a. It is an instruction-tuned sequence-to-sequence model of about 780 million parameters (Chung et al., 2024, Table 2), released under the Apache-2.0 license according to its model card. Its training mixture lists QReCC, a dataset of conversations annotated with question rewrites (Chung et al., 2024, Table 13; Anantha et al., 2021). It was prompted, not fine-tuned, and decoded greedily on the CPU with at most 40 new tokens. Two prompts were used:
- for the direct rewrite, two hand-written examples of the task, then the conversation;
- for the referent, the conversation and the question of what the pronoun refers to, with the answer put in the pronoun's place.
The direct rewrite was the slower of the two on this shared machine. So the referent was run for seeds 0 to 4 and the direct rewrite for seed 0 only; the other rewrites use all 30 seeds. A smaller model of the same family, google/flan-t5-base, was tried first on four hand-written conversations (not part of the script) and returned no usable rewrites. The CANARD-trained T5 of Lin et al. (2020) is published without a license statement and was not used.
The retrievers and measures. BM25 is the Cranfield implementation of the earlier units, with $k_1 = 1.2$, $b = 0.75$ and the unit's analyzer and stop list. The dense retriever is the unit's pinned encoder, sentence-transformers/all-MiniLM-L6-v2 at revision 1110a243fdf4706b3f48f1d95db1a4f5529b4d41 (Dense Passage Retrieval). It encodes the rewrite's text as it stands and ranks the 1,400 abstracts by cosine. Each rewrite is scored by nDCG@10 averaged over the 225 queries, and by corpus BLEU against the gold rewrites (lowercased words). The table gives the median over seeds of each average; the retrieval columns add the interquartile range in brackets, and the BLEU column gives the median only. Decoding is greedy, so the model rows' seeds vary the conversations, not the model.
| Rewrite | BM25 nDCG@10 | Dense nDCG@10 | BLEU |
|---|---|---|---|
| gold rewrite | 0.368 | 0.385 | 1.000 |
| follow-up alone | 0.265 [0.260, 0.270] | 0.257 [0.255, 0.263] | 0.768 |
| + previous turn | 0.188 [0.184, 0.195] | 0.138 [0.134, 0.143] | 0.410 |
| + first turn | 0.339 [0.336, 0.340] | 0.366 [0.365, 0.368] | 0.628 |
| + all history | 0.241 [0.235, 0.250] | 0.221 [0.215, 0.228] | 0.359 |
| + all, follow-up twice | 0.280 [0.277, 0.287] | 0.242 [0.238, 0.249] | 0.253 |
| rule terms | 0.286 [0.283, 0.290] | 0.300 [0.296, 0.305] | 0.639 |
| label terms | 0.365 [0.364, 0.366] | 0.377 [0.375, 0.378] | 0.787 |
| model referent (5 seeds) | 0.299 [0.296, 0.299] | 0.305 [0.300, 0.305] | 0.798 |
| model rewrite (seed 0) | 0.214 | 0.232 | 0.454 |
The gold rewrite's dense score, 0.385, differs from the 0.382 reported in Dense Passage Retrieval. The query text here drops Cranfield's final " ."; with the unit's own query vectors the script reproduces 0.382.
What the table shows. Five observations, each about this construction:
- Rewriting mattered. The follow-up alone lost 0.103 of BM25's nDCG@10, from 0.368 to 0.265, or 28% of it. It lost a third of the dense retriever's. In the terms CAsT's organizers used, the human rewrite was 39% ahead of the follow-up alone under BM25. Their median runs differed by 26% and their best by 35%, though the systems are not comparable.
- Here, all of the history was worse than none of it. Appending every earlier turn gave a lower mean than the follow-up alone in 27 of the 30 seeds under BM25, and in all 30 under the dense retriever. The previous turn alone was worse still. Proposition 2 explains the BM25 side. The intervening turn is a whole Cranfield query on a neighboring subject, its terms carry as much weight as the follow-up's, and the fused ranking follows it. On CAsT 2019 the opposite held for query likelihood: all turns scored 0.256 and the previous turn 0.235, against 0.155 for the current turn alone (Voskarides et al., 2020, Table 7). So the loss here is a product of the construction, whose intervening turn is a complete query on another need, and not a general property of appending history. Counting the follow-up twice raised the median from 0.241 to 0.280. Worked Problem 1 shows that weights of 3 and 4 did a little better still.
- The right turn was worth almost as much as the rewrite. At seed 0, the first turn appended to the follow-up came within 0.032 of the gold rewrite under BM25 (95% interval for the gap [+0.020, +0.044]) and within 0.021 under the dense retriever ([+0.008, +0.035]). Here that is partly the construction speaking, since the hidden phrase is always in the first turn. On CAsT 2019 the same baseline (cur+first) was also the best of the four history baselines, at 0.282 against 0.361 for the organizers' rewrites (Voskarides et al., 2020, Table 7); no closer comparison of the two settings is made here.
- Term selection by the labels nearly matched the human rewrite. The label terms scored 0.365 [0.364, 0.366] against 0.368. At seed 0 the difference was 0.003, with a 95% interval of [−0.003, +0.009]. Proposition 3 predicts exact equality for 3,385 of the 6,750 conversations, and the script confirms that the nDCG@10 values agree in every one of them. Of the others, 2,707 have them as the pronoun, which is not on the stop list. The remaining 658 have a hidden term that also occurs elsewhere in the follow-up. The simple rule recovered 0.625 of the labeled terms with precision 0.270 (medians over seeds). It scored above the follow-up alone in every one of the 30 seeds, by 0.037 at seed 0 (95% interval [+0.017, +0.057]).
- The model's referent scored high on BLEU because it keeps the follow-up's wording, and retrieved below the first-turn baseline. Its median BLEU over the five seeds, 0.798, was the highest of any rewrite but the gold one, though not at every seed (at seed 3 the label terms scored higher). It is 0.030 above the bare follow-up, whose words it keeps. Its BM25 score, 0.299 [0.296, 0.299], was well below the first-turn baseline's 0.339 [0.336, 0.340], whose BLEU is 0.628. Its answer was exactly the hidden phrase for 44 to 53 of the 225 queries, depending on the seed. For 54 to 60 it shared more words with the intervening turn than with the first. The direct rewrite copied the follow-up unchanged for 55 queries, kept the pronoun in 89, and restored every term of the hidden phrase in 58. Its BM25 score fell below the follow-up alone by 0.041 at seed 0 (rewrite minus follow-up, 95% interval [−0.073, −0.007]).
How well does likeness to the human rewrite predict retrieval across these methods? Take the nine rewrites other than the gold one, and compare each of the 36 pairs. The order by BLEU and the order by BM25 nDCG@10 agree on 25 pairs and disagree on 11, a Kendall's $\tau$ of 0.39. For the dense retriever the counts are 27 and 9 ($\tau = 0.50$). Likeness was a rough guide to what a rewrite retrieved, as Propositions 1 to 3 allow. The label terms, whose BLEU is lower than the model referent's, retrieved best.
Worked problems
These problems extend the article's results on the running example and on the experiment's conversations; the unit has no course assignments. The script recomputes every number.
Problem 1 (how much weight the follow-up needs). In the running example, appending all history ranks the nonrelevant abstract 391 first. Generalize Proposition 2 to a real weight $w > 0$ on the follow-up, with score $s_w(d) = s(H, d) + w\, s(u_3, d)$ and $H$ the two earlier turns. Find every $w$ for which a relevant abstract is ranked first.
Each abstract's score is a straight line in $w$. Its intercept is the history score and its slope the follow-up score. The first-ranked abstract for a given $w$ is the highest line there. First place can change only where two lines cross, so walking the upper envelope of the lines from $w = 0$ upward finds every change. Three lines matter:
| Abstract | Judged | History score $s(H, d)$ | Follow-up score $s(u_3, d)$ |
|---|---|---|---|
| 391 | not relevant | 27.482 | 0 |
| 856 | relevant | 19.766 | 5.093 |
| 1269 | not relevant | 0 | 5.448 |
Abstract 391 scores highly on the history's terms but contains neither experimental nor studies, so its line is flat. Abstract 1269 matches the follow-up and no term of the history. Abstract 856 matches both. It overtakes 391 where $19.766 + 5.093\,w = 27.482$, at $w = 7.716 / 5.093 = 1.515$. Abstract 1269 overtakes 856 where $5.448\,w = 19.766 + 5.093\,w$, at $w = 19.766 / 0.3556 = 55.6$, the divisor being the difference of the unrounded slopes. The script computes both crossings in exact arithmetic from the unrounded scores and finds no other line on top in between. So a relevant abstract is first exactly for $1.515 < w < 55.6$.
The query's nDCG@10 moves accordingly: 0.620 at $w = 1$ (all history), 0.709 at $w = 2$, 0.738 at $w = 3$, 0.644 at $w = 5$, 0.385 at $w = 10$, and 0.085 at $w = 100$, close to the follow-up alone. With too little weight the earlier turns outvote the follow-up; with too much the history is ignored. Over all 225 queries and 30 seeds, the median of the mean nDCG@10 was 0.241 at $w = 1$, 0.280 at $w = 2$, 0.293 at $w = 3$ and at $w = 4$, and 0.289 at $w = 6$. The first two reproduce the table's "+ all history" and "+ all, follow-up twice", as Proposition 2 requires.
Problem 2 (distant labels from a relevant abstract). QuReTeC's distant supervision replaces the gold rewrite in Equation 2 with a relevant passage. Apply it to the running example with each of query 185's relevant abstracts. Then measure how well distant labels match the gold labels over all 225 conversations of seed 0. For each query, take its best-graded relevant abstract (lowest grade number, then lowest abstract number).
The history's terms not in the follow-up are what, known, about, panel, flutter, subject, aerodynam, heat. The gold labels are {panel, flutter}. Five of the nine relevant abstracts (15, 766, 856, 857 and 858) give exactly the gold labels. Abstracts 859 and 1008 add aerodynam and heat, and 894 adds aerodynam. These are judged relevant to the query and also contain terms of the intervening turn, whose subject is aerodynamic heating. Abstract 285 adds about, a word of the first turn's template that the analyzer does not treat as a stopword. Over the 225 conversations, the distant labels had precision 0.453 and recall 0.551 against the gold labels. The noise has the cause the method's assumption predicts. A relevant passage shares context with the history, including history that the current turn does not refer to.
Problem 3 (one word lost, two ways). Score two rewrites of query 185 that each drop one content word: experimental studies on panel and experimental studies on flutter. Compute BLEU against experimental studies on panel flutter, and BM25's nDCG@10.
The first candidate is a prefix of the reference. All of its $n$-grams occur in the reference, so $p_1 = p_2 = p_3 = p_4 = 1$. With $c = 4 < r = 5$, $\mathrm{BLEU} = e^{1 - 5/4} = e^{-1/4} = 0.779$. Its nDCG@10 is 0.636. The second candidate drops an interior word. Its unigrams all match, so $p_1 = 1$. Of its bigrams experimental studies, studies on and on flutter, two match, so $p_2 = 2/3$. One of its two trigrams matches, so $p_3 = 1/2$. Its one 4-gram does not, so $p_4 = 0$ and BLEU is 0. Its nDCG@10 is 0.521. BLEU separates the two rewrites by the whole of its scale, 0.779 against 0. Retrieval separates them by 0.116, in the same direction, and both lose to the gold rewrite's 0.807. Where the dropped word falls decides BLEU; which word it is decides retrieval.
Problem 4 (a wrong referent can cost more than no referent). For the running example the model, asked what it refers to, answered aerodynamic heating. Score the substituted rewrite and compare it with the follow-up alone. Then count how often a wrong referent from the intervening turn went with a loss.
The rewrite is experimental studies on aerodynamic heating, a well-formed question about the intervening turn's subject. Its BM25 nDCG@10 is 0, against 0.070 for the follow-up alone and 0.807 for the gold rewrite. The first-turn baseline scores 0.710 on this query. The follow-up alone at least keeps the query's own words and adds nothing wrong. The substitution adds two confident wrong terms, which pull the ranking to aerodynamic heating. The model's direct rewrite for the same conversation, What are the experimental studies on panel flutter?, retrieves exactly as the gold rewrite does (0.807). Over seeds 0 to 4, the referent scored below the follow-up alone for 54 to 70 of the 225 queries. For 16 to 27 of those, the model's answer shared more words with the intervening turn than with the first. In aggregate the referent still beat the follow-up alone (0.299 against 0.265), so the loss is a per-query risk, not the average effect. The risk is not peculiar to substitution. The rule appends flutter heating for this query, and heating comes from the intervening turn (nDCG@10 0.517); its precision against the labels is 0.270 overall. Any rewrite that can add words from the wrong turn needs the same check: whether it still retrieves what the follow-up retrieved. Substitution differs in one respect. It replaces the follow-up's only pointer to the subject, while appended terms sit beside the follow-up's own words.
Open questions
- Would a rewriter trained for the task close the gap here? The model used above was prompted, not trained on rewrites. Fine-tune a small sequence-to-sequence model on CANARD's 31,538 training rewrites (Elgohary et al., 2019) and run it on the same 30 seeds of conversational Cranfield. That would settle whether trained generation reaches the first-turn baseline or QuReTeC's labels on this data. On CAsT a trained rewriter came within 0.06 NDCG@3 of the human rewrites (Vakulenko et al., 2021).
- Which results survive on real conversations? Every follow-up here hides one phrase behind one pronoun, the subject is always in the first turn, and the intervening turn is a complete query on another need. Voskarides et al.'s Table 7 already shows one result reversing on CAsT 2019: appending all history helped there. Run all ten rewrites of this article, the rule and the prompted model included, on the CAsT 2019 judged turns with the organizers' rewrites (Dalton, Xiong and Callan, 2020). That would show which parts of the order found here, and which of the model's failures, hold for conversations people wrote.
- What weight should the follow-up get, and does it transfer? Worked Problem 1 shows a window of weights for one query, and the experiment shows two counts of the follow-up beating one. Tune the weight $a_n$ of Proposition 2 on half of the queries and test it on the other half, over the 30 seeds. That would give a defensible default for an additive ranker, and show whether it differs between BM25 and the dense retriever.
- How often do this site's assistant's own queries carry unresolved references? The recorded tool-use runs of Retrieval in a Loop (
tools/experiments/rag/data/runs/loop-tools-*) hold every query two models wrote against the site's search. Count the queries that contain a pronoun or omit a subject named earlier in the run. That would say whether a rewriting step is needed before the site's search, or whether models already write standalone queries.
What is proved here, what is cited, and what the experiment shows
Proved on the page. Three results for an additive ranker, which BM25 with linear query term counts is:
- the ranking depends only on the multiset of analyzed terms, so a rewrite can have BLEU zero against the human rewrite and retrieve exactly as it does (Proposition 1 and its corollary);
- appending turns to the follow-up is CombSUM fusion of the turns' rankings, with weights equal to their repetition counts (Proposition 2);
- QuReTeC's label set reproduces the human rewrite's ranking whenever the rewrite restores, in place of a stopword pronoun, a phrase whose analyzed terms all occur in the history, none of them twice in the rewrite (Proposition 3).
Worked Problem 1 adds the exact window of follow-up weights for one query.
Cited.
- CANARD's construction, criterion and BLEU results (Elgohary, Peskov and Boyd-Graber, 2019), and QuAC's setup (Choi et al., 2018).
- CAsT 2019's task, judgments, run types and the gap between manual and automatic runs (Dalton, Xiong and Callan, 2020).
- QuReTeC's formulation, labels, distant supervision and results (Voskarides et al., 2020).
- T5's BLEU on CANARD and CAsT (Lin et al., 2020); Transformer++'s retrieval results, and the agreement of a string metric with downstream results across models (Vakulenko et al., 2021).
- BLEU's definition (Papineni et al., 2002); the Flan-T5 models and their training mixture (Chung et al., 2024); QReCC (Anantha et al., 2021).
Shown by the experiment. The conversations were built by one rule from Cranfield's 225 queries, over 30 seeds, and scored with one lexical and one dense retriever. On them:
- the follow-up alone lost more than a quarter of BM25's effectiveness and a third of the dense retriever's;
- appending all of the history did worse than appending none of it, and the previous turn alone worse still, the reverse of what Voskarides et al. report on CAsT 2019, which points to the construction's intervening turn;
- counting the follow-up two to four times recovered part of the loss;
- the first turn, which always held the subject, came close to the human rewrite;
- QuReTeC's labels nearly matched it;
- a prompted Flan-T5 model's referent substitutions had the highest median BLEU of any rewrite, mostly inherited from the follow-up's wording, but did not retrieve best, and sometimes named the intervening turn's subject.
These are observations of one synthetic construction on one small collection, with one prompted model on five seeds (one for the direct rewrite). They are not estimates of how the methods behave on conversations people hold.
What we have learned
A follow-up question omits what the conversation has already said. A search engine given only the follow-up searches for less than the person asked. CANARD defined the repair as rewriting the question so that it stands alone, and scored rewrites by their likeness to human rewrites. CAsT 2019 scored them by what they retrieved, and found a gap of about a third between the best runs on human rewrites and on raw turns.
For a ranker that adds up per-term weights, three facts hold exactly. Word order and stopwords cannot affect the ranking, so BLEU can be zero for a rewrite that retrieves exactly as the human one does. Appending the history is score fusion of the turns, weighted by how often each is repeated. And selecting the history terms that QuReTeC's labels name reproduces the human rewrite's ranking whenever the rewrite only restores a phrase hidden behind a stopword pronoun, with its terms all in the history and none repeated. On conversational versions of the Cranfield queries, appending all of the history was worse than appending none of it, the reverse of what was reported on CAsT 2019 and a product of the construction's intervening turn. Counting the follow-up more than once recovered part of the loss. The turn that held the subject was worth almost as much as the human rewrite. A prompted model's referent substitutions had the highest median BLEU of any rewrite, mostly because they keep the follow-up's wording, without retrieving best.
Rewriting assumes that the follow-up has one reading, which the history settles. When it has several, a system can ask the person which was meant; that is the subject of Asking Clarifying Questions. Whether a rewritten query will retrieve well can be estimated before retrieval by Query Performance Prediction. Whether to retrieve for it at all is the subject of Deciding Whether to Retrieve.
References
- Anantha, R., Vakulenko, S., Tu, Z., Longpre, S., Pulman, S., and Chappidi, S. (2021). Open-domain question answering goes conversational via question rewriting. In Proceedings of NAACL-HLT 2021, 520–534. https://doi.org/10.18653/v1/2021.naacl-main.44 record
- Choi, E., He, H., Iyyer, M., Yatskar, M., Yih, W., Choi, Y., Liang, P., and Zettlemoyer, L. (2018). QuAC: Question answering in context. In Proceedings of EMNLP 2018, 2174–2184. https://doi.org/10.18653/v1/D18-1241 record
- Chung, H. W., Hou, L., Longpre, S., Zoph, B., Tay, Y., Fedus, W., Li, Y., Wang, X., Dehghani, M., Brahma, S., et al. (2024). Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70), 1–53. arXiv:2210.11416. record
- Dalton, J., Xiong, C., and Callan, J. (2020). CAsT 2019: The Conversational Assistance Track overview. In Proceedings of the Twenty-Eighth Text REtrieval Conference (TREC 2019), NIST Special Publication 500-331. arXiv:2003.13624. record
- Elgohary, A., Peskov, D., and Boyd-Graber, J. (2019). Can you unpack that? Learning to rewrite questions-in-context. In Proceedings of EMNLP-IJCNLP 2019, 5918–5924. https://doi.org/10.18653/v1/D19-1605 record
- Lin, S.-C., Yang, J.-H., Nogueira, R., Tsai, M.-F., Wang, C.-J., and Lin, J. (2020). Conversational question reformulation via sequence-to-sequence architectures and pretrained language models. arXiv:2004.01909. record
- Papineni, K., Roukos, S., Ward, T., and Zhu, W.-J. (2002). BLEU: A method for automatic evaluation of machine translation. In Proceedings of ACL 2002, 311–318. https://doi.org/10.3115/1073083.1073135 record
- Vakulenko, S., Longpre, S., Tu, Z., and Anantha, R. (2021). Question rewriting for conversational question answering. In Proceedings of WSDM 2021, 355–363. https://doi.org/10.1145/3437963.3441748. arXiv:2004.14652. record
- Voskarides, N., Li, D., Ren, P., Kanoulas, E., and de Rijke, M. (2020). Query resolution for conversational search with limited supervision. In Proceedings of SIGIR 2020, 921–930. https://doi.org/10.1145/3397271.3401130 record