AI engineering glossary · RAG vector search
What is query rewriting?
Query rewriting: Transforming a user's question into a form that retrieves better, such as fixing typos, expanding abbreviations or making a follow-up self-contained using chat history. A language model often performs the rewriting before search.
Query rewriting: an example
After 'Tell me about the Pune branch', the follow-up 'and its timings?' is rewritten to 'What are the timings of the Pune branch?'.
Related terms
More RAG vector search terms
- RAG evaluation
- Ragas
- RAPTOR
- Re-embedding
- Recall-latency trade-off
- Reciprocal rank fusion
- Recursive character splitting
- Reranker
Where you learn it
Query rewriting is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.