Chroma

The Chroma component is a data component that allows users to build and search vector datasets. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component definition and tasks are defined in the definition.json and tasks.json files respectively.

#Setup

In order to communicate with Chroma, the following connection details need to be provided. You may specify them directly in a pipeline recipe as key-value pairs within the component's setup block, or you can create a Connection from the Integration Settings page and reference the whole setup as setup: ${connection.<my-connection-id>}.

FieldField IDTypeNote
API Key (required)api-keystringFill in your Chroma API key.
Chroma URL Endpoint (required)urlstringFill in your Chroma hosted public URL endpoint with port, e.g http://1.2.3:8000.

#Supported Tasks

#Batch Upsert

Upsert multiple vector items into a collection, existing items will be updated

InputIDTypeDescription
Task ID (required)taskstringTASK_BATCH_UPSERT
Collection Name (required)collection-namestringThe name of the collection to upsert the item into.
Array ID (required)array-idarray[string]The array of id.
Array Metadata (required)array-metadataarray[object]The array of vector metadata.
Array Vector (required)array-vectorarray[array]The array of vector values.
Array Documentarray-documentarray[string]The array of document string values.
Array URIarray-uriarray[string]The array of uri.
OutputIDTypeDescription
StatusstatusstringBatch add status.

#Upsert

Upsert a vector item into a collection, existing item will be updated

InputIDTypeDescription
Task ID (required)taskstringTASK_UPSERT
Collection Name (required)collection-namestringThe name of the collection to upsert the item into.
ID (required)idstringThe ID of the item.
Metadata (required)metadataobjectThe vector metadata.
Vector (required)vectorarray[number]An array of dimensions for the vector value.
DocumentdocumentstringThe document string value.
URIuristringThe uri of the item.
OutputIDTypeDescription
StatusstatusstringAdd status.

#Query

Perform a vector search on a collection

InputIDTypeDescription
Task ID (required)taskstringTASK_QUERY
Collection Name (required)collection-namestringThe name of the collection to perform vector similarity search on.
Vector (required)vectorarray[number]An array of dimensions for the vector query.
N Results (required)n-resultsintegerThe N amount of items to return from the vector search operation.
FilterfilterobjectThe metadata filter to be applied to the data with Chroma where filter, please refer to using-where-filters.
Filter Documentfilter-documentstringThe document content filter to be applied to the data, please refer to filtering-by-document-contents.
Fieldsfieldsarray[string]The fields to be returned from the vector search operation.
OutputIDTypeDescription
ResultresultobjectResult of the vector search operation.
StatusstatusstringVector search status.
Output Objects in Query

Result

FieldField IDTypeNote
IDsidsarrayThe ids returned from the vector search operation.
ItemsitemsarrayThe items returned from the vector search operation.
MetadatametadataarrayThe metadata returned from the vector search operation.
VectorsvectorsarrayThe vectors returned from the vector search operation.

#Delete

Delete vector items from a collection

InputIDTypeDescription
Task ID (required)taskstringTASK_DELETE
Collection Name (required)collection-namestringThe name of the collection to delete the object from.
IDidstringThe ID of the item.
FilterfilterobjectThe metadata filter to be applied to the data with Chroma where filter, please refer to using-where-filters.
Filter Documentfilter-documentstringThe document content filter to be applied to the data, please refer to filtering-by-document-contents.
OutputIDTypeDescription
StatusstatusstringDelete status.

#Create Collection

Create a collection

InputIDTypeDescription
Task ID (required)taskstringTASK_CREATE_COLLECTION
Collection Name (required)collection-namestringThe name of the collection to create.
ConfigmetadataobjectThe metadata of the collection. Please refer to creating-inspecting-and-deleting-collection.
ConfigurationconfigurationobjectThe configuration of the collection. Please refer to creating-inspecting-and-deleting-collection.
Get or Createget-or-createbooleanIf true, the collection will be created if it does not exist.
OutputIDTypeDescription
StatusstatusstringCreate collection status.

#Delete Collection

Delete a collection

InputIDTypeDescription
Task ID (required)taskstringTASK_DELETE_COLLECTION
Collection Name (required)collection-namestringThe name of the collection to delete.
OutputIDTypeDescription
StatusstatusstringDelete collection status.