Build your bot
In this 'Build your bot' section you will learn how to:
- Build flows that contain the logic needed to resolve specific question of the user.
- Bring your various flows together in conversations by sharing information between flows and using context.
- Improve language understanding of your bot by using Teneo's unique hybrid natural language model.
- Make your bot more capable by learning the finesses of the scripting options in Teneo.
- Read more on our best practices when building a bot.
- Teneo allows you to perform quality assurance tasks during the development and maintenance of a Teneo solution by testing your flows.
Once you're ready to make your bot available on multiple channels, move over to Deploy your bot where you'll find documentation on our SDK's and example connectors for platforms like Slack, Facebook Messenger, Microsoft Bot Framework, and Google Assistant. Check out Analyze your bot for details on getting more out of your conversational AI solution.
Flows
Dialogues in Teneo are handled by Flows. Flows are visual objects that contain all the necessary logic to resolve a user's question or intent. Depending on the user's intent, the flow may vary in complexity. You can add as many flows to your solution as you want. Together, the flows allow the user to have a conversation about different topics.
Flows can be simple (e.g. to answer the question "What kind of coffee do you have?") or complex (for example, a flow that helps the user book a flight), but they always represent some kind of predefined conversational pattern.
Flows in Teneo are represented graphically. At the top of the flow, we find the trigger. This is where we define what kinds of inputs should activate the flow. This can be done in various ways, including by creating machine-learned classes or by defining linguistic rules.
Simple flows just contain a trigger that recognizes the user's intent and an output that contains the answer.
More complex flows may contain many more elements like junctions & transitions, different outputs, links to other flows, etc.
Conversations
One of the trickiest things in bot design is bringing your various flows together in conversations. It's easy to create a bot that handles a single task, but it is rare that we need a bot that simple. In fact, even when your bot is designed for one task only, users may ask about other things. This is a fundamental difference between GUI design and bot design, for example. In a GUI, users may only interact using the things that are actually there. Conversations, on the other hand, have no obvious borders. So even the smallest bot needs to have at least one extra flow for dealing with inputs falling out of scope.
Another special (and cool) thing about conversations is that users can share information between flows, e.g. if the user wants the bot to suggest a coffee type, which triggers a different flow where the user can order said coffee type. The user does not even need to mention the coffee type again; the bot remembers this information from the previous flow and can simply place the order when requested to.
The good news is that these things are exactly what Teneo is built to help you with.
Teneo has many ways of keeping conversations as natural as possible. For example, just like in regular conversations, users are able to pursue various topics at once, rather than having to stay strictly within the confines of a single flow. As long as outputs are set to be able to handle interruptions, users can trigger one flow, then trigger a second before the first one is finished, then be returned to the first flow to complete it. The following is an example of how this might look:
User: I'd like to order a coffee.
Bot: Ok, what coffee would you like?User: Which coffees do you have? (the coffee order flow is interrupted)
Bot: We offer a variety of handcrafted coffee drinks - from espressos to macchiatos to flat whites and more.
Bot: Let's continue with your order. Which coffee would you like? (the coffee order flow is resumed)User: A flat white, please.
Bot: Ok, a flat white will be ready for pickup in 5 minutes.
Language Understanding
Teneo uses a hybrid model when understanding language. This means that in Teneo you can mix machine learning algorithms and linguistic conditions for Natural Language Understanding (NLU). This approach gives you both the power of machine learning and the precision and linguistic scalability that linguistic conditions provide.
Scripting
Throughout the lifetime of your bot, you may need to execute scripts and code. For example, at the start of the conversation you might want to retrieve and store the timezone of the user, so you can personalize the greeting message and also use the timezone in other flows. Or inside a flow, you might want to run a script to check if a user provided a valid account number.
Scripts in Teneo are written in Groovy or Java code. Apache Groovy is similar to Java but with an easier-to-learn syntax. More details on Groovy can be found here.
For a quick overview of basic Groovy scripts that come in handy when using Teneo, see the Groovy basics page. If you're looking for something more like a tutorial, we quite like this one.