Amazon SageMaker Unified Studio is in preview release and is subject to change.
Create a Knowledge Base component
You can create a Knowledge base as a component in an Amazon Bedrock IDE project. If you are creating an app, you can also create a Knowledge Base when you configure the app. When you create a Knowledge Base, you choose data source which can be a document or a web crawler example, see Create a flow app. You can also how the Knowledge Base should parse the data in the data source.
To create a Knowledge Base
-
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.
-
Choose the Build menu at the top of the page.
-
In the MACHINE LEARNING & GENERATIVE AI section, choose My apps.
In the Select or create a new project to continue dialog box, select the project that you want to use.
-
In the left pane, choose Asset gallery.
Choose My components.
-
In the Components section, choose Create component and then Knowledge Base. The Create Knowledge Base pane is shown.
-
For Name, enter a name for the Knowledge Base.
-
For Description, enter a description for the Knowledge Base.
-
In Add data sources, do one of the following:
-
Use a document as a data source by doing the following:
-
Choose Local file.
-
Choose Click to upload and upload the document that you want the Knowledge Base to use. Alternatively, add your source documents by dragging and dropping the document from your computer.
For more information, see Document data source.
-
-
Use a web crawler as a data source by doing the following:
-
Choose Web crawler.
-
Provide the Source URLs of the URLs you want to crawl. You can add up to 9 additional URLs by selecting Add Source URLs. By providing a source URL, you are confirming that you are authorized to crawl its domain.
-
(Optional) Choose Specify web crawler configs to make the following optional configuration changes:
-
Website domain range. Set the domain that you want the Knowledge Base to crawl. For more information, see Website domain range for crawling URLs.
-
Maximum throttling of crawling speed. Set the speed at which the Knowledge Base crawls through the source URLs. For more information, see Throttle crawling speed.
-
URL regex filter. Set regex filters for including (Include patterns) or excluding Exclude patterns URLS from the web crawl. For more information, see Use a URL regex filter to include or exclude URLs.
-
-
-
-
Choose Back to leave the web crawler configuration pane.
-
For parsing Choose either default parsing or choose parsing with foundation model.
-
If you choose parsing with foundation model, do the following:
-
For Choose a foundation model for parsing select your preferred foundation model. You can only choose models that your administrator has enabled for parsing. If you don't see a suitable model, contact your administrator.
-
(Optional) Overwrite the Instructions for the parser to suit your specific needs.
-
-
(Optional) For Embeddings model, choose a model for converting your data into vector embeddings, or use the default model.
-
Choose Create to create the Knowledge Base.
-
Use the Knowledge Base in an app, by doing one of the following:
-
If your app is a chat agent app, do Add a Knowledge Base component to a chat agent app.
-
If your app is a flow app, do Add a Knowledge Base component to a flow app.
-