chroma_create_collection
Create a new Chroma collection with configurable HNSW parameters, including distance functions, construction, and search settings, for efficient vector search and data management.
Instructions
Create a new Chroma collection with configurable HNSW parameters.
Args:
collection_name: Name of the collection to create
space: Distance function used in HNSW index. Options: 'l2', 'ip', 'cosine'
ef_construction: Size of the dynamic candidate list for constructing the HNSW graph
ef_search: Size of the dynamic candidate list for searching the HNSW graph
max_neighbors: Maximum number of neighbors to consider during HNSW graph construction
num_threads: Number of threads to use during HNSW construction
batch_size: Number of elements to batch together during index construction
sync_threshold: Number of elements to process before syncing index to disk
resize_factor: Factor to resize the index by when it's full
embedding_function_name: Name of the embedding function to use. Options: 'default', 'cohere', 'openai', 'jina', 'voyageai', 'ollama', 'roboflow'
metadata: Optional metadata dict to add to the collection
Input Schema
Name | Required | Description | Default |
---|---|---|---|
batch_size | No | ||
collection_name | Yes | ||
ef_construction | No | ||
ef_search | No | ||
embedding_function_name | No | default | |
max_neighbors | No | ||
metadata | No | ||
num_threads | No | ||
resize_factor | No | ||
space | No | ||
sync_threshold | No |
Input Schema (JSON Schema)
{
"properties": {
"batch_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Batch Size"
},
"collection_name": {
"title": "Collection Name",
"type": "string"
},
"ef_construction": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Ef Construction"
},
"ef_search": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Ef Search"
},
"embedding_function_name": {
"default": "default",
"title": "Embedding Function Name",
"type": "string"
},
"max_neighbors": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Neighbors"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"num_threads": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Num Threads"
},
"resize_factor": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Resize Factor"
},
"space": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Space"
},
"sync_threshold": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sync Threshold"
}
},
"required": [
"collection_name"
],
"title": "chroma_create_collectionArguments",
"type": "object"
}