Query rewriting

Rephrasing a search request before retrieval so the search system can find the intended material. In a conversation, this can mean turning a follow-up into a question that makes sense on its own.

Query rewriting, common card #256 in The Glitch AI glossary: Rephrasing a search request before retrieval so the search system can find the intended material. In a conversation, this can mean turning a follow-up into a question that makes sense on its own.
GLS 256 · common

Also called: Query reformulation.

For: Builders · Marketers

Why it matters

Someone searching a product manual can say “Does it work offline?” The document index may need the product name and feature from the previous turn to retrieve the right section.

In practice

Try writing the search you would send to the index. Start with “How do I export a route from Map A?” Then ask “And offline?” A useful rewrite is “Can Map A export a route while offline?” Searching for “offline maps” drops the export task and could surface instructions for downloading a map instead.

Watch for

A rewrite should preserve uncertainty. If two products were under discussion and “it” could mean either one, ask which product before looking up an answer.

Related terms

Conversational search · Query fan-out · Semantic search

Try it here

See how an AI visibility audit works

Sources

Use in an AI agent: connect MCP at https://www.theglitch.ai/mcp and call get_glossary_term with query-rewriting, or read the Markdown edition.

Definition updated 2026-11-27.

The Ultimate AI Glossary (2027): every term