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:
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.
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
While input enrichment introduces some latency, it significantly improves search quality.Input enrichment is enabled by default. You can disable this feature if you want to preserve the user query for full text-search or if you want to reduce latency.
Copy
Ask AI
const results = await index.search({ query: "space opera", inputEnrichment: false // faster but less enhanced results});
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
The result is a search system that works well across all kinds of content and domains, handling everything from precise technical queries to broad conceptual searches.