advancedSpring AI — Core, ChatClient & RAG
What is query rewriting (RewriteQueryTransformer)? Why does it improve RAG quality?
Conversational follow-up queries ("what about its price?") are ambiguous to a vector search on their own. RewriteQueryTransformer uses an LLM to turn them into standalone, specific queries first; MultiQueryExpander generates several variants to improve recall — both plug into RetrievalAugmentationAdvisor.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
What is query rewriting (RewriteQueryTransformer)? Why does it improve RAG quality?