New in Parlant 2.1: Utterance Templates

TL;DR Eliminate LLM hallucinations and gain full control over chat style and tone of voice with our new Utterance Templates.
At Parlant, we're committed to pushing the boundaries of conversational AI, ensuring that interactions are not only intelligent but also consistent, compliant, and aligned with your brand's voice.
Today, we're thrilled to unveil a game-changing feature: Utterance Templates.
🧠 What Are Utterance Templates?
Utterance Templates empower you with precise control over your Parlant agent's responses. By restricting outputs to a predefined set of responses, you ensure your agent communicates with a consistent tone, style, and accuracy, aligning perfectly with your brand voice and service protocols while completely eliminating the risk of even subtle unwanted or hallucinated outputs.
Think of it as handing your agent a curated set of response cards. Based on the conversation context, the agent selects the most appropriate "card" to play, ensuring every interaction is both relevant and on-brand.


🛠️ How It Works
Under the hood, Utterance Templates operate through a three-stage process:
-
Draft Message Generation: The agent drafts a fluid message based on the current situational awareness, including interaction history, guidelines, and tool results.
-
Template Matching: It then matches the closest utterance template from your predefined set.
-
Rendering: The engine renders the matched template using the Jinja2 templating engine, supporting variable substitutions using tool results, and generative substitutions when explicitly allowed.
This process ensures that responses are not only contextually appropriate but also adhere strictly to your specified guidelines.
🧪 Real-World Use Case: Streamlining Customer Support
Scenario: A customer inquires about product availability.
Without Utterance Templates:
Customer: Do you have it in stock?
Agent: Yes, we've got this item in stock! Let me know if you need any help finding it.
With Utterance Templates:
Customer: Do you have it in stock?
Agent: Yeah bro. Should I add it to your cart?
By utilizing Utterance Templates, the agent's response is not only concise but also aligns with the brand's conversational style, ensuring consistency across interactions.
🔒 Why This Matters: Enhancing Compliance and Brand Integrity
In industries where compliance and brand consistency are paramount—such as finance, healthcare, and legal services—Utterance Templates offer unparalleled advantages:
-
Elimination of Hallucinations: By restricting responses to predefined templates, you eliminate the risk of AI-generated inaccuracies.
-
Regulatory Compliance: Ensure that all communications adhere to industry regulations and standards.
-
Brand Consistency: Maintain a uniform tone and style across all customer interactions, reinforcing brand identity.
🚀 Getting Started
Ready to take control of your conversational AI? Here's how to enable Utterance Templates:
-
Define Your Templates: Create a set of response templates using the Jinja2 engine, incorporating variable substitutions as needed.
-
Set Composition Mode: Choose the appropriate composition mode for your use case:
parlant agent update \
--id $AGENT_ID \
--composition-mode $COMPOSITION_MODE # [strict-utterance|fluid-utterance]
- Strict Utterance: Agent can only select responses from defined templates.
- Fluid Utterance: Agent prioritizes templates but may fall back to default message generation if no good match is found.
- Monitor and Refine: Use Parlant's integrated UI to inspect draft messages and refine templates for optimal performance.
For a detailed guide, visit our Utterance Templates Documentation.
💬 Join the Conversation
We believe Utterance Templates will revolutionize the way businesses approach conversational AI, offering a blend of control, compliance, and customer satisfaction. We'd love to hear how you're planning to implement this feature in your workflows.
Reach out to our team for personalized assistance.
Here's to more meaningful and consistent conversations!