Docs

Knowledge Base

Knowledge Base components connect the flow to semantic search indexes for retrieval-augmented generation.


Knowledge Retrieval

Retrieves relevant chunks from a knowledge base using semantic search. Connects to knowledge bases configured in the Foundry and can search across multiple bases in one run.

Use in a flow

  1. Add a Knowledge Retrieval node to the canvas.
  2. Select one or more Knowledge Bases from the workspace dropdown (refresh to load the latest list).
  3. Provide a Search Query (wire from Input, Prompt, or another upstream component).
  4. Connect Search Results or DataFrame to downstream steps (for example, Prompt or an Agent).
Input (Message) ──► Knowledge Retrieval ──► Prompt ──► Agent

Results from all selected knowledge bases are aggregated and sorted by relevance score.

Parameters

ParameterDefaultHiddenDescription
Knowledge Bases—NoOne or more knowledge bases to search. Refresh to reload options. Required.
Search Query—NoThe question or text to search for. Required.
Fallback Knowledge Base—YesKnowledge base used when the user lacks access to a selected primary KB. Required.
Top K Results4YesMaximum number of results to return per knowledge base.
Search TypesimilarityYessimilarity (vector search) or hybrid_search (combines keyword and vector search).
Search Score Threshold0.0YesMinimum similarity score (0.0–1.0). Results below this threshold are excluded.
Search Metadata—YesJSON metadata filters to narrow results (e.g., {"department": "HR"}).
Use SSLtrueYesUse SSL when connecting to OpenSearch.
Verify CertificatesfalseYesVerify SSL certificates for the OpenSearch connection.
Save Output as VariablefalseYesStore this component’s output as a named flow variable.
Variable Name—NoName for the flow state variable when Save Output as Variable is enabled.

Outputs

OutputDescription
Search ResultsMatching document chunks as Data objects (text and metadata).
DataFrameSearch results as a table.

Limitations

  • Foundry configuration — Knowledge bases must exist in the workspace and be accessible to the current user.
  • Search query required — Hybrid search requires a non-empty query.
  • Multi-KB search — Top K applies per knowledge base, not globally across all selected bases.
  • KB types — Supports in-house and Bedrock knowledge bases. Bedrock backends use the Bedrock Retrieve API internally.

OpenSearch

Queries an Amazon OpenSearch index directly with configurable search type, scoring threshold, and hybrid search support.

Use in a flow

  1. Add an OpenSearch node to the canvas.
  2. Connect an Embedding model component.
  3. Select an Index Name (knowledge base index).
  4. Provide a Search Query, or connect Ingest Data to add documents before searching.
  5. Connect Search Results or DataFrame downstream.
Embeddings ──► OpenSearch ◄── Split Text (Ingest Data)
Input ──► OpenSearch (Search Query) ──► Prompt ──► Agent

Parameters — Connections and search

ParameterDefaultHiddenDescription
Index Name—NoOpenSearch index to query. Select from configured knowledge base indexes. Required.
Embedding—NoEmbedding model used to vectorize the search query. Required.
Ingest Data—NoData or DataFrame to add to the index before searching.
Search Query—NoQuery text for similarity search.
Search TypesimilarityYessimilarity, similarity_score_threshold, or mmr (max marginal relevance).
Number of Results4YesMaximum number of results to return.
Search Score Threshold0.0YesMinimum score when Search Type is similarity_score_threshold.
Hybrid Search Query—YesCustom OpenSearch hybrid query in JSON format. When set, overrides standard search.
Search Metadata—YesJSON metadata filters to narrow results.

Parameters — Connection settings

ParameterDefaultHiddenDescription
OpenSearch URL—YesAuto-configured from environment based on index type.
UsernameadminYesOpenSearch username.
Use SSLtrueYesUse SSL for the OpenSearch connection.
Verify CertificatesfalseYesVerify SSL certificates.
Cache Vector StoretrueYesReuse the same vector store instance within a single flow run.
Enable RetryfalseYesRetry failed search requests.
Max Retries3YesMaximum retry attempts.

Outputs

OutputDescription
Search ResultsMatching document chunks as Data objects.
DataFrameSearch results as a table.
Ingested DataDocuments that were ingested into the index during this run.

Limitations

  • Embedding required — A connected Embeddings component is required for vector search.
  • Index selection — Index Name must match a configured knowledge base index in the workspace.
  • Hybrid search — Hybrid Search Query must be valid OpenSearch JSON; invalid JSON causes an error.
  • Direct OpenSearch — Connection details are resolved from platform configuration based on the selected index type.