Hybrid search
hybrid_searchFuse vector and full-text rankings with reciprocal-rank fusion so rows strong in either semantic or keyword search surface, overcoming gaps in single-method retrieval.
Instructions
Combine vector and full-text ranking via reciprocal-rank fusion (RRF) — pulls candidates from each source, then fuses them so rows ranked highly in EITHER source surface. Closes the gap between pure vector (misses keyword/identifier matches) and pure full-text (misses semantic synonyms). Parameters: vector_column, text_column, query_vector, text_query, plus metric / text_config / limit / candidate_pool / rrf_k tunables. Each match carries vector_rank, fts_rank, the fused rrf_score, and (when present) the original distance + ts_rank values.
Example: hybrid_search(schema='public', table='docs', vector_column='embedding', text_column='body', query_vector=[0.1, ...], text_query='postgresql tuning')
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>",
"table": "<table>",
"vector_column": "<vector_column>",
"text_column": "<text_column>",
"query_vector": "<query_vector>",
"text_query": "<text_query>"
},
"name": "hybrid_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table | Yes | ||
| metric | No | l2 | |
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| text_query | Yes | ||
| text_column | Yes | ||
| text_config | No | english | |
| query_vector | Yes | ||
| vector_column | Yes | ||
| candidate_pool | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | ||
| available | Yes |