diff --git a/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md b/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md index f7621517e..237314ac3 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md @@ -10,18 +10,35 @@ description: "Overview of the conversation API building block" The conversation API is currently in [alpha]({{< ref "certification-lifecycle.md#certification-levels" >}}). {{% /alert %}} - 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. +Diagram showing the flow of a user's app communicating with Dapr's LLM components. + +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. + +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: +- Resiliency circuit breakers and retries to circumvent limit and token errors, or +- Middleware to authenticate requests coming to and from the LLM + +Dapr provides observability by issuing metrics for your LLM interactions. + ## Features +The following features are out-of-the-box for [all the supported conversation components]({{< ref supported-conversation >}}). + ### Prompt caching -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. +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. ### Personally identifiable information (PII) obfuscation -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. +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. + +## Demo + +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. + + ## Try out conversation @@ -31,7 +48,7 @@ Want to put the Dapr conversation API to the test? Walk through the following qu | Quickstart/tutorial | Description | | ------------------- | ----------- | -| [Conversation quickstart](todo) | . | +| [Conversation quickstart](todo) | TODO | ### Start using the conversation API directly in your app diff --git a/daprdocs/content/en/developing-applications/building-blocks/conversation/howto-conversation-layer.md b/daprdocs/content/en/developing-applications/building-blocks/conversation/howto-conversation-layer.md index 0d35d860b..2c33e0595 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/conversation/howto-conversation-layer.md +++ b/daprdocs/content/en/developing-applications/building-blocks/conversation/howto-conversation-layer.md @@ -92,7 +92,7 @@ func main() { } input := dapr.ConversationInput{ - Message: "hello world", + Message: "Please write a witty haiku about the Dapr distributed programming framework at dapr.io", // Role: nil, // Optional // ScrubPII: nil, // Optional } @@ -134,7 +134,7 @@ async fn main() -> Result<(), Box> { let mut client = DaprClient::connect(address).await?; - let input = ConversationInputBuilder::new("hello world").build(); + let input = ConversationInputBuilder::new("Please write a witty haiku about the Dapr distributed programming framework at dapr.io").build(); let conversation_component = "echo"; @@ -179,7 +179,7 @@ dapr run --app-id conversation --dapr-grpc-port 50001 --log-level debug --resour **Expected output** ``` - - '== APP == conversation output: hello world' + - '== APP == conversation output: Please write a witty haiku about the Dapr distributed programming framework at dapr.io' ``` {{% /codetab %}} diff --git a/daprdocs/static/images/conversation-overview.png b/daprdocs/static/images/conversation-overview.png new file mode 100644 index 000000000..5bfa33ddd Binary files /dev/null and b/daprdocs/static/images/conversation-overview.png differ