ok

0.  A Brief Introduction to Concepts, Intents and Plans

A typical discourse is made up of a series of sentences; every sentence has an intent. In our system, an intent is defined as a collection of sentences that express a similar idea. An intent is composed of plain text, along with some concepts.

A concept is a set of keywords, which is a part of and can be referenced by sentences.

Plans, on the other hand, controll logical relations between intents, directing the dialogue flows. 

 

1. Importing Templates

In the Project Center pop-up window, click 'Import Template Project' in the lower right corner, choose 'Hello City', and click 'add'.

Then click the 'edit' button of the Hello City project.

 

2. Filling out Project Info

After you are in the Hello City project, click 'Info' on the toolbar at the top. Then the Project Info window will pop up. In here, please fill out the required fields. Note that if it is your first time designing a DDE project, you need to get a domain ID by clicking 'Register'. (See the picture below).

Enter the domain name and domain description. Then click 'Create' and a domain ID will be generated for you. Next, enter the generated domain ID and click 'Save' in the lower right corner to save the settings. 

3. Publishing the Project

In the upper right corner, click 'Publish'. For the next two pop-up windows, click 'Continue to Publish'. Please wait until the project is successfully published. (You will see a notification at the top reading "Published successfully.")

 

 

4. Doing Tests in the Test Window

In the test window on the right, enter "開啟第一個測試", and you can see "測試開啟成功" in the response field. (See the picture below) Next, enter "哈囉台北", and you will see "哈囉". 

Congratulations on your first Zenbo domain! 

Next I am going to walk you through simple template settings.

 

5. Introduction to Concepts

First click the concept tab at the top. Before you get your hands dirty, have you noticed there are many question marks beside some of the fields? Hover your cursor over any mark, and you'll see a brief explanation of what the field's function is.

In th above picture, you can see three instances, the IDs of which are city001, city002 and city03, respectively. You can enter one or more synonyms for each instance. In this example in particular, we entered one for each instance, namely "台北", "台中", "高雄". Thus, in this concept there are three instances, each of which has only one synonym.

 

6. Introducation to Intents

By clicking the Intent tab at the top, you can go to the intent page, where you will be directed by default to the first intent, 'utteranceToLaunchApp'. In the sentence field, there is a sentence, ”開啟第一個測試”.

Next click the second intent, 'userSayHello' on the left. In here you will see two sentences, "哈囉Concept_Cit" and "嗨Concept_City".

Blue blocks mean they are plain text, whereas orange ones mean they are concepts.  

Because 'Concept_City' contains real words '台北', '台中', '高雄', after substituting these words for the concept, you can see that this intent is essentially equivalent to "哈囉台北"、"哈囉台中", or "哈囉高雄".

 

7. Intoduction to Plans

Click the plan tab at the top to go to the plan tab page, where you will be directed by default to the first plan, 'launchHelloCity_Plan'.

The second field 'Is the plan able to launch the app?' is 'true', indicating this plan is a cross intent. What is a cross plan? Simply put, a cross plan is a plan that can be triggered before any other plans are triggered.

The settings of the event field determine which intents can trigger the plan. In the above picture, we created an event whose triggered  method is 'CSR'. It references the intent 'utteranceToLaunchApp', meaning this plan can be fired if the user says any sentence defined in the utteranceToLaunchApp intent.

Robot's response can be generated based on the TTS. In the picture below, we can enter  "測試開啟成功", and the robot will in turn respond to the user with TTS:  "測試開啟成功".

The output context field is used to decide which plan is going to be trigged next. In here please enter 'HelloCity'.

Next click 'helloWorld' to go to the second plan.

In the hellowWorld plan, the value of "Is the plan able to launch the app?" is 'false', which means this plan cannot be triggered unless there is another plan that has already been triggered. For this kind of plans, you need to set their input contexts in order for them to be fired. When one of their input contexts equals one of some other plan's output contexts, they can be triggered successfully. Do you remember in launchHelloCity_Plan, we set its output context to 'HelloCity'? Therefor, in order for the hellowWorld plan to be triggered after launchHelloCity_Plan, the input context of the hellowWorld plan must contain the output context of launchHelloCity_Plan.

After the helloWorld plan is triggered, the robot will respond to the user by saying TTS: "哈囉".

 

8. Testing

  1. Testing cross intents
    1. Please type "我要用hello world" in the 'Try it now' box. You will see results similar to the picture below. This is because the cross intent is: 我要用<appName>. You can see the app name in the info pop-up window.     
  2. In-App Testing

    1. If you have done the first step, enter "hello black city", and you will see some results similar to the screenshot below. 

  3. However, if you skipped the first step and rushed headlong into the second, you will fail to see the correct results. This is because the current state of contexts is not 'helloWorld'. To fix this, you can either go back and do step 1 or you can use the set context option to set the current state of contexts (see the picture below).  Then you should be able to see the correct results. 

For more information on ZenboAI, we suggest reading How to Start(en) for more details.

Go To Top