vector_search
Perform vector similarity searches in Baidu Vector Database by combining vector matching and scalar attribute filtering for precise data retrieval. Specify table, vector, and optional filters to get relevant results efficiently.
Instructions
Perform vector similarity search combining vector similarity and scalar attribute filtering in the Mochow instance.
Args:
table_name (str): Name of the table to search.
vector (list[float]): Search vector.
vector_field (str): Target field containing vectors to search. Defaults to "vector".
limit (int): Maximum number of results. Defaults to 10.
output_fields (Optional[list[str]]): Fields to return in the results. Defaults to None.
filter_expr (Optional[str]): Filter expression for scalar attributes. Defaults to None.
params: Additional vector search parameters
Returns:
str: A string containing the vector search results.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filter_expr | No | ||
limit | No | ||
output_fields | No | ||
table_name | Yes | ||
vector | Yes | ||
vector_field | No | vector |
Input Schema (JSON Schema)
{
"properties": {
"filter_expr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Filter Expr"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
},
"output_fields": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Output Fields"
},
"table_name": {
"title": "Table Name",
"type": "string"
},
"vector": {
"items": {
"type": "number"
},
"title": "Vector",
"type": "array"
},
"vector_field": {
"default": "vector",
"title": "Vector Field",
"type": "string"
}
},
"required": [
"table_name",
"vector"
],
"title": "vector_searchArguments",
"type": "object"
}