Chroma Query

Chroma Query

Certified

Query a Chroma collection

Runs a nearest-neighbour search with a query vector, optionally filtered by metadata (where) and document text (whereDocument). Returns the matches as rows: inline, first-only, or written to Kestra storage.

yaml
type: io.kestra.plugin.chroma.Query

Search for the 5 nearest records and return them inline

yaml
id: chroma_query
namespace: company.team

tasks:
  - id: search
    type: io.kestra.plugin.chroma.Query
    baseUrl: http://localhost:8000
    collectionName: docs
    vector: [0.05, 0.61, 0.76, 0.74]
    maxResults: 5
    where:
      source: handbook
    fetchType: FETCH
Properties

Base URL of the Chroma server

The base URL of the Chroma HTTP server, for example http://localhost: 8000.

Collection name

The name of the collection to search.

Query vector

The embedding to search with, as a list of numbers.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Authentication token

Token sent in the X-Chroma-Token header. Used by token-authenticated self-hosted servers and by Chroma Cloud. Mutually exclusive with username/password.

Database

The Chroma database that holds the collection (default: default_database).

DefaultSTORE
Possible Values
STOREFETCHFETCH_ONENONE

Select fetch behavior

FETCH returns all rows inline, FETCH_ONE returns the first row, and STORE writes the rows to Kestra storage as an ION file and returns the URI (default: STORE).

SubTypestring

Fields to include

Which fields to return for each match (default: metadatas, documents, distances). Valid values: distances, documents, metadatas, embeddings, uris.

Default10

Maximum number of results

Maximum number of nearest records to return (default: 10, min: 1, max: 10000).

Basic-auth password

Password for HTTP basic authentication. Requires username.

Tenant

The Chroma tenant that holds the database (default: default_tenant).

Basic-auth username

Username for HTTP basic authentication. Requires password.

Metadata filter

A Chroma where filter on record metadata, e.g. {source: handbook} or {year: {$gte: 2020}}.

Document filter

A Chroma where_document full-text filter, e.g. {$contains: "capital"}.

Map containing the first row of fetched data.

Only populated if using fetchType=FETCH_ONE.

List containing the fetched data.

Only populated if using fetchType=FETCH.

The number of fetched rows.

Formaturi

Kestra's internal storage URI of the stored data.

Only populated if using fetchType=STORE.