FrontierAI.Engineer
RAG & Grounded Generation

Query Rewriting

Query rewriting transforms a user's original question into one or more alternative queries that are better suited for retrieval. A user's natural language question may be ambiguous, overly brief, or use terminology that differs from the indexed documents. A query rewriter — typically an LLM call before retrieval — expands acronyms, adds context from conversation history, or generates multiple phrasings to improve recall from the document store.