Query rewriting transforms a user’s original query into an alternative search-engine query that preserves the original intent while improving recall, precision, or ranking. In a semantic search pipeline, parsing extracts entities and relationships, enrichment adds context and semantic relationships, and transformation converts the enriched query into executable engine syntax. section 5.4.5 section 7.4
Common rewriting strategies adjust which terms must match and how strongly related terms influence ranking:
- Expand the query with semantically related terms while retaining the original query, favoring recall. section 5.4.5
- Require a minimum percentage or number of terms to match, shifting results toward precision. section 5.4.5
- Require the original term while boosting related terms, improving top-result precision without necessarily reducing recall. section 5.4.5
- Rewrite an enriched query tree into engine-specific syntax, including filters, boosts, categories, functions, and geographic constraints. section 7.4.4
Expanding “vibranium” with a semantic knowledge graph
A semantic knowledge graph can associate “vibranium” with terms such as “wakandan,” “adamantium,” and “wakanda,” each weighted by relatedness. A rewritten query might preserve “vibranium” with a strong boost, append the related terms with smaller boosts, and apply a minimum-match rule. Requiring “vibranium” emphasizes precision; allowing two matching terms increases recall; applying boosts without adding terms changes ranking while keeping the initial result set.




