|
20 | 20 | <p>This article is part of the AWS Bedrock with .NET series. If you haven't already, start with <a href="/blog/ai/bedrock">Getting Started with AWS Bedrock</a> and <a href="/blog/ai/bedrock/advanced">Advanced Integration & Production Setup</a> to understand authentication, configuration, and cost optimization before diving into conversational patterns.</p> |
21 | 21 | </CalloutBox> |
22 | 22 |
|
23 | | - <Section Heading="The Problem: AI That Forgets" Level="4"> |
| 23 | + <Section Heading="The Problem & The Solution" Level="4"> |
24 | 24 | <p> |
25 | 25 | Picture a customer contacting your support bot about a billing issue. They explain the problem, the bot asks for their account number, they provide it — and then the next response treats them like a stranger. No memory of the account number. No memory of the issue. The user has to start over. |
26 | 26 | </p> |
|
30 | 30 | <CalloutBox Type="info" Title="The root cause"> |
31 | 31 | <p>The original Bedrock <b>Invoke API</b> was built for single-shot prompts — great for summarization or one-off generation, but fundamentally broken for anything conversational.</p> |
32 | 32 | </CalloutBox> |
33 | | - </Section> |
34 | | - |
35 | | - <Section Heading="What is the AWS Bedrock Converse API?" Level="4"> |
36 | | - <p> |
37 | | - The <b>Converse API</b> is AWS Bedrock’s answer to the growing demand for natural, multi-turn, context-aware conversations with generative AI models. As businesses and developers began integrating AI into customer support, virtual assistants, and workflow automation, it became clear that single-turn, stateless APIs (like the original <b>Invoke API</b>) were not enough. Users expect AI to remember context, follow up on previous questions, and provide a seamless, human-like experience. |
38 | | - </p> |
| 33 | + <p> |
| 34 | + The <b>Converse API</b> is AWS Bedrock's answer to the growing demand for natural, multi-turn, context-aware conversations with generative AI models. As businesses and developers began integrating AI into customer support, virtual assistants, and workflow automation, it became clear that single-turn, stateless APIs (like the original <b>Invoke API</b>) were not enough. Users expect AI to remember context, follow up on previous questions, and provide a seamless, human-like experience. |
| 35 | + </p> |
| 36 | + <p> |
| 37 | + The Converse API was introduced to fill this gap. It allows developers to send the entire conversation history to the model, enabling the AI to generate responses that are aware of everything said so far. This is a major step forward for building chatbots, support agents, and assistants that feel truly interactive and intelligent. |
| 38 | + </p> |
| 39 | + <CalloutBox Type="info" Title="Origin and Motivation"> |
39 | 40 | <p> |
40 | | - The Converse API was introduced to fill this gap. It allows developers to send the entire conversation history to the model, enabling the AI to generate responses that are aware of everything said so far. This is a major step forward for building chatbots, support agents, and assistants that feel truly interactive and intelligent. |
| 41 | + The rise of chat-based AI (like ChatGPT and Claude) showed that context retention is critical for user satisfaction. AWS designed the Converse API to bring this capability to enterprise workloads, with the security, scalability, and compliance features expected from AWS services. |
41 | 42 | </p> |
42 | | - <CalloutBox Type="info" Title="Origin and Motivation"> |
43 | | - <p> |
44 | | - The rise of chat-based AI (like ChatGPT and Claude) showed that context retention is critical for user satisfaction. AWS designed the Converse API to bring this capability to enterprise workloads, with the security, scalability, and compliance features expected from AWS services. |
45 | | - </p> |
46 | | - </CalloutBox> |
47 | | - </Section> |
| 43 | + </CalloutBox> |
| 44 | + </Section> |
48 | 45 |
|
49 | | - <Section Heading="Why Did AWS Create the Converse API?" Level="4"> |
| 46 | + <Section Heading="🔮 Understanding Converse API" Level="4"> |
| 47 | + <Section Heading="Why Did AWS Create It?" Level="5"> |
50 | 48 | <ul> |
51 | 49 | <li><b>Context Retention:</b> Real conversations require memory. Converse API lets you pass the full message history, so the model can reference earlier turns and maintain continuity.</li> |
52 | 50 | <li><b>Multi-Turn Dialogues:</b> Many business scenarios (support, sales, onboarding) require back-and-forth exchanges, not just one-off answers.</li> |
|
58 | 56 | </p> |
59 | 57 | </Section> |
60 | 58 |
|
61 | | - <Section Heading="When and Where to Use the Converse API" Level="4"> |
| 59 | + <Section Heading="When and Where to Use It" Level="5"> |
62 | 60 | <ul> |
63 | 61 | <li><b>Customer Support:</b> Multi-step troubleshooting, order tracking, and escalation flows.</li> |
64 | 62 | <li><b>Virtual Assistants:</b> Scheduling, reminders, and task management that require context.</li> |
|
71 | 69 | <p>Use Converse API for chat-like, multi-turn flows. Use Invoke API for simple, one-off completions.</p> |
72 | 70 | </CalloutBox> |
73 | 71 | </Section> |
| 72 | + </Section> |
74 | 73 |
|
75 | | - <Section Heading="Converse API vs. Invoke API: Technical and Practical Differences" Level="4"> |
| 74 | + <Section Heading="🏗️ Technical Foundations" Level="4"> |
| 75 | + <Section Heading="Converse API vs. Invoke API" Level="5"> |
76 | 76 | <ul> |
77 | 77 | <li><b>Invoke API:</b> Stateless. Each request is a single prompt/response. No memory of previous turns. Simpler, but limited for conversations.</li> |
78 | 78 | <li><b>Converse API:</b> Stateful. You send the full conversation history (as a list of messages). The model can reference, summarize, or clarify based on prior turns.</li> |
|
89 | 89 | </CalloutBox> |
90 | 90 | </Section> |
91 | 91 |
|
92 | | - <Section Heading="How the Converse API Flows End to End" Level="4"> |
93 | | - <p>Before we write any code, here's a visual map of the full request lifecycle — from your .NET application calling the SDK, through Bedrock's Converse API, down to the Foundation Model, and back. Notice the <b>multi-turn conversation loop</b> and the <b>tool use</b> opt block — both are native to the Converse API and impossible with InvokeModel.</p> |
94 | | - <BlogImage ImagePath="/images/blog/ai/bedrock/aws-converse-sequence.svg" Description="Sequence diagram: .NET application using AWS Bedrock Converse API with multi-turn conversation loop and tool use" Number="1" /> |
| 92 | + <Section Heading="How the Converse API Flows End to End" Level="5"> |
| 93 | + <p>Before we implement any code, let's visualize the full request lifecycle — from your .NET application calling the SDK, through Bedrock's Converse API, down to the Foundation Model, and back. Notice the <b>multi-turn conversation loop</b> and the <b>tool use</b> capability — both are native to the Converse API and impossible with InvokeModel.</p> |
| 94 | + <BlogImage ImagePath="/images/blog/ai/bedrock/aws-converse-sequence.svg" Description="Sequence diagram: .NET application using AWS Bedrock Converse API with multi-turn conversation loop and tool use" Number="1" /> |
| 95 | + </Section> |
95 | 96 | </Section> |
96 | 97 |
|
97 | | - <Section Heading="How: Building an AI Customer Service Agent with Converse API" Level="4"> |
| 98 | + <Section Heading="💻 Implementation Guide" Level="4"> |
98 | 99 | <Section Heading="1. Prerequisites" Level="5"> |
99 | 100 | <ul> |
100 | 101 | <li>AWS account with Bedrock access enabled.</li> |
|
0 commit comments