For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.8

Vector Database connector

Embed documents into a vector database and retrieve them by similarity search to give your process context documents and long-term LLM memory.

About this connector​

The Vector Database connector embeds, stores, and retrieves Large Language Model (LLM) embeddings. This enables building AI-based solutions for your organizations, such as context document search, long-term LLM memory, and agentic AI interaction.

The connector supports two operations:

  • Embed document: Converts a document or text into vectors with an embedding model and stores them in a vector store.
  • Retrieve document: Converts a query into a vector and searches the vector store for similar chunks.
note

The connector uses the LangChain4j library. Data models and possible implementations are limited to the latest stable released LangChain4j library.

Prerequisites​

Before using this connector, make sure you understand the concept of LLM embeddings.

You also need:

  • Access to a supported LLM embeddings API to convert document content into vectorized embedding form.
  • Write access to a supported vector store.

Create a connector task​

You can apply a connector to a task or event via the append menu. For example:

  • From the canvas: Select an element and click the Change element icon to change an existing element, or use the append feature to add a new element to the diagram.
  • From the properties panel: Navigate to the Template section and click Select.
  • From the side palette: Click the Create element icon.

change element

After you have applied a connector to your element, follow the configuration steps or see using connectors to learn more.

Configuration​

Every operation needs an embedding model and a vector store. Select the Operation first, then configure the Embedding model and Vector store properties.

PropertyTypeRequiredDescriptionExample
OperationDropdownYesThe operation to run: Embed document or Retrieve document. The template default is Retrieve document.

Embedding models​

Select an embedding model provider, then configure the properties for that provider.

PropertyTypeRequiredDescriptionExample
Model providerDropdownYesThe embedding model provider. The options are AWS Bedrock, Azure OpenAI, Google Vertex AI, and OpenAI. The default is AWS Bedrock.

Amazon Bedrock​

The connector supports Amazon Titan V1 and V2 models. You can also specify any custom model that supports text embedding and is available in your Amazon Bedrock account.

PropertyTypeRequiredDescriptionExample
Access keyStringYesAccess key for a user with permissions for the Amazon Bedrock InvokeModel action.
Secret keyStringYesSecret key for the user associated with the access key.
RegionStringYesAWS region where the model is hosted. See AWS model region support.us-east-1
Model nameDropdownYesThe embedding model to use: amazon.titan-embed-text-v1, amazon.titan-embed-text-v2:0, or Custom. Defaults to amazon.titan-embed-text-v2:0.amazon.titan-embed-text-v2:0
Custom model nameStringYesName of your custom Amazon Bedrock embedding model. Shown when Model name is Custom.
Embedding dimensionsDropdownYesNumber of dimensions of the embedding vector: 256, 512, or 1024. Defaults to 1024. Shown when Model name is amazon.titan-embed-text-v2:0.1024
NormalizeBooleanYesWhether to normalize the embedding vector. Defaults to false. Shown when Model name is amazon.titan-embed-text-v2:0. See the AWS blog for details.
Max retriesNumberYesMaximum number of retries for the embedding request if it fails. Defaults to 3.3

Azure OpenAI​

PropertyTypeRequiredDescriptionExample
EndpointStringYesThe Azure OpenAI endpoint URL.https://<your-resource-name>.openai.azure.com/
AuthenticationDropdownYesThe authentication type: API key or Client credentials. Defaults to API key.
API keyStringYesAn Azure OpenAI API key from the Azure AI Foundry portal. Shown when Authentication is API key.
Client IDStringYesThe Microsoft Entra application ID. Shown when Authentication is Client credentials.
Client secretStringYesThe client secret of the Microsoft Entra application. Shown when Authentication is Client credentials.
Tenant IDStringYesThe Microsoft Entra tenant ID. Shown when Authentication is Client credentials.
Authority hostStringNoThe authority host URL. Can also be an OAuth 2.0 token endpoint. Defaults to https://login.microsoftonline.com. Shown when Authentication is Client credentials.
Model deployment nameStringYesThe name of the model deployment.
Embedding dimensionsNumberNoNumber of dimensions of the embedding vector. If you don't specify a value, the default of the selected model is used.
Max retriesNumberNoMaximum number of retries for the embedding request if it fails. Defaults to 3.3
Custom headersStringNoMap of custom HTTP headers to add to the request.

Client credentials authentication requires registering an application in Microsoft Entra ID.

Google Vertex AI​

PropertyTypeRequiredDescriptionExample
Project IDStringYesThe Google Cloud project ID.
RegionStringYesThe region where AI inference takes place.
AuthenticationDropdownYesThe authentication type: Service account credentials or Application default credentials (Hybrid/Self-Managed only). Defaults to Service account credentials. Application default credentials (ADC) use the default credentials available in your environment. To set up ADC in a local development environment, see set up ADC.
JSON key of the service accountStringYesThe key of a service account in JSON format. Shown when Authentication is Service account credentials.
Model nameStringYesThe Vertex AI embedding model. See the Vertex AI documentation for available models.
Embedding dimensionsNumberYesNumber of dimensions of the embedding vector. See the documentation of the selected model for valid values.
PublisherStringNoThe publisher of the Vertex AI model. Defaults to google.google
Max retriesNumberNoMaximum number of retries for the embedding request if it fails. Defaults to 3.3

OpenAI​

PropertyTypeRequiredDescriptionExample
OpenAI API keyStringYesYour OpenAI account API key for authorization.
Model nameStringYesThe OpenAI model to use for embeddings. See the OpenAI documentation for available models.
Organization IDStringNoFor projects accessed through a legacy user API key, the organization ID to use for API requests with this connector.
Project IDStringNoFor projects accessed through a legacy user API key, the project ID to use for API requests with this connector.
Embedding dimensionsNumberNoNumber of dimensions of the embedding vector. If you don't specify a value, the default of the selected model is used.
Max retriesNumberNoMaximum number of retries for the embedding request if it fails. Defaults to 3.3
Custom headersStringNoMap of custom HTTP headers to add to the request.
Custom base URLStringNoBase URL for API requests when you use a custom OpenAI endpoint. Defaults to https://api.openai.com/v1/.

Vector stores​

Select a vector store, then configure the properties for that store.

PropertyTypeRequiredDescriptionExample
Embeddings storeDropdownYesThe vector store. The options are Amazon Managed OpenSearch, Azure AI Search, Azure Cosmos DB NoSQL, Elasticsearch, and OpenSearch. The default is Elasticsearch.

Amazon Managed OpenSearch​

PropertyTypeRequiredDescriptionExample
Access keyStringYesAWS IAM access key of a user with read/write access.
Secret keyStringYesSecret key associated with the access key.
Server URLStringYesThe Amazon OpenSearch URL without protocol.my-opensearch.aws.com:port
RegionStringYesRegion of the Amazon OpenSearch instance.
Index nameStringYesName of the index where you want to store embeddings. When embedding, the connector creates a new index if it doesn't exist. When retrieving, the connector raises an error if the index is absent.
PropertyTypeRequiredDescriptionExample
EndpointStringYesThe Azure AI Search endpoint URL.https://<your-resource-name>.search.windows.net/
AuthenticationDropdownYesThe authentication type: API key or Client credentials. Defaults to API key.
API keyStringYesAn Azure AI Search key. Shown when Authentication is API key.
Client IDStringYesThe Microsoft Entra application ID. Shown when Authentication is Client credentials.
Client secretStringYesThe client secret of the Microsoft Entra application. Shown when Authentication is Client credentials.
Tenant IDStringYesThe Microsoft Entra tenant ID. Shown when Authentication is Client credentials.
Authority hostStringNoThe authority host URL. Can also be an OAuth 2.0 token endpoint. Defaults to https://login.microsoftonline.com. Shown when Authentication is Client credentials.
Index nameStringYesName of the search index. When embedding, the connector creates the index if it doesn't exist. When retrieving, the connector raises an error if the index is absent.

Client credentials authentication requires registering an application in Microsoft Entra ID and assigning the required roles. You must explicitly enable role-based access control for the Azure AI Search resource.

Azure Cosmos DB NoSQL​

PropertyTypeRequiredDescriptionExample
EndpointStringYesThe Azure Cosmos DB NoSQL endpoint URL.https://<your-resource-name>.documents.azure.com/
AuthenticationDropdownYesThe authentication type: API key or Client credentials. Defaults to API key.
API keyStringYesAn Azure Cosmos DB key. Shown when Authentication is API key.
Client IDStringYesThe Microsoft Entra application ID. Shown when Authentication is Client credentials.
Client secretStringYesThe client secret of the Microsoft Entra application. Shown when Authentication is Client credentials.
Tenant IDStringYesThe Microsoft Entra tenant ID. Shown when Authentication is Client credentials.
Authority hostStringNoThe authority host URL. Can also be an OAuth 2.0 token endpoint. Defaults to https://login.microsoftonline.com. Shown when Authentication is Client credentials.
Database nameStringYesThe name of the Azure Cosmos DB NoSQL database.
Container nameStringYesThe name of the Azure Cosmos DB NoSQL container. The container must already exist and have an /id partition key.
Consistency levelDropdownYesThe consistency level for the container: Strong, Bounded Staleness, Session, Consistent Prefix, or Eventual. Defaults to Eventual.
Distance functionDropdownYesThe distance function for vector similarity search: Euclidean, Cosine, or Dot Product. Defaults to Cosine.
Vector index typeDropdownYesThe vector index type: Flat, Quantized Flat, or DiskANN. Defaults to Flat.

Client credentials authentication requires registering an application in Microsoft Entra ID.

For more information about Azure Cosmos DB NoSQL vector search, refer to the official documentation. Pay special attention to the vector dimensions limitations.

Elasticsearch​

The Elasticsearch version must be 8 or later.

PropertyTypeRequiredDescriptionExample
Base URLStringYesThe Elasticsearch base URL, including protocol.https://host:port
UsernameStringYesThe Elasticsearch user with read/write access.
PasswordStringYesThe password of the Elasticsearch user.
Index nameStringYesName of the index where you want to store embeddings. When embedding, the connector creates a new index if it doesn't exist. When retrieving, the connector raises an error if the index is absent.

OpenSearch​

PropertyTypeRequiredDescriptionExample
Base URLStringYesThe OpenSearch base URL, including protocol.https://host:port
UsernameStringYesThe OpenSearch user with read/write access.
PasswordStringYesThe password of the OpenSearch user.
Index nameStringYesName of the index where you want to store embeddings. When embedding, the connector creates a new index if it doesn't exist. When retrieving, the connector raises an error if the index is absent.

Operations​

Embed document​

Embed a document or plain text into the vector store. The operation performs the following steps:

  1. Consumes a document.
  2. Parses the document depending on its file format and optionally splits it into text chunks.
  3. Converts the chunks into vectors with the embedding model.
  4. Stores the vectors in the vector store.

Input parameters​

Select Embed document in the Operation dropdown, then configure the embedding model and the vector store. The following properties are specific to this operation.

PropertyTypeRequiredDescriptionExample
Document sourceDropdownYesWhether to embed a Camunda document or Plain text. Defaults to Camunda document.
Plain text to embedStringYesThe text to embed, handled as regular UTF-8 text. Shown when Document source is Plain text. Use plain text for small data that fits into a text field or a process variable. If you have JSON input, a FEEL string conversion function can help.
DocumentsStringYesA FEEL expression that returns the Camunda documents to embed. Shown when Document source is Camunda document. Use Camunda documents for larger document pipelines, for example from webhooks or user tasks. The connector parses documents with Apache Tika, so any Apache Tika-supported file format works.
Document splitting strategyDropdownYesHow to break large documents into smaller chunks: Recursive or Do not split. Defaults to Recursive. Seek guidance from your local data scientist to determine whether you need splitting. See the LangChain4j documentation.
Max charsNumberYesMaximum size of a chunk in characters. Defaults to 500. Shown when Document splitting strategy is Recursive.500
Max overlap windowNumberYesMaximum overlap between consecutive chunks in characters. Defaults to 80. Shown when Document splitting strategy is Recursive.80

Output​

The operation returns an array of the IDs of the created embedding chunks:

["d599ec62-fe51-4a91-bbf0-26e1241f9079", "a1fad021-5148-42b4-aa02-7de9d590e69c"]

Update embedded documents​

Each time you embed a document, the connector generates a new set of chunks and stores them in the vector store. If you embed the same document again, this creates duplicate chunks.

To prevent duplicates:

  1. Delete the existing chunks before you embed the document again.
  2. Use the chunk IDs returned by the previous embedding operation.
  3. If the embedded document is from Camunda, use the filename metadata field to find the chunk IDs.
  4. Follow the documentation of your vector store to delete chunks.

Retrieve document​

Search the vector store for chunks that are similar to a query. The operation performs the following steps:

  1. Consumes a query.
  2. Converts the query into a vector with the embedding model.
  3. Performs a vector similarity search on the stored embeddings.
  4. Stores the results in Camunda document storage.

Input parameters​

Select Retrieve document in the Operation dropdown, then configure the embedding model and the vector store. The following properties are specific to this operation.

PropertyTypeRequiredDescriptionExample
Search queryStringYesThe query to look up similar documents for.
Max resultsNumberYesThe maximum number of results to return. Defaults to 5.5
Min scoreNumberNoThe minimum similarity score a result needs to be included. Enter a value between 0 and 1. An empty or incorrect value resolves to 0.0, which includes every result.0.81

Output​

The operation returns an object with a chunks array. Each chunk includes a chunk ID, the Camunda document reference metadata, the similarity score, and the text content.

{
"chunks": [
{
"chunkId": "e30d570b-2a3a-4f4a-9a0c-78f0f1acd383",
"documentReference": {
"storeId": "local",
"documentId": "2b36ec67-a78f-4f99-9371-8c6e5b332838",
"contentHash": "1c232bc1e553c10d00c3327dcca9012b6b4b0758a1c2afaad8b77c80fa1bd36e",
"metadata": {
"size": 116,
"fileName": null,
"processDefinitionId": null,
"processInstanceKey": null,
"customProperties": {},
"expiresAt": null,
"contentType": "text/plain"
},
"camunda.document.type": "camunda"
},
"score": 0.6721556,
"content": "Camunda is a platform for orchestrating and automating business processes. It helps organizations design, execute, and manage workflows, enabling them to optimize processes and improve efficiency."
}
]
}

Troubleshooting​

To learn about general error handling in Camunda, see BPMN errors and failing jobs.

Further resources​