Search & IR · core
Query Rewriting
Expanding, correcting, and normalizing queries before retrieval.
Mental model
Query rewriting cleans up what the user typed before you look it up in the index: fix spelling, expand synonyms, drop stop words, classify intent. Doing this once up front is what makes the rest of the pipeline work — never trust the raw query.
How to study Query Rewriting
Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use Introduction to Information Retrieval (Manning et al.) — §9.2 Query expansion to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.
Next, compare Query Rewriting with Hybrid Search, RAG. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Spell-correct a search query and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.
Proof of understanding
- Explain the mechanism from first principles and identify the state it reads or changes.
- Give one situation where the concept is the right choice and one where it is not.
- Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
- Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.
Learn from primary sources
Practice and explain it back
Spell-correct a search query
Query "javascrpt react hooks" → suggest correction using edit distance ≤2 against vocab ["javascript","react","hooks","python"].
Expected evidence: javascript react hooks.
Open the interactive drill →Review prompts
- Synonym expansion improves recall but precision drops. What is the mechanism, and what is the usual mitigation?
Build evidence
Use a roadmap capstone to turn this concept into working evidence.
Prerequisites
Related concepts
Learning paths
None assigned yet.