hybridSearch
Combine keyword and semantic searches with configurable weights to retrieve results balancing exact matches and contextually relevant content, enhancing search precision and relevancy.
Instructions
Performs a combined keyword and semantic search, balancing between exact matches and semantic similarity. Requires hybridConfig with weights for both search types.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filter | No | ||
hybridConfig | Yes | ||
namespaceId | No | ||
query | Yes | ||
scoreThreshold | No | ||
searchType | No | ||
tenantId | No | ||
topK | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"filter": {
"additionalProperties": false,
"properties": {
"metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"type": "object"
}
},
"type": "object"
},
"hybridConfig": {
"additionalProperties": false,
"properties": {
"keywordWeight": {
"type": "number"
},
"semanticWeight": {
"type": "number"
}
},
"required": [
"semanticWeight",
"keywordWeight"
],
"type": "object"
},
"namespaceId": {
"type": "string"
},
"query": {
"type": "string"
},
"scoreThreshold": {
"type": "number"
},
"searchType": {
"enum": [
"SEMANTIC",
"HYBRID"
],
"type": "string"
},
"tenantId": {
"type": "string"
},
"topK": {
"type": "number"
}
},
"required": [
"query",
"hybridConfig"
],
"type": "object"
}