Amazon Bedrock MKB Retrieve
Overview
You can use this Snap to perform a single-pass semantic search against an Amazon Bedrock Managed Knowledge Base (MKB) and return the matching source chunks. The Snap does not generate a natural-language answer; it retrieves the raw chunks that best match the query so that you can feed them into downstream logic, such as a Amazon Bedrock Prompt Generator Snap or another LLM Snap.
This Snap is best for simple, low-latency similarity lookups against a single knowledge base where answer generation is handled elsewhere in the pipeline. For complex, multi-step questions that require query decomposition or reasoning, use the Amazon Bedrock MKB Agentic Retrieve Snap instead.
MANAGED. Before
calling the API, the Snap verifies the knowledge base type. If the knowledge base is not
MANAGED, the Snap fails with an error that names the actual type and directs
you to use the Agent Retrieve Snap, which supports
VECTOR knowledge bases.
- This is a Transform-type Snap.
Does not support Ultra Tasks
Prerequisites
- Amazon Bedrock Account
- An Amazon Bedrock Managed Knowledge Base. See Create a knowledge base in the Amazon Bedrock documentation.
Snap views
| Type | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap supports a maximum of one document or binary input view. The input is optional: if the Retrieval query field contains a literal value, the Snap can run with no input document. If you select the Binary input view, the incoming stream content (read as UTF-8 text) is used as the query, and the Retrieval query field is not used. | |
| Output | This Snap has exactly one document output view. The output document contains the
retrieval results under a result key. |
Mapper |
| Learn more about Error handling. | ||
Snap settings
- Expression icon (
): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field/Field set | Type | Description |
|---|---|---|
Label
|
String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Amazon Bedrock MKB Retrieve Example: Retrieve support docs |
| Knowledge base ID | String/Expression/ Suggestion |
Required. Specify the unique identifier of the Managed Knowledge Base to query. The Snap suggests available knowledge bases from the configured account. The suggested value uses the following format: KNOWLEDGE_BASE_ID:KNOWLEDGE_BASE_NAME Only the portion before the colon is used as the knowledge base ID. Default value: N/A Example: ABCD1234:support-docs-kb |
| Retrieval query | String/Expression |
Required. Specify the natural-language query to send to the
knowledge base. This field must contain a literal value or expression when no
binary input is provided.
Note: If you select the Binary
input view, the incoming stream content (read as UTF-8 text) is used as the
query, and this field is ignored. Default value: N/A Example: What is the SLA for a P1 incident? |
| Number of results | Integer/Expression |
Specify the number of source chunks to retrieve. This value may be larger than the number of results ultimately returned, because Amazon Bedrock may consolidate results into fewer references. Minimum value: 1 Maximum value 100 Default value: N/A Example: 5 |
| Snap execution
|
Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate & Execute Example: Execute only |
Troubleshooting
Invalid configuration to execute retrieve.
The Knowledge base ID or the effective retrieval query is blank at execution time.
Provide a value for the Knowledge base ID and for the Retrieval query (or supply the query through a binary input stream).
The knowledge base is not of type
MANAGED.
The specified knowledge base is a VECTOR knowledge
base rather than a MANAGED one.
Use the Agent Retrieve Snap for
VECTOR knowledge bases, or specify a MANAGED knowledge
base for this Snap.