Query expansion is a retrieval technique that augments a search query with additional terms or related expressions to improve matching.
Query expansion adds synonym terms or related expressions to a search query when relevant documents use different vocabulary. It addresses lexical gaps without changing the retrieval system itself. section 6.4.1section 6.2.1
For grep-based search, add synonyms or relax the regex pattern; “authentication failure” may otherwise miss a document about “login rejection.” section 6.2.1
How LLM Evaluation and Alignment, The Foundational Ideas covers it
How deep it goes
Adds synonym terms or relaxes regex matching at the application layer, without changing the retrieval system.
Examples
Contrasts “authentication failure” with “login rejection” and adds synonym terms or relaxes regex patterns.
What you can do after
Diagnose/debug with it by identifying lexical mismatch behind low context recall and augmenting queries with synonyms or relaxed regex patterns.
How it connects
Connects lexical search with BM25, pattern matching, synonym mapping, and retrieval recall.
AI-Powered SearchQuery expansion is a retrieval technique that augments a query with additional terms or representations to improve matching with relevant content.
The Art of AI Product DevelopmentA retrieval technique that adds terms, variants, or related subqueries to an original search query to improve retrieval results.
knowledge graphused by · A knowledge graph is a graph-structured representation of entities and their semantically meaningful relationships, often including associated attributes or facts.
query transformationused by · Query transformation is the modification or reformulation of a search query to improve its match with a retrieval system’s terminology or representation.
recallmeasures · Recall is the proportion of all relevant or actual positive items that a system successfully retrieves or correctly identifies.
planningalternative to · Planning is the process of determining and organizing intended actions or steps toward a goal, often accounting for conditions or constraints.
retrieval-augmented generationproduced by · Retrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
similarity searchused by · Similarity search is a retrieval technique that finds or ranks items by their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
This explainer was generated by Manning's knowledge graph from the text of LLM Evaluation and Alignment, The Foundational Ideas. The section links point to the parts of the book it draws on.