What Does This Endpoint Do?
This endpoint intelligently combines two powerful search methods:- Semantic search: Understands the meaning and context of your query
- Keyword search: Finds exact matches for specific terms
When to Use Hybrid Search
You’ll find this endpoint useful when you need to:- Balance precision and recall: Get both exact matches and conceptually similar results
- Handle technical queries: Find documents containing specific terms while understanding context
- Improve search quality: Combine the strengths of both semantic and keyword search
- Handle mixed queries: Search queries that contain both natural language and specific keywords
- Optimize for your use case: Adjust weights based on whether you prioritize semantic understanding or exact matching
How It Works
- You provide a search query that can contain both natural language and keywords
- The system performs semantic analysis using vector embeddings
- Simultaneously, it performs keyword matching on specified text columns
- Results are scored using configurable weights for semantic vs keyword relevance
- A combined score ranks results by overall relevance
Code Examples
Example 1: Basic Hybrid Search
This example shows how to perform a hybrid search with default weights.- Node.js
- Python
- Go
- cURL
Example 2: Custom Weight Configuration
This example shows how to adjust the weights for semantic vs keyword scoring.- Node.js
- Python
- Go
- cURL
Example 3: Custom Text Columns
This example shows how to specify which columns to include in keyword search.- Node.js
- Python
- Go
- cURL
Request Body Explained
Search query combining natural language and keywords. Can include both conceptual descriptions and specific terms.Examples: “machine learning algorithms neural networks”, “AI-powered automation solutions”, “sustainable energy renewable power”
Table to search in.Example: “products”
Columns to include in keyword search. Defaults to [“description”, “content”, “title”, “name”] if not specified.Example: [“title”, “description”, “tags”]
Weight for semantic similarity score (0-1). Default: 0.7. Higher values prioritize semantic understanding over exact keyword matching.
Weight for keyword matching score (0-1). Default: 0.3. Higher values prioritize exact term matching over semantic understanding.
Maximum number of results to return. Range: 1-100, default: 10.
Response Fields Explained
true if the search was successful, false otherwise.Array of search results, each containing:
record: The actual record datacombined_score: Overall relevance score combining semantic and keyword scoressemantic_score: Semantic similarity score (0-1)keyword_score: Keyword matching score (0-1)_meta: Additional metadata including search type and weights used
First 5 dimensions of the query embedding vector for debugging purposes.
Search execution time in milliseconds.
Example Response
Common Errors and How to Fix Them
| Error | Cause | Solution |
|---|---|---|
| ”Table not found” | The specified table doesn’t exist | Check your table name for typos |
| ”No embeddings found” | The table doesn’t have vector embeddings | Ensure your table has been processed for embeddings |
| ”Invalid weight values” | Semantic and keyword weights don’t sum to 1.0 | Ensure weights sum to 1.0 (e.g., 0.7 + 0.3 = 1.0) |
| “Text columns not found” | Specified columns don’t exist in the table | Check column names and ensure they exist |
| ”Query too short” | The search query is too brief | Use more descriptive queries with at least 3-5 words |
| ”Unauthorized” | Invalid or missing API key | Check that you’re using a valid API key |
Tips for Better Results
- Balance your weights: Start with default 0.7/0.3 ratio and adjust based on your needs
- Use descriptive queries: Include both conceptual terms and specific keywords
- Choose relevant text columns: Select columns that contain searchable content
- Experiment with weights:
- Higher semantic weight (0.8-0.9) for conceptual searches
- Higher keyword weight (0.6-0.8) for exact term matching
- Monitor scores: Review individual semantic and keyword scores to understand result quality
- Combine with filters: Use additional WHERE conditions to narrow results after hybrid scoring
Weight Configuration Guidelines
Semantic-Focused (0.8 semantic, 0.2 keyword)
- Use when you want to find conceptually similar content
- Good for discovery and exploration
- Handles synonyms and related concepts well
Balanced (0.7 semantic, 0.3 keyword)
- Default configuration for most use cases
- Provides good balance between precision and recall
- Works well for general-purpose search
Keyword-Focused (0.4 semantic, 0.6 keyword)
- Use when exact term matching is important
- Good for technical documentation and specifications
- Prioritizes precision over conceptual understanding
Equal Weight (0.5 semantic, 0.5 keyword)
- Use when you’re unsure which approach works better
- Good starting point for experimentation
- Provides equal consideration to both methods

