Our algorithm combines AI-powered query enhancement, hybrid search techniques, and intelligent reranking to understand user intent (also known as search intent) and return the most accurate results. Upstash Search processes every query through three key stages:Documentation Index
Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
- Input Enrichment: Enhances the search query using AI to better understand user intent.
- Hybrid Vector Search: Combines semantic search and full-text search to find relevant documents.
- Reranking: Uses AI models to reorder results based on relevance.
1. Input Enrichment
The first stage enhances your search query using a Large Language Model (LLM). This process:- Expands the original query with related terms and context
- Improves understanding of user intent
- Handles typos and alternative phrasings
- Adds semantic context that might be missing from the original query
2. Hybrid Vector Search
The second stage performs hybrid search by combining semantic search and full-text search:- Semantic Search: Uses vector embeddings to understand meaning and context
- Full-Text Search: Performs traditional keyword matching
- Result Combination: Merges results using configurable weights
- Higher semantic weight: Better for conceptual searches and finding related content
- Lower semantic weight: Better for exact keyword matching and technical queries
3. Reranking
The final stage reranks the hybrid search results using AI models. Upstash Search offers two reranking options: Advanced Reranking (reranking: true)
- Uses a powerful, state-of-the-art reranking model
- Provides the highest quality results
- Costs $1 per 1K reranking operations
- Recommended for applications where search quality is critical
reranking: false, default)
- Uses a simpler, faster reranking model
- Still provides significant improvements over raw hybrid results
- No additional cost
Conclusion
This three-stage approach ensures that Upstash Search:- Understands Intent: Input enrichment helps the system understand what users are really looking for
- Finds Relevant Content: Hybrid search captures both semantic meaning and exact keyword matches
- Prioritizes Quality: Reranking ensures the most relevant results appear first
- Stays Flexible: Each stage can be configured based on your specific needs