What is query rewriting?
People ask questions casually — vague, slangy, full of typos. Query rewriting is the step before search that translates that sentence into a form search likes better: fill in what's missing, expand what's implicit, clean up the wording, so the retrieval system can actually hit the target.Why can't you just search the raw question?
Too casual, too fragmentary"How much is that thing?" — what's "that thing"? The system can't search for it as-is.
It depends on context
"How does it compare to the last one?" Read alone, there's no way to know what "it" means.
How does rewriting work?
Resolve referencesTurn "it" and "this" back into the actual thing, so the question stands alone.
Casual into formal
Turn "how do I" into "how to", "how much" into "what is the price".
Add synonyms
Rewrite "cheap" as "low-priced, affordable" to widen the net.
Why it matters
Search systems work on the literal words; people talk in meaning. Query rewriting is the interpreter in between, turning human speech into something the machine can search well. In multi-turn chats it's nearly mandatory — otherwise the AI answers the wrong question.Bottom line: query rewriting is the interpreter before search, turning human speech into something the machine can hear and search.
Comments