Skip to main content

Glossary

Glossary

The glossary lets you define the specific terms and language your agent needs to understand.

By creating this custom dictionary, you're teaching your agent the unique vocabulary it should recognize during conversations, from business-specific terms to common variations of how users might phrase things. It'll also help it make sense of any domain-specific ways in which you might phrase instructions.

Each term in your glossary includes the official word or phrase, its meaning in your context, and alternative ways people might refer to it. This helps the agent stay on track and maintain fluent conversations within your specific domain.

Tag the Agent

In configuring the agent's conversation model, we need to associate various modeling elements with the agent. Association is achieved using tags. There are two approaches to tagging:

  1. Associate elements directly with the specific agent you're building. This is achieved by tagging the element with the special tag format "agent:<AGENT_ID>".
  2. Group the elements under a reusable tag (which you can name however you want) and then associate the tag with the agent. This is generally preferable as you could then reuse the elements across different agents. For this tutorial, we'll take this preferred approach.

Let's create a tag, and then tag our agent with it.

parlant tag create --name retail
parlant agent tag --id $AGENT_ID --tag retail

Create Terms

For our retail tech store, lets teach the agent two glossary terms.

First, the name of our store:

description=$(cat <<EOF
The name of our tech retail store, specializing
in gadgets, computers, and tech services.
EOF
)

parlant glossary create \
--name Bug \
--description "$description" \
--synonyms "The Store, The Business, The Company" \
--tag retail

Then, our warranty plan:

description=$(cat <<EOF
Our free warranty and service package that comes with
every purchase and covers repairs, replacements,
and tech support beyond the standard manufacturer warranty.
EOF
)

parlant glossary create \
--name Bug-Free \
--description "$description" \
--synonyms "Warranty, Protection Plan, Service Coverage, Extended Warranty" \
--tag retail

This setup enables the agent to direct customers to the appropriate resources when they ask questions related to your glossary.

Head over to http://localhost:8800 and ask Chip about the store and its services!

Agent glossary