# Query Expansion

- **Canonical URL:** https://getaimath.com/dictionary/query-expansion/
- **Topics:** [Retrieval-Augmented Generation (RAG)](https://getaimath.com/dictionary/category/retrieval-augmented-generation-rag/)
- **Last updated:** 2026-11-25

## What is Query Expansion?

**In one sentence:** Query expansion adds related words or alternative phrasings to a search query to find more relevant results.

It helps catch documents that use different words for the same idea.

![RAG (Retrieval-Augmented Generation): The Open-Book Exam — Simple cartoon comparing an AI guessing from memory and making things up versus RAG: 1. Search your real documents, 2. Hand the exact page to the AI, 3. Get a factual answer with a page citation.](https://getaimath.com/diagrams/retrieval-augmented-generation-rag.png)
*Napkin Diagram (Retrieval-Augmented Generation (RAG)): Without RAG, AI answers from blurry memory; with RAG, it opens your real documents to the right page before answering.*

## What is an example of Query Expansion?

Expanding "car repair cost" to also search "vehicle maintenance price" and "auto service fees."

## Why does Query Expansion matter?

Expansion improves recall, so fewer useful documents are missed.

## Related Concepts

- [Query Transformation](https://getaimath.com/dictionary/query-transformation/): Query transformation is rewriting a user's question to make it easier to search for.
- [Hybrid Search](https://getaimath.com/dictionary/hybrid-search/): Hybrid search combines keyword search and semantic vector search to get better results than either alone.
- [Retriever](https://getaimath.com/dictionary/retriever/): A retriever is the component that takes a question and returns the most relevant pieces of information.
- [Reranking](https://getaimath.com/dictionary/reranking/): Reranking reorders search results with a more careful model so the most relevant ones end up on top.
- [Vector Database](https://getaimath.com/dictionary/vector-database/): A vector database is a database built to store embeddings and quickly find the ones most similar to a query.
- [Context Injection](https://getaimath.com/dictionary/context-injection/): Context injection is placing retrieved information into the model's prompt so it can use it to answer.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/query-expansion/)
