Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Question

Hierarchy

  • Question

Properties

id

id: string

Identifier

prompt

prompt: StringOrList | function

Rendered form of the question for use in prompts.

  • This prompt should be a complete sentence with leading uppercase and trailing question-mark.

promptShortForm

promptShortForm: string | function

Short-form rendering of the question for use in prompts.

This prompt should be a phrase without leading uppercase and no punctuation.

When rendering ValueSetAct, the short form of the question is used construct a prompt like "OK, yes for cats."

Example:

 questionPrompt: "Do you like cats?"
 questionPromptShortForm: "cats"

targets

targets: string[]

Target-slot values associated with this question.

Example:

Assume the user says "yes I like cats", and appropriate action and target are configured in the interaction model

'target':
{
 id: 'cat',
 name: {
   value: 'cats'
   synonyms: ['kitty', 'kitties']
 }
}

'choice':
{
 id: 'like',
 name: {
   value: 'like'
   synonyms: ['like', 'I like', 'adore', 'I adore', 'fond', 'fond of', 'I\'m fond of']
 }
}

Regardless of what the active question is, a user input of 'I like cats' will be parsed by NLU as a ControlIntent with slot values

value: 'like'
target: 'cats'

which will be interpreted by the Questionnaire Control as an answer.

visualLabel

visualLabel: string | function

Rendered form of the question for use on screen.