The answer-span oracle·4 min
Query rewriting
0 / 1
A raw question ("When'd they build it?") often retrieves poorly — vague, pronoun-laden, under-specified. Production RAG rewrites the query first: expand acronyms, resolve pronouns, drop filler. We can't grade an LLM rewrite directly, so we use a deterministic rewrite — lowercase, strip stopwords and punctuation, keep the salient content words — and measure whether it moves recall.
Rule-based on purpose
Real systems use an LLM (HyDE, multi-query expansion). We use a rule-based rewrite so the effect is measurable and reproducible. The lesson is that rewriting moves the metric, not the specific rewriter — you could swap in any rewrite behind the same interface.