Queries a Chroma Vector Database in order to gather a specified number of documents that are most closely related to the given query.
chroma, vector, vectordb, embeddings, enrich, enrichment, ai, artificial intelligence, ml, machine learning, text, LLM
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Description |
---|---|---|---|
Query | Query | The query to issue to the Chroma VectorDB. The query is always converted into embeddings using the configured embedding function, and the embedding is
then sent to Chroma. The text itself is not sent to Chroma. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | |
Number of Results | Number of Results | 10 | The number of results to return from Chroma Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Metadata Filter | Metadata Filter | A JSON representation of a Metadata Filter that can be applied against the Chroma documents in order to narrow down the documents that can be returned.
For example: { "metadata_field": "some_value" } Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | |
Document Filter | Document Filter | A JSON representation of a Document Filter that can be applied against the Chroma documents' text in order to narrow down the documents that can be returned.
For example: { "$contains": "search_string" } Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | |
Connection Strategy | Connection Strategy | Remote Chroma Server | Specifies how to connect to the Chroma server |
Directory | Directory | ./chroma | The Directory that Chroma should use to persist data |
Hostname | Hostname | localhost | The hostname to connect to in order to communicate with Chroma |
Port | Port | 8000 | The port that the Chroma server is listening on |
Transport Protocol | Transport Protocol | https | Specifies whether connections should be made over http or https |
Authentication Strategy | Authentication Strategy | Token Authentication | Specifies how to authenticate to Chroma server |
Authentication Token | Authentication Token | The token to use for authenticating to Chroma server Sensitive Property: true | |
Username | Username | The username to use for authenticating to Chroma server | |
Password | Password | The password to use for authenticating to Chroma server Sensitive Property: true | |
Collection Name | Collection Name | nifi | The name of the Chroma Collection Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Embedding Function | Embedding Function | ONNX all-MiniLM-L6-v2 Model | Specifies which embedding function should be used in order to create embeddings from incoming Documents |
HuggingFace Model Name | HuggingFace Model Name | sentence-transformers/all-MiniLM-L6-v2 | The name of the HuggingFace model to use |
HuggingFace API Key | HuggingFace API Key | The API Key for interacting with HuggingFace Sensitive Property: true | |
OpenAI API Key | OpenAI API Key | The API Key for interacting with OpenAI Sensitive Property: true | |
OpenAI Model Name | OpenAI Model Name | text-embedding-ada-002 | The name of the OpenAI model to use |
OpenAI Organization ID | OpenAI Organization ID | The OpenAI Organization ID | |
OpenAI API Base Path | OpenAI API Base Path | The API Base to use for interacting with OpenAI. This is used for interacting with different deployments, such as an Azure deployment. | |
OpenAI API Deployment Type | OpenAI API Deployment Type | The type of the OpenAI API Deployment. This is used for interacting with different deployments, such as an Azure deployment. | |
OpenAI API Version | OpenAI API Version | The OpenAI API Version. This is used for interacting with different deployments, such as an Azure deployment. | |
Sentence Transformer Model Name | Sentence Transformer Model Name | all-MiniLM-L6-v2 | The name of the Sentence Transformer model to use |
Sentence Transformer Device Type | Sentence Transformer Device Type | The type of device to use for performing the embeddings using the Sentence Transformer, such as 'cpu', 'cuda', 'mps', 'cuda:0', etc. If not specified, a GPU will be used if possible, otherwise a CPU. | |
Output Strategy | Output Strategy | Row-Oriented | Specifies whether the output should contain only the text of the documents (each document separated by \n\n), or if it should be formatted as either single column-oriented JSON object, consisting of a keys 'ids', 'embeddings', 'documents', 'distances', and 'metadatas'; or if the results should be row-oriented, a JSON per line, each consisting of a single id, document, metadata, embedding, and distance. |
Results Field | Results Field | If the input FlowFile is JSON Formatted, this represents the name of the field to insert the results. This allows the results to be inserted into "an existing input in order to enrich it. If this property is unset, the results will be written to the FlowFile contents, overwriting any pre-existing content. | |
Include Document IDs | Include Document IDs | true | Whether or not to include the Documents' IDs in the response |
Include Metadata | Include Metadata | true | Whether or not to include the Documents' Metadata in the response |
Include Document | Include Document | true | Whether or not to include the Documents' Text in the response |
Include Distances | Include Distances | true | Whether or not to include the Documents' Distances (i.e., how far the Document was away from the query) in the response |
Include Embeddings | Include Embeddings | false | Whether or not to include the Documents' Embeddings in the response |