Hybrid (keyword + semantic) search
infino_hybrid_searchSearch a table by combining exact keyword matches with semantic intent, fusing BM25 and vector similarity into a single hybrid ranking to return the most relevant rows.
Instructions
Use when a query carries both specific terms and an intent — you want exact-term precision without giving up paraphrase recall. Fuses BM25 over a text column with vector similarity over the embedding column in a single ranking pass, so rows matching the literal terms AND the meaning rank highest; the score is the fused rank (higher is better) plus the columns you project ('columns'; the full text column by default). Embeds the query with a local model (no API key). Sits between infino_keyword_search (literal only) and infino_semantic_search (meaning only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Maximum results. | |
| mode | No | Keyword half: match any query token ('or', the default) or require every token ('and'). | |
| query | Yes | Query text; matched as keyword terms AND embedded for vector similarity. | |
| table | Yes | Table to search. | |
| column | No | Text column for the keyword half; inferred if omitted. | |
| columns | No | Which of the table's columns each hit returns, with full values (a projection passed straight to the engine). Defaults to the text column; '_id' and 'score' are always included. Any column works: ['id'] for compact hits at a large k, ['id', 'text'] to get the full text alongside an id to cite, ['title', 'created_at'] for metadata. Nothing is truncated; read fewer columns or a smaller k to keep results small. | |
| vectorColumn | No | Vector column for the semantic half; inferred if omitted. |