Skip to main content
Version: 8.10 (unreleased)

Amazon Bedrock Knowledge Base connector

With the Amazon Bedrock Knowledge Base outbound connector, you can perform semantic search over documents indexed in an Amazon Bedrock Knowledge Base from your BPMN process.

Prerequisites

To use the Amazon Bedrock Knowledge Base connector, you need the following:

  • An AWS account with an access key and secret key, or a configured default credentials chain.
  • A Bedrock Knowledge Base created and configured with at least one data source.
  • IAM permissions to execute the Retrieve action on the knowledge base.

Learn more about Amazon Bedrock Knowledge Bases in the official documentation.

note

Use Camunda secrets to store credentials and avoid exposing sensitive information directly from the process. Refer to managing secrets to learn more.

Create an Amazon Bedrock Knowledge Base 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.

Authentication

To authenticate, choose one of the methods from the Authentication dropdown. The supported options are:

  • Use Credentials if you have a valid pair of access and secret keys provided by your AWS account administrator. The access key must have permissions to the Bedrock Knowledge Base Retrieve action.
note

This option is applicable for both SaaS and Self-Managed users.

  • Use Default Credentials Chain if your system is configured as an implicit authentication mechanism, such as role-based authentication, credentials supplied via environment variables, or files on target host. This approach uses the Default Credential Provider Chain to resolve required credentials.
note

This option is applicable only for Self-Managed or hybrid distributions.

For more information on authentication and security in Amazon Bedrock, see Amazon Bedrock security and privacy.

Configuration

In the Region field, enter the AWS region where your knowledge base is deployed. For example, us-east-1.

In the Knowledge Base ID field, enter the ID of the Bedrock Knowledge Base you want to query. You can find this ID in the Amazon Bedrock console.

Action

The Amazon Bedrock Knowledge Base connector supports the following action.

Retrieve from Knowledge Base

Perform a semantic search over the documents indexed in your knowledge base. The connector returns the most relevant passages that match your query.

Parameters

ParameterRequiredDescription
QueryYesA natural language query to search the knowledge base. Supports FEEL expressions.
Number of resultsNoThe maximum number of results to return (1-100). Defaults to five.

Response

The connector returns the following fields:

FieldDescription
resultsA list of retrieval results. Each result contains the fields described below.
resultCountThe number of results returned.
paginationTokenA token for retrieving additional results in subsequent requests. This value is null if there are no more results.

Each result in the results list contains the following fields:

FieldDescription
documentReferenceA Camunda document reference containing the chunk text, for use with downstream connectors or processing.
contentThe matched text passage from the knowledge base.
scoreA relevance score between 0 and 1 indicating how well the result matches the query.
sourceUriThe S3 URI of the source document.
metadataKey-value metadata associated with the source document.

Output mapping

  1. Use Result Variable to store the response in a process variable. For example, kbResult.
  2. Use Result Expression to map specific fields from the response into process variables.

For example, to extract just the text content from all results:

= {
texts: results.content,
count: resultCount
}

Query guidelines

For best results, use specific, descriptive queries rather than short keywords:

QueryQualityWhy
"What does the auto insurance policy cover for stolen vehicles?"GoodSpecific topic with clear intent.
"What are the exclusions for water damage in home insurance?"GoodTargets a specific section and policy type.
"Coverage"PoorToo broad. It may return loosely related results.
"Tell me everything about insurance"PoorToo vague. No specific topic to match against.
tip

When using the connector as a tool in an AI Agent Sub-process, the agent composes the query automatically based on the user's request. Use the fromAi() function to let the agent generate targeted queries.

Example response

The following is an example of the connector response:

{
"results": [
{
"documentReference": {
"storeId": "in-memory",
"documentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"content": "Comprehensive auto insurance covers damage to your vehicle from events other than collisions, including theft, vandalism, natural disasters, and falling objects.",
"score": 0.92,
"sourceUri": "s3://my-bucket/policies/auto-insurance.pdf",
"metadata": {
"category": "auto",
"policyType": "comprehensive"
}
},
{
"documentReference": {
"storeId": "in-memory",
"documentId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
},
"content": "Liability coverage pays for bodily injury and property damage that you cause to others in an auto accident.",
"score": 0.85,
"sourceUri": "s3://my-bucket/policies/auto-insurance.pdf",
"metadata": {
"category": "auto",
"policyType": "liability"
}
}
],
"resultCount": 2,
"paginationToken": null
}