Deploying Foundation Models with Amazon Bedrock
AWS Certified Machine Learning Engineer – Associate · Deployment and Orchestration of ML Workflows · By Super Admin
Amazon Bedrock deploys foundation models through either agents, which orchestrate complex multi-task workflows, or the Converse API, which streamlines conversational interactions.
Amazon Bedrock provides a secure and scalable framework for deploying and managing foundation models (FMs), giving teams a managed path to incorporate generative AI capabilities into applications.
Amazon Bedrock Overview
To derive inference using Amazon Bedrock models, a client can be created using client = boto3.client('bedrock-runtime'). Amazon Bedrock enables two primary approaches for deploying models: using agents and the Converse API.
Using Agents
Agents in Amazon Bedrock act as intermediaries between an application and the foundation model. They allow you to define specific tasks, behaviors, and interactions, providing a comprehensive framework for managing and orchestrating various types of models. The process involves creating an agent, configuring it with the tasks it will perform, and creating an alias for the agent to interact with the application. This approach is ideal for complex workflows and tasks that require extensive management and orchestration.
Using the Converse API
The Converse API is designed specifically for conversational interactions. It provides a direct way to manage text-based interactions by sending input text to the model and receiving responses. The Converse API is well suited for use cases such as chatbots, virtual assistants, and customer service applications where conversational AI is the primary requirement. Invoking the API involves calling client.converse() with a modelId and a messages list containing the role and content of the input text, and the model's response is returned within response['output']['message']['content']. The Converse API provides a streamlined approach for conversational interactions, making it a suitable alternative for scenarios where agents might be too complex.
Key takeaways
- Amazon Bedrock supports two deployment approaches for foundation models: agents and the Converse API.
- Agents act as intermediaries that define tasks, behaviors, and interactions, and are configured with an alias to interact with an application.
- The Converse API sends input text to a model and returns a response, making it well suited for chatbots and virtual assistants.
Discussion (0)
No discussion on this article yet — be the first to comment.
Please sign in to join the discussion.