Amazon Bedrock is a fully managed service that offers a range of foundation models (FMs) from leading AI companies like AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon. It allows users to experiment with various FMs and customize them using techniques like fine-tuning and Retrieval Augmented Generation (RAG). Agents for Amazon Bedrock enable developers to create fully managed agents to run complex business tasks without writing code. These agents automate prompt engineering and orchestration, breaking tasks into subtasks and using FMs to generate natural language responses. A shoe retailer use case is used to demonstrate the creation of a customer service bot using Anthropic Claude V2 FM. The agents can be tested and deployed through the Amazon Bedrock console, and by creating an alias, they can be deployed in applications. The agents improve productivity, enhance customer service, and automate tasks.
Enhancing Customer Support with Generative AI and Foundation Models
Generative artificial intelligence (AI) and foundation models (FMs) are powerful tools that can greatly improve customer support by delivering faster and better assistance. However, it can be challenging to keep up with the latest model versions and experiment with different options. That’s where Amazon Bedrock comes in.
Amazon Bedrock is a fully managed service that offers a range of high-performing FMs from top AI companies like AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon. With Amazon Bedrock, you can easily experiment with different FMs and customize them using techniques like fine-tuning and Retrieval Augmented Generation (RAG), all while ensuring the privacy and security of your data.
Agents for Amazon Bedrock
In July, AWS announced a new capability called agents for Amazon Bedrock, which allows developers to create fully managed agents with just a few clicks. These agents extend the capabilities of FMs to run complex business tasks without the need for any coding. They can handle tasks like booking travel, processing insurance claims, creating ad campaigns, and managing inventory.
With fully managed agents, you don’t have to worry about provisioning or managing infrastructure. The agents take care of all the necessary resources, allowing you to focus on building effective and efficient customer service bots.
ReAct Prompting
FMs use a technique called ReAct to solve user-requested tasks. ReAct combines reasoning and acting to generate verbal reasoning traces and actions for a task. This allows the system to dynamically create, maintain, and adjust plans for acting while incorporating additional information into the reasoning process.
The ReAct process consists of four components:
- Question: This is the user-requested task or problem to solve.
- Thought: This is a reasoning step that helps the FM understand how to tackle the problem and identify an action to take.
- Action: This is an API that the FM can invoke from a set of allowed APIs.
- Observation: This is the result of carrying out the action.
Components in Agents for Amazon Bedrock
Agents for Amazon Bedrock automate the prompt engineering and orchestration of user-requested tasks. They can securely augment the prompts with company-specific information to provide natural language responses to users.
An agent breaks down a user-requested task into multiple steps and orchestrates the subtasks using FMs. Action groups represent tasks that an agent can perform autonomously. These action groups are mapped to AWS Lambda functions and related API schemas to make API calls.
The practical solution we’ll explore is building a customer service bot for a shoe retailer. This bot will help customers purchase shoes through humanlike conversation, utilizing external APIs to accomplish subtasks.
Solution Overview
The architecture of the solution involves creating an agent with Amazon Bedrock-supported FMs like Anthropic Claude V2. You’ll also attach an API schema stored in an Amazon S3 bucket and a Lambda function containing the business logic to the agent.
The agent uses customer requests to create a prompt using the ReAct framework, which is then used to invoke the corresponding code in the Lambda function. The Lambda function can perform various tasks such as sending email notifications, writing to databases, and triggering application APIs.
In this specific solution, the Lambda function retrieves customer details, lists shoes matching customer-preferred activity, and places orders. The code is backed by an in-memory SQLite database, but similar constructs can be used with persistent data stores.
Conclusion
Agents for Amazon Bedrock offer practical solutions to enhance customer support using generative AI and foundation models. By leveraging these tools, you can automate complex business tasks and improve the conversational experience with customers. With Amazon Bedrock’s comprehensive capabilities, experimentation and customization become easier than ever.
Whether you’re looking to increase productivity, improve customer service, or automate DevOps tasks, consider exploring the possibilities of AI with agents for Amazon Bedrock. For more information and hands-on experience, connect with us at hello@itinai.com or visit our website at itinai.com.