Why the raw question is a poor search query
What it is
Users write the way they talk. Their questions are:
- short ("refund?");
- dependent on earlier messages ("what about for members?");
- multi-part ("what's the fee and can I change my address?");
- vague, or wrapped in chatter ("hi, quick one, sorry to bother you, but...").
The retriever embeds exactly what it is given, so a poor query produces a poor search.
Why it matters
Query transformation puts a cheap language-model step in front of the retriever to turn what the user said into what should be searched. It is often the best-value improvement in a chat-style RAG system, because conversation makes raw questions especially bad queries.
In the real world: A telecom chatbot's accuracy on follow-up questions doubles after the team logs the search queries and sees that half of them were fragments like 'and prepaid?'.
Visual example
Before and afterEach row is a different technique from this module.
Blaming the retriever for results it could never have got right. Before tuning the search, print the exact text that was sent to it. If that text is 'what about for members?', no retriever on earth can find the right passage.