Skip to content

Bind

Definition

<bind question_type="type" predicate="p">

The element defines a question that can be answered by the user, but will not be asked by the system.

Attribute Type Description
question_type string Optional. Defaults to wh_question, but can be one of goal, wh_question, alt_question, yn_question or kpq.
predicate string Optional. Required if question_type is wh_question or yn_question.
allow_binding_yn_answers boolean Optional. Only valid when question_type is yn_question. When true, yes/no answers can bind to this question. Using it on other question types raises a compile/parse error.

Parents

Children

  • <alt>
  • <embedded_question/> when question_type="kpq".

JSON format

{
  "bind": {
    "question": {
      "yn": { "proposition": { "predicate": "filthy_animal", "value": "dog" } }
    },
    "allow_binding_yn_answers": true
  }
}

Behaviour

The element defines a question that can be answered by the user, but will not be asked by the system, thereby `binding' that answer to the goal in question. This makes it possible to take into consideration optional and unrequested parameters.

This is only valid as long as the plan element is still in the plan. When executed, the plan element is removed from the plan. This means that the element should always be placed last in the plan, unless the developer wishes to remove the bind element during execution of the plan.

Examples

Binding a WH question about price range (e.g. in a travel booking application)

  <bind type="wh_question" predicate="price-class"/>