Description
Hands-on Challenge Day – Amazon Bedrock: Knowledge Bases
- Technology Used:
- AWS – Amazon Bedrock
Part 01: Amazon Bedrock Demo – AI Stylist
Part 02: Amazon Bedrock – Knowledge Bases
Amazon Bedrock
Amazon Bedrock is a service from Amazon Web Services (AWS) that offers an easy way to build and scale generative AI applications using large language models (LLMs). It provides access to a variety of LLMs, including those from Amazon and partner companies, allowing developers to choose the models that best fit their needs.
For more information: AWS Bedrock
Part 01: Amazon Bedrock Demo – AI Stylist
Step 01: Accessing the Free Demo
- Visit: AWS Bedrock
- Try the free demo: AI Stylist Demo
Step 02: Exploring the Free Demo
<aside> 💡 You can use the ‘Translate to Portuguese’ option in Microsoft Edge if needed. </aside>
Scenario
Find an outfit in less than 5 minutes with the AI Stylist. In this example, see how you can use Amazon Bedrock’s capabilities, such as foundation models, knowledge bases, and agents, to build a generative AI application.
- Start exploring
AI Stylist
- Create a custom outfit tailored to your needs.
- Start now
<aside> 💡 “I am a consultant traveling to New York next week. What should I wear on my first day at the office?” </aside>
- Generate my look
Step 03: Analyzing the Components Used
- Knowledge Base:
- Private Data: product catalog, order history, customer reviews…
- Public Data: fashion trends.
- Models Used:
- Claude (Anthropic): product catalog agent.
- Stable Diffusion (Stability AI): image generation model.
Step 04: Reviewing the Looks and Finalizing the Order
- View your looks.
- Test the suggested prompts until the order is finalized.
Part 02: Amazon Bedrock – Knowledge Bases
Requirements:
- AWS IAM account (not root) with the necessary permissions.
- Access to the Models:
- Embedding:
Amazon Titan Embeddings G1 - Text - Generation:
Amazon Titan Text G1 - Premier
- Embedding:
Step 01: Request Access to the Models
Step 02: Create an IAM User on AWS
- IAM, Users, Create user:
tcb-challenge-day-user- ✅ Provide user access to the AWS Management Console – optional
- ✅ I want to create an “IAM user”
- 🔘 Custom password
- [ ] Users must create a new password at the next sign-in
Next
- Permissions options | Attach policies directly:
AdministratorAccess
Next
- Create user
- Copy:
Console sign-in URL - Download .csv file (optional)
- Copy:
Step 03: Log In with the Created User
- Open your browser in incognito mode.
- Console sign-in URL
- Account ID:
- IAM User:
tcb-challenge-day-user - Password:
Step 04: Create Bucket / Upload Data Source
- S3:
tcb-challenge-day-YOUR-NAME- Create Bucket
- Access the bucket and upload the three files: Documentacao_Tecnica_Inteligencia_Artificial.txt Documentacao_Tecnica_MultiCloud.docx Documentacao_Tecnica_DevOps.json
Step 05: Creating a Knowledge Base with Amazon Bedrock
- Builder tools
- Knowledge bases Create knowledge base
- Knowledge base name:
kb-tcb-technnical-documentation - Knowledge base description:
Documentação Técnica da TCB. - IAM permissions:
Create and use a new service role - Choose data source:
Amazon S3
- Data source name:
kb-tcb-tech-docs - S3 URI:
tcb-challenge-day-YOUR-NAME
- Embeddings model:
Titan Embeddings G1 - Text - Vector database:
Quick create a new vector store - Recommended
- Knowledge base name:
- Knowledge bases Create knowledge base
- Data source
- Select
kb-tcb-tech-docsand clickSync
- Select
- Test knowledge base
- Select model (Generation Model)
Amazon Titan Text G1 - Premier
- Enter your message here:
What are LLM models? What is Generative AI? Who are the main AI providers? What are the database services offered by GCP? What are the computing services of Magalu Cloud? What are the use cases for Terraform? What are the use cases for Helm? What are the purposes of Prometheus and Grafana tools? - Select model (Generation Model)
Try asking questions completely unrelated to the content in the knowledge base.
Deleting the Created Resources
- Delete the Knowledge Base:
kb-tcb-technnical-documentation - Delete Amazon OpenSearch Service | Serverless | Collections:
bedrock-knowledge-base-xxxxxx - Delete the S3 Bucket:
tcb-challenge-day-YOUR-NAME
0 comentário