Orbita Answers - Implementation Guide

Introduction

Question answering is the most common use case in conversational applications. Orbita Answers is a system that uses a fact-based AI approach to answering questions from information modeled in a knowledge graph.

Orbita Answers builds an answer to a question based on the structure and context of the question. A question has two parts: a topic and a relationship.

Topic. A topic is a word or phrase (most likely be a noun, noun phrase, proper noun, or compound noun). Example: Cafeteria, Sunburn

Relationship. An attribute of a topic.

Let’s take an example:

When does the cafeteria open?

Here, the Topic is Cafeteria and the Relationship is Open.

Similarly, one can ask:

What are the hours of café?

Until when the Restaurant will be open?

Facts are the combinations of topic/relationship and their corresponding answers.

A visitor can ask the following questions and more:

Where is the Restaurant in this building?

Is the Cafeteria nearby?

What are the hours of the café?

When does the cafeteria open?

The following tables show a Cafeteria topic and two relationships (Location and Hours) that deal with separate contexts about the topic.

  • A topic often has synonyms that people use to refer to the same thing, such as a Café, Cafeteria, or Restaurant.
    A synonym is a word or a phrase that means exactly or nearly the same as the topic (most likely be a noun, noun phrase, proper noun, or compound noun).

  • A relationship also often has synonyms. such as nearby, close, or in this building; if the relationship is Hours, then synonyms may be open and hours.

Topic: Cafeteria

Relationship: Hours

Fact

Topic: Cafeteria

Relationship: Hours

Fact

Synonyms

  • Cafe

  • Restaurant

  • Cafeteria

Synonyms

  • Open

  • Hours

The Cafeteria is open every day from 5 AM to 10 PM.

 

 

 

Topic: Cafeteria

Relationship: Location

Fact

Topic: Cafeteria

Relationship: Location

Fact

Synonyms

  • Cafe

  • Restaurant

  • Cafeteria

Synonyms

  • nearby

  • in this building

The Cafeteria is located on the 7th floor near the main elevator.

When you create a new topic, such as Gift Shop, you can leverage the same relationships. That is, you can use Location and Hours with the Gift Shop as you do with the Cafeteria and not have to recreate the same relationships over and over.

Topic: Gift Shop

Relationship: Location

Fact

Topic: Gift Shop

Relationship: Location

Fact

Synonyms

  • Gift Shop

  • Shop

  • Convenience store

Synonyms

  • nearby

  • in this building

The Gift is located on the 3rd floor near the main elevator.

Topic: Gift Shop

Relationship: Hours

Fact

Topic: Gift Shop

Relationship: Hours

Fact

Synonyms

  • Gift Shop

  • Shop

  • Convenience store

Synonyms

  • Open

  • Hours

The Gift shop is open every day from 10 AM to 5 PM.

Starting with an Existing Knowledge Base

From the side menu, click on Answers. This will take you to the Knowledge Base listing screen.

Choose the Knowledge Base from the existing Knowledge Bases. (Refer Starting with an Empty Knowledge Base)

Clicking on the knowledgebase will take you to the Facts screen.

To edit or add Topics, Relationships, or Interrogatives, click on the vertical ellipses icon against the Knowledge Base and select Settings.

How to import a Knowledge Base

You can upload data from a comma-separated value (CSV) file to import a Knowledge Base.

  1. Create a new Knowledge Base into which you would like to import the Data.
    Note: Do not create two knowledge bases with the same name. This will create conflicts while deploying the project to Alexa/Dialogflow.

  2. Click the vertical ellipses button against the Knowledge Base.

  3. Select Import from the drop-down menu.

  4. In the Import dialog box, drop your .csv file in the area provided or click on the area provided to open the Operating System’s navigation window and select the .csv file.

  5. Make sure the .csv file is uploaded successfully and click UPLOAD.

Reset & Upload removes the existing data and upload the data from the file.

Click Learn more about CSV data to know how to construct/format the file.

Refer How do I create a .csv file for Answers? to create your own .csv file.

How to customize the default experience (in experience designer)

Refer Answers Manager node to know more details.

Starting with an Empty Knowledge Base

To create a new Knowledge Base, click on the “+” icon.

Give a name to your Knowledge Base (Note that creating two knowledge bases with the same name will create conflicts while deploying the project to Alexa/Dialogflow.). You can create your own content schema and assign it to your knowledge base to have custom fields in the Facts screen. You can select a content schema from the dropdown list if already created, else select default for the multimodal content editor.

Within the Knowledge Base, you can add your topics, relationships, interrogatives, and facts.

Adding data to the Knowledge Base

In the Knowledge bases listing page, click on the vertical ellipses button against a Knowledge Base and select Settings.

The Setting screen shows the Interrogative, Topics, and Relationships tabs.

Any changes to Settings data are reflected only after deployment to the provider.

Creating Topics

  1. In the Settings screen, the Topics tab is selected by default.

  2. Select the Topics tab and click icon.

  3. Enter the Topic name and click ADD.

  4. In the topic listing page. Click on the topic to view the topic detail page.
    You can add synonyms in the topic detail page,

Related topics

You can relate each topic to other topics.

  1. In the topic detail page, click on the Related Topics tab and click Add .

  2. Select a topic from the drop-down that is listed and click ADD.
    In the screenshot below, We are relating a topic named Cafeteria to the topic Gift Shop.

Creating Relationships

  1. In the Settings screen, select the Relationship tab and click icon.

  2. Enter the Relationship name and click ADD.

  3. On the Relationship creation page, you can add synonyms to the Relationship name.

Creating Interrogatives

You can assign any question word with a relationship. By doing so, the user can ask a question without the relationship word in their question.

For example, you can assign “What is” or “What are” for the Relationship “Definition”. Now, the user can ask “what is {topic}?” and the bot understands it as “what is the definition of {topic}?”.

To add an interrogative word,

  1. Click on the Interrogative tab in the Knowledge Base.

  2. Click icon.

  3. Enter an Interrogative name and click ADD.

  4. You can add the synonyms of the interrogative words on this page.
    The question words point to only one Relationship that you assign.

Facts

Creating Facts

Facts can have straightforward answers that answer the context of the question. For example:

  • Where is the cafeteria? can be answered with The cafeteria is located on the third floor. It is open from 5 AM to 11 PM.

  • When is the cafeteria open? can be answered with The cafeteria is open from 5 AM to 11 PM and is located on the third floor.

You must create at least one Topic and one Relationship to create a Fact.

  1. Click on the Knowledge Base to get to the Facts listing screen.

  2. To create a new Fact, click the icon.

  3. In the New Fact screen, you will see the fields from the schema that you selected while creating the Knowledge Base. In our example, we have selected default. Therefore, we can see the multimodal content editor.

     

  4. Select the topic and relationships you want to link with the fact.

  5. Click Save.

In our example, Location and Address can be added as relationships to the same topic Cafeteria.

If you have many facts referencing the location and hours for the cafeteria, you can use tokens in the facts to save time and energy. If the information changes, you need only change the value of the token in the Content area. For more information, see How do I use tokens?

You can configure default fact content for a topic if no relationship is found.
You have to use the Any relationship from the dropdown while creating the fact content.

Questions

In Answers, you can test questions with the providers of your choice.

For example:
A fact contains the Diarrhea - Cause (Source, Root cause) Pair and the respective answer.
This question can be asked in different combinations of the Topic and Relationships such as:

  • What are the causes of diarrhea?

  • What are the root causes of diarrhea?

  • What are the sources of diarrhea?

Similar utterances can be tested whether or not the chatbot users get a reply from the chatbot.

To use questions,

  1. In the Fact listing screen, select the fact for which you would like to test the questions.

  2. In the Fact screen, select the Questions tab.

  3. Add the questions you would like to test against this Fact.

  4. You can start the test for only Google, only Alexa, or both. Select the providers where you want to test these questions.

  5. These questions are matched with the Google Dialogflow and/or Alexa utterances and the test status (success/failure) is displayed.

  6. You can choose to stop the test anytime by clicking on the Stop Test. The last test run result is shown on the Questions screen.

History

The History tab displays test results that are made to test the utterances for this fact along with the time when the utterance was tested.

Expanding a test result displays the utterances tested in that iteration and the status of the test result.

Time Range

Expanding the first row in the History tab lets you filter the test results from a custom time range.

Quick time ranges

This section contains predefined time range options such as Today, This week, Last 1 hour, Last 7 days and so on.

Custom time ranges

The Custom tab lets you customize the time range to filter the test results.

How to upgrade an existing Orbita Answers project to use Orbita NLP

All the topics and relationships will be stored as slots in Orbita. Identifying the slots from a given utterance is the key for Answers to work effectively. Though the regular NLPs identify the slots from the utterance, sometimes they fail to extract all the slots values/entities you require.

We recommend using the Orbita NLP node with the Answers Manager node, in Experience Designer, to yield better results from Answers.

In the example given below, we use the NLP node to extract the entities/lists from the utterances that fallback or trigger none intent from a regular NLP and feed them to the Answers Manager node.

Sample flow

  File Modified

File NLP-Answers.json

Dec 18, 2019 by Rajkiran Alla (Deactivated)

In the function node named Set Value, you have to add the names of the slots that you are using for this K-Graph.

You can see, from the below screenshot, that we used a K-Graph named Hospital XYZ.

In the above flow, the slot names “Hospital_XYZ_TOPICS”, “Hospital_XYZ_RELATIONSHIP”, “Hospital_XYZ_INTERROGATIVE” should be given in the function node named Set Value.

You can get the slot names used in the flow from

  1. Lists

  2. NLP node

Best Practices

Best practices and tips for authoring a knowledge base of facts to power a conversational question-answer experience using Orbita Answers.

Best practices for creating a Knowledge base

  • For each Knowledge base, three slots and one intent will be autogenerated

    • Slots

      1. <Knowledge base name>_TOPICS

      2. <Knowledge base name>_RELATIONSHIP

      3. <Knowledge base name>_INTERROGATIVE
        The below screenshot captures the autogenerated slots for the Knowledge base named FAQ.

    • Intents

      1. OA<Knowledge base name>INTENT
        The below screenshot captures the autogenerated intent for the Knowledge base named FAQ.

  • Ensure the knowledge base name is unique and doesn't match with the names from other modules such as Taxonomy.

Best practices for creating Topics

  • A topic is a word or phrase (most likely be a noun, noun phrase, proper noun, or compound noun).
    Example: Sunburn

  • A topic name doesn’t necessarily need to be a word in a dictionary. It could be a business name, brand name, product name, etc.

  • A topic name should be the singular form of the noun (e.g. Chemical Burn vs Chemical Burns). Orbita handles lexemes (burns, burning, burned, etc.)

  • There are cases where a topic might be a verb (e.g. Eat) and should be the dictionary form of the word (e.g. Eat, rather than eats, eating, ate. This form is also called the lemma form).

  • A topic can be an acronym (e.g. COPD). When specifying an acronym, use single letters with no spaces.

  • A topic may contain multiple concepts (e.g. Cancer and Hunger) but generally should focus on a single concept (e.g. Cancer, Hunger). A best practice is to think about the questions people will ask about your knowledge base – if someone is likely to ask about each concept separately, make it two topics. If they’ll ask about two concepts in the question (e.g. Will I lose my appetite during cancer treatments?), it’s okay to have a topic with two concepts.

Best practices for adding synonyms

  • A synonym is a word or phrase that means exactly or nearly the same as the topic (most likely be a noun, noun phrase, proper noun, or compound noun).

  • A synonym should be the singular form of the noun (e.g. Chemical Burn vs Chemical Burns). Orbita handles lexemes (burns, burning, burned, etc.)

  • A synonym should reflect the way people express topics conversationally and will not necessarily be a synonym that exists in a dictionary for your topic (e.g. severe allergic reaction or covered in hives may be synonyms for the topic anaphylaxis). Research ways people refer to concepts conversationally by looking at web search logs, call center logs, talking with customer support, etc.

  • A synonym should consider the question someone might ask about the topic. E.g. Assume a knowledge base of First Aid content, where a topic/relationship is Anaphylaxis/Causes. Consider the question What causes severe hives? ”severe hives” would be a synonym for Anaphylaxis

  • A synonym name doesn’t necessarily need to be a word in a dictionary. It could be a business name, brand name, product name, etc.

  • A synonym name can be an acronym. When specifying an acronym, use single letters with no spaces (e.g. COPD)

  • A good synonym reflects ways people refer to the concept conversationally.

Best practices for Facts

  • A fact should contain a topic and can have one or more relationships but the fact should not be a duplicate in terms of topic and relationships mapped to it.

How to model new content for Orbita Answers?

By constructing lists of topics and relationships, you can build a robust database of questions and answers for your patients.

Make a list of topics such as the Internet, Cafeteria, Gift shop, Influenza, Black Eye, and so on for all the subjects that are related to your situation.

Using a spreadsheet will make it easier to build and organize your database.

If people refer to any of your topics or relationships by other names, you should list them on your spreadsheet so that you can add the synonyms while adding the topics or relationships to the database.

Most topics have synonyms. For example, a cafeteria might be referred to as a cafe, restaurant, bistro, Grill, Eatery, Lunchroom, a place to eat or other synonyms.
Make your synonym list robust to ensure the best natural voice recognition and responses.

  1. Define the relationships for each topic. For example, a cafeteria may have a relationship to its Hours of operation and its Location.

  2. Define the questions that arise from a topic and relationship. For example, What are the hours of operation for the cafeteria? and Where is the cafeteria located?

  3. Define the facts that contain the answers to the topic - relationship pair. For example, the question can be When is cafe open? (Cafeteria - Hours). The answer would be The cafeteria is open from 5 AM to 11 PM.

The following image shows a spreadsheet of topics, relationships, questions, and corresponding answers. The first topic, Internet, has three relationships: Connect and Available. From these two relationships and one topic, five questions are generated with five answers.

Appendix

Knowledge Base. Complex structured information stored and used by Orbita Answers.

Topics. Topics the users might be interested in such as Cafeteria, gift shop, Internet, and so on.

Relationships. Aspects of a topic such as Hours, Location, Available and so on.

Interrogative. Relate an interrogative word to a relationship such as What is as Definition.

Facts. Relate the topics and relationships and configure the response in the Facts screen.

Related articles. Topics that are related to each other. For example, Cafeteria and Vending Machine.

Synonyms. The words that users might use in place of Topics and Relationships.

Related Articles