What this prompt does
This prompt designs a semantic search system for [content_type] using [embedding_model] embeddings. It covers an embedding pipeline for [data_volume] documents, a [vector_db] setup, hybrid search that combines vector similarity with keyword BM25, a search API filtered by [filter_fields], re-ranking with [reranker], semantic auto-complete, similar-item recommendations, real-time plus batch index updates, search analytics, and an A/B testing framework, with embedding-dimension and quantization guidance and a keyword fallback.
The structure works because pure vector search rarely wins alone. Hybrid search recovers exact-match and rare-term queries that embeddings miss, and a [reranker] cleans up the top results where relevance matters most. The keyword fallback keeps search alive when the vector layer is down, and building analytics from day one means you can actually see which queries fail. Quantization and dimension choices are where cost lives, so the prompt makes you decide them deliberately rather than by default.
When to use it
- Adding meaning-based search to docs, a knowledge base, or a product catalog.
- Replacing brittle keyword-only search that misses paraphrased queries.
- Building search over
[data_volume]documents where relevance, not just matching, matters. - Needing a hybrid approach because both exact terms and semantic intent matter.
- Wanting search analytics and A/B testing to tune relevance over time.
- Designing a cost-aware vector setup where quantization and dimensions affect the bill.
Example output
You get an architecture and implementation outline: an embedding-generation pipeline for [embedding_model], [vector_db] schema and index config, a hybrid search function blending vectors and BM25, a search API supporting [filter_fields], a [reranker] step, auto-complete and similar-item logic, an index-update strategy (real-time and batch), an analytics schema (queries, clicks, no-results), an A/B framework, plus notes on embedding dimensions, quantization, and the keyword fallback.
Pro tips
- Match
[embedding_model]dimensions to your[vector_db]plan; higher dimensions cost more memory for marginal relevance gains. - Always keep the keyword fallback wired; when the vector layer is unavailable, degraded search beats no search.
- Capture no-results queries in analytics from launch; they are your highest-signal list of what to fix.
- Use the
[reranker]only on the top-k candidates, not the whole corpus, to control latency and cost. - Tune the hybrid weighting between vector and BM25 against your own
[content_type]; the right balance is data-specific. - Consider quantization once
[data_volume]grows; it cuts storage cost with usually minor recall loss.