
How Query Rewriting Works
When you enablerewriteQuery: true
, Supermemory:
- Analyzes your original query for intent and key concepts
- Generates multiple rewrites with different phrasings and synonyms
- Executes searches for both original and rewritten queries in parallel
- Merges and deduplicates results from all queries
- Returns unified results ranked by relevance
- Natural language questions (“How do neural networks learn?”)
- Ambiguous terms that could have multiple meanings
- Complex queries with multiple concepts
- Domain-specific terminology that might have synonyms