OpenAI
Use an OpenAI embedding model with Zilliz Cloud by choosing an embedding model and creating a collection with a text embedding function.
Model choices
Zilliz Cloud supports all embedding models provided by OpenAI. Below are the available OpenAI embedding models for quick reference:
| Model Name | Dimensions | Max Tokens | Description |
|---|---|---|---|
| text-embedding-3-small | Default: 1,536 (can be shortened to a dimension size below 1,536) | 8,191 | Ideal for cost-sensitive and scalable semantic search—offers strong performance at a lower price point. |
| text-embedding-3-large | Default: 3,072 (can be shortened to a dimension size below 3,072) | 8,191 | Best for applications demanding enhanced retrieval accuracy and richer semantic representations. |
| text-embedding-ada-002 | Fixed: 1,536 (cannot be shortened) | 8,191 | A previous-generation model suited for legacy pipelines or scenarios requiring backward compatibility. |
The third generation embedding models (text-embedding-3) support reducing the size of the embedding via a dim parameter. Typically larger embeddings are more expensive from a compute, memory, and storage perspective. Being able to adjust the number of dimensions allows more control over overall cost and performance. For more details about each model, refer to Embedding models and OpenAI announcement blog post.
Before you start
Before using a text embedding function, make sure the following prerequisites are met:
-
Choose an embedding model
Decide which embedding model to use, as this choice determines the embedding behavior and output format. See Choose an embedding model for details.
-
Integrate with OpenAI and get your integration ID
You must create a model provider integration with OpenAI and get your integration ID before using any embedding models provided by it. See Integrate with Model Providers for details.
-
Design a compatible collection schema
Plan your collection schema to include:
-
A text field (
VARCHAR) for raw input text -
A dense vector field whose data type and dimension match the selected embedding model
-
-
Prepare to work with raw text at insert and search time
With a text embedding function enabled, you insert and query raw text directly. Embeddings are generated automatically by the system.
Step 1: Create a collection with a text embedding function
Define schema fields
To use an embedding function, create a collection with a specific schema. This schema must include at least three necessary fields:
-
The primary field that uniquely identifies each entity in a collection.
-
A
VARCHARfield that stores raw data to be embedded. -
A vector field reserved to store dense vector embeddings that the text embedding function will generate for the
VARCHARfield.
The following example defines a schema with one VARCHAR field "document" for storing text data and one vector field "dense" for storing dense embeddings to be generated by the text embedding function. Remember to set the vector dimension (dim) to match the output of your chosen embedding model.
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
from pymilvus import MilvusClient, DataType, Function, FunctionType
# Initialize Milvus client
client = MilvusClient(
uri="YOUR_CLUSTER_ENDPOINT",
token="YOUR_CLUSTER_TOKEN"
)
# Create a new schema for the collection
schema = client.create_schema()
# Add primary field "id"
schema.add_field("id", DataType.INT64, is_primary=True, auto_id=False)
# Add scalar field "document" for storing textual data
schema.add_field("document", DataType.VARCHAR, max_length=9000)
# Add vector field "dense" for storing embeddings.
# IMPORTANT: Set dim to match the exact output dimension of the embedding model.
# For instance, OpenAI's text-embedding-3-small model outputs 1536-dimensional vectors.
# For dense vector, data type can be FLOAT_VECTOR or INT8_VECTOR
schema.add_field("dense", DataType.FLOAT_VECTOR, dim=1536)
import io.milvus.v2.common.DataType;
import io.milvus.v2.client.ConnectConfig;
import io.milvus.v2.client.MilvusClientV2;
import io.milvus.v2.service.collection.request.AddFieldReq;
import io.milvus.v2.service.collection.request.CreateCollectionReq;
String CLUSTER_ENDPOINT = "YOUR_CLUSTER_ENDPOINT";
String TOKEN = "YOUR_CLUSTER_TOKEN";
ConnectConfig connectConfig = ConnectConfig.builder()
.uri(CLUSTER_ENDPOINT)
.token(TOKEN)
.build();
MilvusClientV2 client = new MilvusClientV2(connectConfig);
CreateCollectionReq.CollectionSchema schema = client.createSchema();
schema.addField(AddFieldReq.builder()
.fieldName("id")
.dataType(DataType.Int64)
.isPrimaryKey(true)
.autoID(false)
.build());
schema.addField(AddFieldReq.builder()
.fieldName("document")
.dataType(DataType.VarChar)
.maxLength(9000)
.build());
schema.addField(AddFieldReq.builder()
.fieldName("dense")
.dataType(DataType.FloatVector)
.dimension(1536)
.build());
import "github.com/milvus-io/milvus/client/v3/entity"
schema := entity.NewSchema().
WithField(entity.NewField().WithName("id").WithDataType(entity.FieldTypeInt64).WithIsPrimaryKey(true).WithIsAutoID(false)).
WithField(entity.NewField().WithName("document").WithDataType(entity.FieldTypeVarChar).WithMaxLength(9000)).
WithField(entity.NewField().WithName("dense").WithDataType(entity.FieldTypeFloatVector).WithDim(1536))
use milvus::v2::prelude::*;
let schema = CollectionSchema::new()
.add_field(FieldSchema::new().name("id").data_type(DataType::Int64).primary_key(true).auto_id(false))
.add_field(FieldSchema::new().name("document").data_type(DataType::VarChar).max_length(9000))
.add_field(FieldSchema::new().name("dense").data_type(DataType::FloatVector).dimension(1536));
#include "milvus/MilvusClientV2.h"
#include <iostream>
auto client = milvus::MilvusClientV2::Create();
milvus::ConnectParam connect_param{"YOUR_CLUSTER_ENDPOINT", "YOUR_CLUSTER_TOKEN"};
auto status = client->Connect(connect_param);
if (!status.IsOk()) {
std::cout << status.Message() << std::endl;
}
milvus::CollectionSchemaPtr schema = std::make_shared<milvus::CollectionSchema>();
schema->AddField({"id", milvus::DataType::INT64, "", true, false});
schema->AddField(milvus::FieldSchema("document", milvus::DataType::VARCHAR).WithMaxLength(9000));
schema->AddField(milvus::FieldSchema("dense", milvus::DataType::FLOAT_VECTOR).WithDimension(1536));
import { MilvusClient, DataType } from '@zilliz/milvus2-sdk-node';
const client = new MilvusClient({
address: 'YOUR_CLUSTER_ENDPOINT',
});
// Define the collection schema
const schema = {
fields: [
{ name: 'id', data_type: DataType.Int64, is_primary_key: true, autoID: false },
{ name: 'document', data_type: DataType.VarChar, max_length: 9000 },
{ name: 'dense', data_type: DataType.FloatVector, dim: 1536 },
],
};
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Collection;
using Milvus.Client.V2.Requests.Dml;
using Milvus.Client.V2.Requests.Dql;
using Milvus.Client.V2.Requests.Index;
using Milvus.Client.V2.Types;
// Initialize Milvus client
var client = new MilvusClientV2(new ConnectConfig
{
Uri = "YOUR_CLUSTER_ENDPOINT",
Username = "root",
Password = "Milvus"
});
// Create a new schema for the collection
var schema = new CollectionSchema { Name = "demo" };
// Add primary field "id"
schema.Fields.Add(new FieldSchema("id", DataType.Int64, isPrimaryKey: true));
// Add scalar field "document" for storing textual data
schema.Fields.Add(new FieldSchema("document", DataType.VarChar) { MaxLength = 9000 });
// Add vector field "dense" for storing embeddings (dim must match the embedding model output)
schema.Fields.Add(FieldSchema.CreateFloatVector("dense", 1536));
# Define the collection schema
SCHEMA='{
"fields": [
{ "fieldName": "id", "dataType": "Int64", "isPrimary": true },
{ "fieldName": "document", "dataType": "VarChar", "elementTypeParams": { "max_length": "9000" } },
{ "fieldName": "dense", "dataType": "FloatVector", "elementTypeParams": { "dim": "1536" } }
]
}'
Define the text embedding function
The text embedding function automatically converts raw data stored in a VARCHAR field into embeddings and stores them into the explicitly defined vector field.
The example below adds a Function module (openai_embedding) that converts the scalar field "document" into embeddings, storing the resulting vectors in the "dense" vector field defined earlier.
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
# Define embedding function (example: OpenAI provider)
text_embedding_function = Function(
name="openai_embedding", # Unique identifier for this embedding function
function_type=FunctionType.TEXTEMBEDDING, # Type of embedding function
input_field_names=["document"], # Scalar field to embed
output_field_names=["dense"], # Vector field to store embeddings
params={ # Provider-specific configuration (highest priority)
"provider": "openai", # Embedding model provider
"model_name": "text-embedding-3-small", # Embedding model
"integration_id": "YOUR_INTEGRATION_ID", # Integration ID generated in the Zilliz Cloud console for the selected model provider
# "dim": "1536", # Optional: shorten the vector dimension
# "user": "user123" # Optional: identifier for API tracking
}
)
# Add the embedding function to your schema
schema.add_function(text_embedding_function)
import io.milvus.common.clientenum.FunctionType;
import io.milvus.v2.service.collection.request.CreateCollectionReq.Function;
import java.util.Collections;
Function function = Function.builder()
.functionType(FunctionType.TEXTEMBEDDING)
.name("openai_embedding")
.inputFieldNames(Collections.singletonList("document"))
.outputFieldNames(Collections.singletonList("dense"))
.param("provider", "openai")
.param("model_name", "text-embedding-3-small")
.param("integration_id", "YOUR_INTEGRATION_ID")
.build();
schema.addFunction(function);
import "github.com/milvus-io/milvus/client/v3/entity"
function := entity.NewFunction().
WithName("openai_embedding").
WithType(entity.FunctionTypeTextEmbedding).
WithInputFields("document").
WithOutputFields("dense").
WithParam("provider", "openai").
WithParam("model_name", "text-embedding-3-small")
function = function.WithParam("integration_id", "YOUR_INTEGRATION_ID")
schema.WithFunction(function)
use milvus::v2::prelude::*;
use std::collections::HashMap;
let function = Function::new()
.name("openai_embedding")
.function_type(FunctionType::TextEmbedding)
.input_fields(["document"])
.output_fields(["dense"])
.params(HashMap::from([
("provider".into(), "openai".into()),
("model_name".into(), "text-embedding-3-small".into()),
("integration_id".into(), "YOUR_INTEGRATION_ID".into()),
]));
let schema = schema.add_function(function);
milvus::FunctionPtr function = std::make_shared<milvus::Function>("openai_embedding", milvus::FunctionType::TEXTEMBEDDING);
function->AddInputFieldName("document");
function->AddOutputFieldName("dense");
function->AddParam("provider", "openai");
function->AddParam("model_name", "text-embedding-3-small");
function->AddParam("integration_id", "YOUR_INTEGRATION_ID");
schema->AddFunction(function);
const openaiFunc = {
name: 'openai_embedding',
type: 'TextEmbedding',
input_field_names: ['document'],
output_field_names: ['dense'],
params: {
provider: 'openai',
model_name: 'text-embedding-3-small',
integration_id: 'YOUR_INTEGRATION_ID',
},
};
using Milvus.Client.V2;
// Note: text embedding functions are not yet supported in milvus-sdk-csharp as of v3.0.0
// (FunctionSchema.Params cannot be populated externally).
# Define the text embedding function
FUNCTION='{
"name": "openai_embedding",
"type": "TextEmbedding",
"inputFieldNames": ["document"],
"outputFieldNames": ["dense"],
"params": {
"provider": "openai",
"model_name": "text-embedding-3-small"
,"integration_id": "YOUR_INTEGRATION_ID"
}
}'
Configure the index
After defining the schema with necessary fields and the built-in function, set up the index for your collection. To simplify this process, use AUTOINDEX as the index_type, an option that allows Zilliz Cloud to choose and configure the most suitable index type based on the structure of your data.
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
# Prepare index parameters
index_params = client.prepare_index_params()
# Add AUTOINDEX to automatically select optimal indexing method
index_params.add_index(
field_name="dense",
index_type="AUTOINDEX",
metric_type="COSINE"
)
import io.milvus.v2.common.IndexParam;
import java.util.ArrayList;
import java.util.List;
List<IndexParam> indexes = new ArrayList<>();
indexes.add(IndexParam.builder()
.fieldName("dense")
.indexType(IndexParam.IndexType.AUTOINDEX)
.metricType(IndexParam.MetricType.COSINE)
.build());
import (
"github.com/milvus-io/milvus/client/v3/entity"
"github.com/milvus-io/milvus/client/v3/index"
"github.com/milvus-io/milvus/client/v3/milvusclient"
)
indexOption := milvusclient.NewCreateIndexOption("demo", "dense", index.NewAutoIndex(entity.COSINE))
use milvus::v2::prelude::*;
let index_params = vec![
IndexParam::new()
.field_name("dense")
.index_type(IndexType::AutoIndex)
.metric_type(MetricType::Cosine),
];
std::vector<milvus::IndexDesc> indexes = {
milvus::IndexDesc("dense", "", milvus::IndexType::AUTOINDEX, milvus::MetricType::COSINE)
};
// Prepare index parameters
const indexParams = {
field_name: 'dense',
index_type: 'AUTOINDEX',
metric_type: 'COSINE',
};
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Collection;
using Milvus.Client.V2.Requests.Dml;
using Milvus.Client.V2.Requests.Dql;
using Milvus.Client.V2.Requests.Index;
using Milvus.Client.V2.Types;
// Prepare index parameters
var indexParams = new[]
{
new IndexParam("dense", null, IndexType.AutoIndex, MetricType.Cosine)
};
# Define the index parameters
indexParams='{
"fieldName": "dense",
"indexName": "dense_index",
"indexType": "AUTOINDEX",
"metricType": "COSINE"
}'
Create the collection
Now create the collection using the schema and index parameters defined.
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
# Create collection named "demo"
client.create_collection(
collection_name='demo',
schema=schema,
index_params=index_params
)
import io.milvus.v2.service.collection.request.CreateCollectionReq;
CreateCollectionReq requestCreate = CreateCollectionReq.builder()
.collectionName("demo")
.collectionSchema(schema)
.indexParams(indexes)
.build();
client.createCollection(requestCreate);
import (
"log"
"github.com/milvus-io/milvus/client/v3/milvusclient"
)
err = client.CreateCollection(ctx, milvusclient.NewCreateCollectionOption("demo", schema).WithIndexOptions(indexOption))
if err != nil {
log.Fatal(err)
}
use milvus::v2::prelude::*;
client
.create_collection(
CreateCollectionRequest::builder()
.collection_name("demo")
.schema(schema)
.index_params(index_params)
.build()?,
)
.await?;
status = client->CreateCollection(milvus::CreateCollectionRequest()
.WithCollectionName("demo")
.WithIndexes(std::move(indexes))
.WithCollectionSchema(schema));
if (!status.IsOk()) {
std::cout << status.Message() << std::endl;
}
await client.createCollection({
collection_name: 'demo',
fields: schema.fields,
functions: [openaiFunc],
});
// Create the index on the dense vector field
await client.createIndex({
collection_name: 'demo',
...indexParams,
});
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Collection;
using Milvus.Client.V2.Requests.Dml;
using Milvus.Client.V2.Requests.Dql;
using Milvus.Client.V2.Requests.Index;
using Milvus.Client.V2.Types;
// Create collection named "demo"
await client.CreateCollectionAsync(new CreateCollectionReq
{
CollectionName = "demo",
Schema = schema,
Indexes = indexParams
});
curl --request POST \
--url "YOUR_CLUSTER_ENDPOINT/v2/vectordb/collections/create" \
--header "Authorization: Bearer YOUR_CLUSTER_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"collectionName": "demo",
"schema": {
"fields": [
{ "fieldName": "id", "dataType": "Int64", "isPrimary": true },
{ "fieldName": "document", "dataType": "VarChar", "elementTypeParams": { "max_length": "9000" } },
{ "fieldName": "dense", "dataType": "FloatVector", "elementTypeParams": { "dim": "1536" } }
],
"functions": [
{
"name": "openai_embedding",
"type": "TextEmbedding",
"inputFieldNames": ["document"],
"outputFieldNames": ["dense"],
"params": {
"provider": "openai",
"model_name": "text-embedding-3-small"
}
}
]
},
"indexParams": [
{
"fieldName": "dense",
"indexName": "dense_index",
"indexType": "AUTOINDEX",
"metricType": "COSINE"
}
]
}'
Step 2: Insert data
After setting up your collection and index, you're ready to insert your raw data. In this process, you need only to provide the raw text. The Function module we defined earlier automatically generates the corresponding sparse vector for each text entry.
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
# Insert sample documents
client.insert('demo', [
{'id': 1, 'document': 'Milvus simplifies semantic search through embeddings.'},
{'id': 2, 'document': 'Vector embeddings convert text into searchable numeric data.'},
{'id': 3, 'document': 'Semantic search helps users find relevant information quickly.'},
])
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import io.milvus.v2.service.vector.request.InsertReq;
import java.util.Arrays;
import java.util.List;
Gson gson = new Gson();
List<JsonObject> rows = Arrays.asList(
gson.fromJson("{\"id\": 0, \"document\": \"Milvus simplifies semantic search through embeddings.\"}", JsonObject.class),
gson.fromJson("{\"id\": 1, \"document\": \"Vector embeddings convert text into searchable numeric data.\"}", JsonObject.class),
gson.fromJson("{\"id\": 2, \"document\": \"Semantic search helps users find relevant information quickly.\"}", JsonObject.class)
);
client.insert(InsertReq.builder()
.collectionName("demo")
.data(rows)
.build());
import (
"log"
"github.com/milvus-io/milvus/client/v3/milvusclient"
)
_, err = client.Insert(ctx, milvusclient.NewRowBasedInsertOption("demo",
map[string]any{"id": int64(1), "document": "Milvus simplifies semantic search through embeddings."},
map[string]any{"id": int64(2), "document": "Vector embeddings convert text into searchable numeric data."},
map[string]any{"id": int64(3), "document": "Semantic search helps users find relevant information quickly."},
))
if err != nil {
log.Fatal(err)
}
use milvus::v2::prelude::*;
use serde_json::json;
let rows = vec![
json!({"id": 1, "document": "Milvus simplifies semantic search through embeddings."}),
json!({"id": 2, "document": "Vector embeddings convert text into searchable numeric data."}),
json!({"id": 3, "document": "Semantic search helps users find relevant information quickly."}),
];
client
.insert(
InsertRequest::builder()
.collection_name("demo")
.rows(rows)
.build()?,
)
.await?;
milvus::EntityRows data = {
{{"id", 1}, {"document", "Milvus simplifies semantic search through embeddings."}},
{{"id", 2}, {"document", "Vector embeddings convert text into searchable numeric data."}},
{{"id", 3}, {"document", "Semantic search helps users find relevant information quickly."}}
};
milvus::InsertResponse insert_response;
status = client->Insert(milvus::InsertRequest()
.WithCollectionName("demo")
.WithRowsData(std::move(data)),
insert_response);
if (!status.IsOk()) {
std::cout << status.Message() << std::endl;
}
await client.insert({
collection_name: 'demo',
fields_data: [
{ id: 1, document: 'Milvus simplifies semantic search through embeddings.' },
{ id: 2, document: 'Vector embeddings convert text into searchable numeric data.' },
{ id: 3, document: 'Semantic search helps users find relevant information quickly.' },
],
});
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Collection;
using Milvus.Client.V2.Requests.Dml;
using Milvus.Client.V2.Requests.Dql;
using Milvus.Client.V2.Requests.Index;
using Milvus.Client.V2.Types;
// Insert sample documents
var rows = new List<IDictionary<string, object?>>
{
new Dictionary<string, object?> { ["id"] = 0L, ["document"] = "Milvus simplifies semantic search through embeddings." },
new Dictionary<string, object?> { ["id"] = 1L, ["document"] = "Vector embeddings convert text into searchable numeric data." },
new Dictionary<string, object?> { ["id"] = 2L, ["document"] = "Semantic search helps users find relevant information quickly." },
};
await client.InsertAsync(new InsertReq
{
CollectionName = "demo",
RowsData = rows
});
curl --request POST \
--url "YOUR_CLUSTER_ENDPOINT/v2/vectordb/entities/insert" \
--header "Authorization: Bearer YOUR_CLUSTER_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"collectionName": "demo",
"data": [
{ "id": 1, "document": "Milvus simplifies semantic search through embeddings." },
{ "id": 2, "document": "Vector embeddings convert text into searchable numeric data." },
{ "id": 3, "document": "Semantic search helps users find relevant information quickly." }
]
}'
Step 3: Search with text
After data insertion, perform a semantic search using raw query text. Milvus automatically converts your query into an embedding vector, retrieves relevant documents based on similarity, and returns the top-matching results.
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
# Perform semantic search
results = client.search(
collection_name='demo',
data=['How does Milvus handle semantic search?'], # Use text query rather than query vector
anns_field='dense', # Use the vector field that stores embeddings
limit=1,
output_fields=['document'],
)
print(results)
import io.milvus.v2.service.vector.request.SearchReq;
import io.milvus.v2.service.vector.request.data.EmbeddedText;
import io.milvus.v2.service.vector.response.SearchResp;
import java.util.Collections;
import java.util.List;
SearchResp searchResp = client.search(SearchReq.builder()
.collectionName("demo")
.data(Collections.singletonList(new EmbeddedText("How does Milvus handle semantic search?")))
.limit(1)
.outputFields(Collections.singletonList("document"))
.build());
List<List<SearchResp.SearchResult>> searchResults = searchResp.getSearchResults();
for (List<SearchResp.SearchResult> results : searchResults) {
for (SearchResp.SearchResult result : results) {
System.out.println(result);
}
}
import (
"fmt"
"log"
"github.com/milvus-io/milvus/client/v3/entity"
"github.com/milvus-io/milvus/client/v3/milvusclient"
)
searchResults, err := client.Search(ctx, milvusclient.NewSearchOption(
"demo",
1,
[]entity.Vector{entity.Text("How does Milvus handle semantic search?")},
).
WithANNSField("dense").
WithOutputFields("document"))
if err != nil {
log.Fatal(err)
}
for _, rs := range searchResults {
fmt.Println(rs.Fields)
}
use milvus::v2::prelude::*;
let response = client
.search(
SearchRequest::builder()
.collection_name("demo")
.vector_field("dense")
.vectors(SearchVectors::EmbeddedText(vec!["How does Milvus handle semantic search?".into()]))
.limit(1)
.output_fields(["document"])
.build()?,
)
.await?;
auto request = milvus::SearchRequest()
.WithCollectionName("demo")
.AddEmbeddedText("How does Milvus handle semantic search?")
.WithLimit(1)
.WithAnnsField("dense")
.AddOutputField("document");
milvus::SearchResponse search_response;
status = client->Search(request, search_response);
if (!status.IsOk()) {
std::cout << status.Message() << std::endl;
}
const results = await client.search({
collection_name: 'demo',
data: ['How does Milvus handle semantic search?'],
anns_field: 'dense',
limit: 1,
output_fields: ['document'],
});
console.log(results);
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Collection;
using Milvus.Client.V2.Requests.Dml;
using Milvus.Client.V2.Requests.Dql;
using Milvus.Client.V2.Requests.Index;
using Milvus.Client.V2.Types;
// Perform semantic search
var results = await client.SearchAsync(new SearchReq
{
CollectionName = "demo",
VectorFieldName = "dense",
Texts = new[] { "How does Milvus handle semantic search?" }, // Use text query rather than query vector
Limit = 1,
Parameters = new SearchParameters { OutputFields = { "document" } }
});
Console.WriteLine(results);
curl --request POST \
--url "YOUR_CLUSTER_ENDPOINT/v2/vectordb/entities/search" \
--header "Authorization: Bearer YOUR_CLUSTER_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"collectionName": "demo",
"data": ["How does Milvus handle semantic search?"],
"annsField": "dense",
"limit": 1,
"outputFields": ["document"]
}'
For more information about search and query operations, refer to Basic Vector Search and Query.