Prompt #108
Back to promptsRAG Query Rewriter
- Variables
- query, topics, strategy
- Tags
- rag,retrieval,query,embedding
- Source
- research-2026-05-01
- Use count
- 0
- Created
- 2026-05-01T18:11:52.162090+00:00
- Updated
- 2026-05-01T18:11:52.162090+00:00
Content
Rewrite the following user query for optimal RAG retrieval.
Original query: {{query}}
Available knowledge base topics: {{topics}}
Retrieval strategy: {{strategy}} (e.g. BM25, dense, hybrid)
Tasks:
1. Identify ambiguities and resolve them
2. Expand acronyms and domain terms
3. Generate 3 alternative phrasings (for query expansion)
4. Extract key entities and concepts for metadata filtering
5. Suggest optimal similarity threshold (0.0-1.0)
6. Final rewritten query: [single optimized query]
Explain each rewriting decision.