Amazon SageMaker Unified Studio is in preview release and is subject to change.
Add a Knowledge Base component to a chat agent app
In this procedure, you add a Knowledge Base component to an existing chat agent app.
After adding a Knowledge Base component, you can make the following configuration changes.
Search type
You can select a strategy for searching data sources in your knowledge base. Default
search chooses the best option between hybrid search and semantic search for your vector
store. You can override the the default search type and choose to
use a hybrid search (semantic and text) or semantic search. Hybrid search combines
relevancy scores from semantic and text search to provide greater accuracy. Semantic
search Uses vector embeddings to deliver relevant results. For more information, see
Amazon Bedrock Knowledge Bases now supports hybrid search
Maximum number of source chunks
When you query a knowledge base, the model returns up to five results in the response by default. Each result corresponds to a source chunk. You can edit the maximum number of retrieved results to return from the vector store. For more information, see Chunking.
To add a Knowledge Base component to a chat agent app
-
Navigate to the Amazon SageMaker Unified Studio landing page by using the URL from your admininstrator.
-
Access Amazon SageMaker Unified Studio using your IAM or single sign-on (SSO) credentials. For more information, see Access Amazon SageMaker Unified Studio.
If the project that you want to use isn't already open, do the following:
-
Choose the current project at the top of the page. If a project isn't already open, choose Select a project.
-
Select Browse all projects.
-
In Projects select the project that you want to use.
-
Choose the Build menu option at the top of the page.
In MACHINE LEARNING & GENERATIVE AI choose My apps.
-
In Apps choose the chat agent app that you want to add the knowledge base component to.
-
In the Configs pane, choose Data.
-
Select Use Knowledge Base.
-
For Select Knowledge Base, select the Knowledge Base component that you want to use. To create a Knowledge Base component, see Create a Knowledge Base component.
-
(Optional) Choose Edit advanced search configs to set advanced search configurations.
-
In Search type, turn on Overide default search to choose a different search type. You can choose from Hybrid search (Combines relevancy scores from semantic and text search to provide greater accuracy) or Semantic search (Uses vector embeddings to deliver relevant results).
-
(Optional) In Maximum number of source chunks, choose the maximum number of source chunks to use.
-
-
Choose Save to save your changes.