How to properly write a script for a virtual assistant

Hello! My name is Mikhail Abramov, I work as a technical writer at MTS Exolve. We develop and test digital bots on the platform VoiceBox is a designer of voice robots.

We launched this project in 2020. It was created for business, our clients, who wanted to automate routine, for example, confirmation of reservation, delivery, address, and so on.

I’ll immediately warn you about the possible negative: our service can only be used to call people who are ready for this call. You ordered pizza and the robot called, told you the order number, talked about all its items and delivery time. In a word, a useful robot.

Today I’ll tell you how you can easily and simply develop call scripts in the graphical interface of our designer.

Creating a well-thought-out script is more than half the success when implementing a voice bot. Therefore, work should begin even before writing the script for the script. It is necessary to create a dialogue scheme in advance, but in our case it is convenient that we can do this directly in the voice bot designer.

It looks something like this:

Let me explain the diagram: first, the client gets to the main menu, where he is asked to select an option by voice or by using the numeric input key. This scheme works great when the company has several departments or specialists who receive calls when a client performs a target action. This could be a voice command or pressing a specific key. The central branch is any action when translation is not required. In this case, the client will hear the recording selected during setup, and the call will end.

This is the simplest scenario, which is unlikely to be used in this form. In this case, the goal is to show that the scheme can be implemented through the VoiceBox interface in graphical form. There is no direct work with the code, which means that even a person unfamiliar with programming can handle creating such a script. There will still be code elements in real scenarios, but they are easy to work with.

Variables

Variables will be needed to retrieve information from the connected database. Example: the time of a doctor’s visit, which we will announce to a forgetful client who called the reception, or the order number in an online store. In both cases, the bot will access the records or orders database.

Variables can also be created directly during communication with the client, and then the bot will write the corresponding values ​​into them. Here's what it looks like in the VoiceBox interface:

In the example above, the bot will process the voice input and write the client's name to a variable name, after which it will continue to communicate using this value where it will be written in the script blocks. For example:

As you can see, the variable should be formatted in a special way (in our case, enclosed in double curly braces {{}} ) so that the bot can process it correctly. Suppose the client introduced himself as Ivan Petrovich, and then he will hear the following: “We are glad that you contacted us, Ivan Petrovich! Please wait a moment for the accounting employee to answer you.

Variables with an initially specified value do not require “stuffing”. The service will take this value directly from the database. Here, too, everything is simple: in the scripts there is a button “Add variable”, by clicking on which we get to the section of variables available in the database. Here is a humorous example with an online store:

If the client calls, for example, the order number (variable number) or full name (variable name), then the bot will be able to tell him everything else: the delivery location (place), order amount (amount) and the composition of purchases (order). To do this, we will need to correctly arrange these variables in the appropriate script blocks.

Block arrangement

We need to know what each type of block does in order to place them correctly. There are the following block types:

The most commonly used are the following:

  • “Interactive menu” — a block for the user to select an answer from a given number of proposed options. It is possible to select either by voice or by pressing a button, or both options at once.

  • “Player” — the user listens to the recorded information.

  • “Response Recognition” in VoiceBox allows you to accept the user's voice input and then save it in the database or use it in a further conversation.

  • “Forwarding” — a block for transferring a call to a specified number, for example, to a specific specialist.

  • “End call” — dialogue completion block.

  • “Script” – used to write additional logic. The “Script” block may be needed, for example, for the bot to perform actions based on a certain condition, assign values, or add operators.

The right menu allows you to customize the script logic if ordinary blocks are not enough for us. But, as you can see in the screenshot, everything here is configured without code, but simply by inserting the appropriate values:

No dead ends

Each branch should lead to some result, so the script script should be configured so that the client does not leave disappointed. For example, if the bot does not understand what the caller wants, provide an immediate transfer to an operator. Also, a transfer to the operator should be added at the very beginning, so that the client has a choice: to navigate through the menu with a bot or immediately go to solving his specific issue. The lack of such a choice is very annoying.

At the same time, a well-configured voice bot will still help a person save time, you just need to explain this to clients – and if the bot is really convenient, people will soon start using it.

Speech recognition

Bots, like people, also make mistakes (yes, yes) and can incorrectly recognize human speech. And in this case, it is reasonable to help them and, for example, make a list of the most popular (or almost all) names. The person will introduce himself, and the bot will compare the recognized speech with records from the database and avoid errors in the client’s name.

It is important to expand the list of words and phrases that express agreement or disagreement. People won’t necessarily answer “yes” to the bot’s question, but can say “okay”, “okay”, “agree”, “agree”, “okay”, “fine” and so on. And when denied, the bot can hear not only “no,” but also “no,” “against,” “no way,” and much more. Luckily, you can add entire lists of target words here (and many are already in the default database), so setting it up won't take much time.

Example script

Let's imagine that we need to create a scenario for technical support of a mobile operator. We create such a scheme in VoiceBox interface:

Add the following text to the welcome menu (top on the screen): Welcome to technical support. If you need help with your communication settings, say “Settings” or press 1. If you have a question about tariffs, say “Tariff” or press 2. If you have another question, say “Operator” or press 3.

Going to settings, the subscriber will hear: If you want to set up the Internet, say “Internet” and follow the instructions. If you have another question, say “Other” and I will connect you to an operator. Next comes the transition to the right employees. Going to the tariffs, the subscriber will hear from the robot: If you want to know the conditions of your tariff, say “My tariff”. If you want to switch to another tariff, say “Move”. In case of transition, the call will be transferred to a specialist. And when the subscriber selects “My tariff”, the robot can ask him to name the phone number (or contract), after which, using the value entered in the variable, he will announce the terms of the tariff in the “Information” block.

Of course, this script requires improvement. For example, it is necessary to provide for screening out spammers, whom the bot can either reset or constantly chase through the menu. Also, the real script will be more complex due to a larger number of services, response options and redirections. Let's imagine that after information about the tariff, the subscriber wants to continue the dialogue – therefore, it is necessary to provide a transfer to the main menu or to the operator.

Tips for creating a script

  1. Define the problem you want to solve. When it comes to voice interfaces, it's best to start with short or repetitive tasks.

  2. Define your audience. Who will use this interface? Create audience profiles to narrow it down to specific users and personalize your bot. Any business has obvious users, people you immediately think of, but don't forget about those who stand out from the standards. Try to accommodate all user needs, even when serving people with physical or visual impairments.

  3. Create a voice bot image. This will help make the conversation personal and human. People respond better to conversational AI systems that have their own identity. Try to create an image that matches the brand, choose a voice that clearly expresses this. Or use adaptive synthesis.

People know very quickly whether they like a voice or not, so it's important to choose your brand voice carefully.

  1. Create scripts for every action. Imagine the questions or commands that users will ask the system. How can the robot and then the user respond? Outline different threads of conversation. For example, if you're building a bot for restaurant customers, your obvious path would be a standard delivery order. But what happens when the bot is asked if a dish is gluten-free? Most users won't ask this question, but some may, and it's important to include them in the script.

  2. Check scripts internally. Download dialogues at bot platform and test them. Record conversations. Pay attention to any unnatural pauses or imperfections while testing the prototype. Ask your colleagues for help. Record those moments where you can simplify the user's work.

  3. Publish a beta version of the bot. Once you pass the internal test, introduce the bot into conversations with clients. But this is just the beginning. Pay close attention to the first conversations. See how people formulate questions or commands, and then adjust the bot's answers.

The graphical interface is a great assistant when creating scripts. That's all for me, I'm ready to answer questions in the comments!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *