Skip to content

Commit d0d425f

Browse files
authored
Merge pull request #4489 from hhunter-ms/beef-up-conversation
[Conversation] Beef up overview
2 parents 9c3086b + cac5fe6 commit d0d425f

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,35 @@ description: "Overview of the conversation API building block"
1010
The conversation API is currently in [alpha]({{< ref "certification-lifecycle.md#certification-levels" >}}).
1111
{{% /alert %}}
1212

13-
1413
Using the Dapr conversation API, you can reduce the complexity of interacting with Large Language Models (LLMs) and enable critical performance and security functionality with features like prompt caching and personally identifiable information (PII) data obfuscation.
1514

15+
<img src="/images/conversation-overview.png" width=800 alt="Diagram showing the flow of a user's app communicating with Dapr's LLM components.">
16+
17+
Dapr's conversation API reduces the complexity of securely and reliably interacting with Large Language Models (LLM) at scale. Whether you're a developer who doesn't have the necessary native SDKs or a polyglot shop who just wants to focus on the prompt aspects of LLM interactions, the conversation API provides one consistent API entry point to talk to underlying LLM providers.
18+
19+
In additon to enabling critical performance and security functionality (like [prompt caching]({{< ref "#prompt-caching" >}}) and [PII scrubbing]({{< ref "#personally-identifiable-information-pii-obfuscation" >}})), you can also pair the conversation API with Dapr functionalities, like:
20+
- Resiliency circuit breakers and retries to circumvent limit and token errors, or
21+
- Middleware to authenticate requests coming to and from the LLM
22+
23+
Dapr provides observability by issuing metrics for your LLM interactions.
24+
1625
## Features
1726

27+
The following features are out-of-the-box for [all the supported conversation components]({{< ref supported-conversation >}}).
28+
1829
### Prompt caching
1930

20-
To significantly reduce latency and cost, frequent prompts are stored in a cache to be reused, instead of reprocessing the information for every new request. Prompt caching optimizes performance by storing and reusing prompts that are often repeated across multiple API calls.
31+
Prompt caching optimizes performance by storing and reusing prompts that are often repeated across multiple API calls. To significantly reduce latency and cost, Dapr stores frequent prompts in a local cache to be reused by your cluster, pod, or other, instead of reprocessing the information for every new request.
2132

2233
### Personally identifiable information (PII) obfuscation
2334

24-
The PII obfuscation feature identifies and removes any PII from a conversation response. This feature protects your privacy by eliminating sensitive details like names, addresses, phone numbers, or other details that could be used to identify an individual.
35+
The PII obfuscation feature identifies and removes any form of sensitve user information from a conversation response. Simply enable PII obfuscation on input and output data to protect your privacy and scrub sensitive details that could be used to identify an individual.
36+
37+
## Demo
38+
39+
Watch the demo presented during [Diagrid's Dapr v1.15 celebration](https://www.diagrid.io/videos/dapr-1-15-deep-dive) to see how the conversation API works using the .NET SDK.
40+
41+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/NTnwoDhHIcQ?si=37SDcOHtEpgCIwkG&amp;start=5444" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
2542

2643
## Try out conversation
2744

@@ -31,7 +48,7 @@ Want to put the Dapr conversation API to the test? Walk through the following qu
3148

3249
| Quickstart/tutorial | Description |
3350
| ------------------- | ----------- |
34-
| [Conversation quickstart](todo) | . |
51+
| [Conversation quickstart](todo) | TODO |
3552

3653
### Start using the conversation API directly in your app
3754

daprdocs/content/en/developing-applications/building-blocks/conversation/howto-conversation-layer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func main() {
9292
}
9393

9494
input := dapr.ConversationInput{
95-
Message: "hello world",
95+
Message: "Please write a witty haiku about the Dapr distributed programming framework at dapr.io",
9696
// Role: nil, // Optional
9797
// ScrubPII: nil, // Optional
9898
}
@@ -134,7 +134,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
134134

135135
let mut client = DaprClient::connect(address).await?;
136136

137-
let input = ConversationInputBuilder::new("hello world").build();
137+
let input = ConversationInputBuilder::new("Please write a witty haiku about the Dapr distributed programming framework at dapr.io").build();
138138

139139
let conversation_component = "echo";
140140

@@ -179,7 +179,7 @@ dapr run --app-id conversation --dapr-grpc-port 50001 --log-level debug --resour
179179
**Expected output**
180180

181181
```
182-
- '== APP == conversation output: hello world'
182+
- '== APP == conversation output: Please write a witty haiku about the Dapr distributed programming framework at dapr.io'
183183
```
184184

185185
{{% /codetab %}}
44.2 KB
Loading

0 commit comments

Comments
 (0)