Digital Assistant and Mobile

Get Involved. Join the Conversation.

Topic

    Fred
    How does BotML/Dialog Flow know to ask for missing Entities...
    Topic posted October 24, 2019 by FredGreen Ribbon: 100+ Points, tagged Bots, Conversational AI 
    22 Views, 1 Comment
    Title:
    How does BotML/Dialog Flow know to ask for missing Entities values?
    Content:

    In the delivered skill example of (PizzaKing) how does the system know to ask for missing entity value?

    (https://docs.oracle.com/en/cloud/paas/digital-assistant/tutorial-skill/files/complete-dialog-flow.txt)

    So if I enter "I want a veggie pizza at 8:00pm", how does the system know that the pizza size is missing and prompt for it?

    Also how can I set the flow so that if a Cheese pizza is being ordered then don't ask for size as Cheese pizza is only available in large size?


    This is a bit different then conventional programming languages as everything there has to be programmed to be evaluated with if (variable not set)-then(prompt for value).

    Thanks

    Comment

     

    • Grant Ronald
      
       
      

      So looking at the code below - system.intent gets the user input and classifies that against known intents - once it gets the intent it then looks for the entities that are associated with that intent and if it finds them, it resolves them.

      what system.List does is that it displays a list of options - but only IF the variable "pizzaSize" null....if its not null (we call that slotting) is if a value has already been slotted as part of the System.Intent then it automatically skips that state.   It knows that the value is slotted because iResult holds all of the information from the natural language processing 

      make sense?

       

      states:
        intent:
          component: "System.Intent"
          properties:
            variable: "iResult"
            optionsPrompt: "Do you want to"      
          transitions:
            actions:
              OrderPizza: "startOrderPizza"
              CancelPizza: "cancelPizza"
              FileComplaint: "fileComplaint"
              unresolvedIntent: "startUnresolved"        
      
        startOrderPizza:
          component: "System.Output"
          properties:
            text: "ok lets get that order sorted"
            keepTurn: true
          transitions:
            next: "setPizzaSize"
        
        setPizzaSize:    
          component: "System.List"
          properties:
            options: "${pizzaSize.type.enumValues}"
            prompt: "What size of Pizza do you want?"
            variable: "pizzaSize"
            nlpResultVariable: "iResult"
          transitions: 
            next: "setPizzaTopping"