Contact

What is Query Expansion?

Definition

Query expansion is an information retrieval technique in which a search system enriches the user's query with synonyms, word stems, spelling corrections, related terms or rewritten phrasings so that it can retrieve more relevant documents. Its purpose is to reduce missed results when the words a user types do not literally match the words used in the documents that answer the need.

Also known as: query rewriting, query reformulation, search query expansion

Code and result diagram showing a query expanded with synonyms using OR, raising the number of matches

The vocabulary mismatch problem

People describe the same thing in different words. A user types "laptop screen went black"; the repair page says "no display on notebook monitor". A system that only matches words will never connect the two. Information retrieval calls this vocabulary mismatch, and query expansion is one of the oldest families of techniques for reducing it.

Expansion turns the search query into a richer internal representation. The user doesn't see it: the text in the search box stays the same, but matching happens against a wider set of terms behind the scenes. The gain is recall, meaning more relevant documents make it onto the candidate list.

Common expansion methods

  • Synonyms and related terms: "car" also matches "automobile" and "vehicle". The source can be a hand-built thesaurus or relationships learned from large text collections.
  • Stemming and lemmatisation: "running", "runs" and "ran" reduce to one base form. In heavily inflected languages such as Turkish or Finnish this step matters far more than in English, because a single stem can appear in dozens of surface forms.
  • Spelling correction and normalisation: "recieve" maps to "receive"; queries typed without accents or special characters are normalised the same way.
  • Feedback-based expansion: the system runs an initial search, takes terms that are frequent in the top results and searches again with them added. When no user judgement is involved this is called pseudo-relevance feedback.
  • LLM rewriting: a short or ambiguous query is turned by a language model into a clearer phrasing or into several alternative queries.

Semantic search attacks the same problem from another angle. Because the embeddings of "car" and "automobile" sit close together in vector space, no explicit synonym needs to be added. In practice, modern systems combine term-based expansion with vector matching rather than choosing one.

The trade-off: query drift

Every added term lets new documents in, and not all of them are relevant. A system that expands "jaguar repair" with "big cat" and "wildlife" will show zoo pages to someone looking for a car mechanic. This is known as query drift. Well-designed systems therefore weight added terms below the original ones, restrict expansion by context and rerank the candidate list afterwards, so that higher recall doesn't come at the cost of precision.

Google describes correcting spelling mistakes and running a synonym system that finds relevant documents even when they don't contain the exact words a user typed. In other words, an invisible expansion layer is part of everyday search.

In generative search and retrieval-augmented generation, query rewriting becomes even more central. A short follow-up in a conversation ("and the price?") can't retrieve the right documents until it is merged with earlier context into a self-contained search phrase. The query fan-out technique Google describes for AI Overviews and AI Mode is related but distinct: rather than enriching one query, it issues multiple related searches across subtopics and data sources.

What it means for people who write content

  • There is no need to sprinkle synonyms through a page; retrieval systems already make those connections. Forcing in variants is a fast route to keyword stuffing.
  • When two terms genuinely coexist in your field ("SSL certificate" and "TLS certificate", say), explaining both in a natural sentence helps readers and matching alike.
  • Spell out abbreviations the first time they appear. Expansion systems know common ones but may not know your industry's jargon.
  • Giving each sub-question its own clear section makes it easier for rewritten or split-up queries to match the right passage on your page.

Related terms

← Back to the glossary