In a few minutes you can say 'Hello!' to your first LUIS^Teneo solution! Let's get started.
Create a solution
Building a bot in Teneo means building a solution. A solution is a container for all knowledge, conversational logic and additional resources that make up your bot.
This is what you need to do to create a solution:
Log in to Teneo Studio.
Select 'Solutions' in the menu on the left.
Click the 'New' button in the upper right corner. This opens a dialog box.
Fill in a name for your solution, for example My First LUIS^Teneo Solution.
Make sure the Solution Language for this first bot is English. This will be the mother tongue of your bot.
Under 'Solution Content', choose 'Create from Template' and select 'Teneo Dialogue Resources English' from the list. This will boost your bot with lots of pre-built flows. The bot will then, right out of the box, understand and respond to greetings, meta-requests (like Can you repeat that?), feedback (like Great! or You are funny) and conversational small talk.
Click 'OK'. It may take a couple of minutes for your solution to be created. You will be notified when it’s done.
Assign Teneo Lexical Resources
Teneo comes with pre-built Lexical Resources (TLRs). The TLRs help your bot to understand a specific language, its words, synonyms and expressions.
Now, let's specify which TLRs to use for your bot. This is what you need to do:
Open your solution by double-clicking its name in the Solutions window.
Click on the tab 'SOLUTION' in the upper left corner.
Select 'Resources' in the purple bar on the left.
Make sure the 'Lexical' tab at the top of the window is selected.
Click 'Assign Lexical Resource' in the upper right corner and select Teneo Lexical Resources English in the drop-down.
Connect your LUIS application to Teneo
Now it's time to build a bridge between your LUIS solution and Teneo.
The first step is to add LuisPredict.groovy to your solutions file resources. This .groovy file contains the needed code to make this possible.
While inside the Resources section, select on 'File' located at the top.
Use 'Add' on the upper right to add the .groovy file. Alternatively, you may drag and drop it.
Change the Published Location to /script_lib.
Prepare your LUIS application
It's time to visit the LUIS application to collect some details which later will be used to connect this LUIS application to your Teneo solution. But first we'll need to import intents to our LUIS application. When you created your solution, you based it on the 'Teneo Dialogue Resources English' template solution which comes with many prebuilt flows and intents. To make sure LUIS is aware of these intents, we'll need to import them into your LUIS application.
First, we'll add a global variable called luisPredict to the solution. This variable should contain the api keys of your LUIS application. Before we add the variable to the solution, let's prepare its value. Copy the following code and populate it with the values you collected from your LUIS application above:
The result should look something like this: new LuisPredict('12345678910abcd','https://www.luis.ai/applications/abcd-efghi-jklmn-opqres-tuvw-qq-112112/'', 'dcba019876543210')
Now let's add the global variable:
Select 'Globals' in the purple bar on the left-hand side, and then select 'Variables'.
Click 'Add'. A panel for specifying the new variable appears on the right-hand side.
Name the variable: luisPredict.
Set its value to the string you created above.
Now, let's update the global Pre-Matching script:
Select the 'Scripts' tab at the top.
Click on the 'Edit' button in the top right and add the following groovy line into the editing window luisPredict.predict(_).
Time to talk to your bot! The 'Try out' panel in the main solution window allows you to test your bot and chat with it.
If you are still in the Globals window, click on the arrow in the top left to go to the main solution window (the HOME tab).
If the tryout panel is not visible, make it appear by clicking the 'Try out' button on the right side of the window.
Because you've just assigned the Lexical Resources, there will be a message at the bottom of the tryout panel that says, 'A reload of the engine is required to apply your recent changes'. Click Reload now to get rid of that message.
Say hello to your bot. The input field is at the bottom of the panel.
Perhaps you can try some other small talk questions too, like: