Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

2 posts tagged with "hallucinations"

View All Tags

Solving LLM Hallucinations in Conversational, Customer-Facing Use Cases

Solving LLM Hallucinations in Conversational, Customer-Facing Use Cases
5 min read

Or: Why “Can we turn off generation” might be the smartest question in generative AI

Not long ago, I found myself in a meeting with technical leaders from a large enterprise. We were discussing Parlant as a solution for building fluent yet tightly controlled conversational agents. The conversation was going well—until someone asked a question that completely caught me off guard:

“Can we use Parlant while turning off the generation part?”

At first, I honestly thought it was a misunderstanding. A generative AI agent… without the generation? It sounded paradoxical.

But I paused. And the more I considered it, the more the question started to make sense.

The High Stakes of Customer-Facing AI​

These teams weren’t playing around with demos. Their AI agents were destined for production—interfacing directly with millions of users per month. In that kind of environment, even a 0.01% error rate isn’t acceptable. One in ten thousand bad interactions is one too many when the outcome could be compliance failures, legal risk, or brand damage.

At this scale, “pretty good” isn’t good enough. And while LLMs have come a long way, their free-form generation still introduces uncertainty—hallucinations, unintended tone, and factual drift.

So no, the question wasn’t absurd. It was actually pivotal.

A Shift in Perspective​

Later that night, I kept thinking about it. The question made more sense than I had initially realized, because these organizations weren’t lacking resources or expertise.

In fact, they had full-time Conversation Designers on staff. These are professionals trained in designing agentic behaviors, crafting interactions, and writing responses that align perfectly with brand voice and legal requirements, and get customers to actually engage with the AI — which turns out to be no easy task in practice!

So they weren’t asking to turn off generation out of fear—they were asking to turn it off because they wanted—and were able—to take control into their own hands.

That’s when it hit me: we’ve been misframing what “generative AI agents” actually are.

They’re not necessarily about open-ended token-by-token generation. They’re about being adaptive: responding to inputs in context, with intelligence. Whether those responses come directly, token-by-token, from an LLM, or from a curated response bank, doesn’t actually matter. What matters is whether they’re appropriate: compliant, contextual, clear, and useful.

github Get in touch with us

The Hidden Key to the Hallucination Problem​

Everyone is looking for a fix to hallucinations. Here’s a radical thought: we think it’s already here.

Conversation Designers.

Having conversation designers on your team—as many enterprises already do—you're not just mitigating output hallucinations, you're actually primed to eliminate them completely.

They also bring clarity into the customer interaction. Intentionality. An engaging voice. And, they create more effective interactions than foundation LLMs can, because LLMs (on their own) still don’t sound quite right in customer-facing scenarios.

So instead of trying to retrofit generative systems with band-aids, I realized: Why not bake this into Parlant from the ground up? After all, Parlant is all about design authority and control. It’s about giving the right people the tools to shape how AI behaves in the world. This was a perfect match—especially for these enterprise use cases which had so much to gain from adaptive conversations, if only they could trust them with real customers.

From Insight to Product: Utterance Matching​

That was the breakthrough moment that led us to build Utterance Templates into Parlant.

Utterance Templates let designers provide fluid, context-aware templates for agent responses: responses that feel natural but are fully vetted, versioned, and governed. It’s a structured way to maintain LLM-like adaptability while keeping a grip on what’s actually said.

Under the hood, utterances templates work in a 3-stage process:

  1. The agent drafts a fluid message based on the current situational awareness (interaction, guidelines, tool results, etc.)
  2. Based on the draft message, it matches the closest utterance template found in your utterance store
  3. The engine renders the matched utterance template (which is in Jinja2 format), using tool-provided variable substitutions where applicable

We immediately knew this would work perfectly with Parlant's hybrid model: one that gives software developers the tools to build reliable agents, while letting business and interaction experts define how those agents behave. And the guys at that particular enterprise immediately knew it would work, too.

View utterance draft

Conclusion: Empower the Right People​

The future of conversational AI isn’t about removing people from the loop. It’s about empowering the right people to shape and continuously improve what AI says and how it says it.

With Parlant, the answer can be: the people who know your brand, your customers, and your responsibilities best.

And so that’s not absurd at all. It’s exactly how it should be. At least in our view!

github Get in touch with us

New in Parlant 2.1: Utterance Templates

New in Parlant 2.1: Utterance Templates
4 min read

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.

Cartoon1Cartoon2

🛠️ How It Works​

Under the hood, Utterance Templates operate through a three-stage process:

  1. Draft Message Generation: The agent drafts a fluid message based on the current situational awareness, including interaction history, guidelines, and tool results.

  2. Template Matching: It then matches the closest utterance template from your predefined set.

  3. 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.

View utterance draft

🧪 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.

github Get in touch with us

🔒 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:

  1. Define Your Templates: Create a set of response templates using the Jinja2 engine, incorporating variable substitutions as needed.

  2. 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.
  1. 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!

github Get in touch with us