Skip to content

Goals

A goal declares an action for the system to perform or a question for it to resolve. Goals are the units that plans fulfill.

<goal type="perform" action="book_room">
  <plan>
    <findout type="wh_question" predicate="room_date"/>
    <invoke_service_action name="BookRoom"/>
  </plan>
</goal>
Attribute Use
type Required by the Tala compiler: perform or resolve.
action Ontology action for a perform goal.
question_type Resolve-goal question type; defaults to wh_question.
predicate Predicate used by a predicate-backed resolve question.
accommodate_without_feedback Suppresses accommodation feedback.
reraise_on_resume Controls feedback when a goal resumes.
restart_on_completion Restarts the goal after completion.
max_answers Maximum answers returned for a user question.
alternatives_predicate Distinguishes alternatives when multiple answers are allowed.

A resolve yes/no goal supplies its proposition as a child:

<goal type="resolve" question_type="yn_question">
  <proposition predicate="need_visa" value="true"/>
</goal>

Other children include plan, postplan, downdate_condition, preferred, and superaction.

  • <preferred/> marks a goal as preferred unconditionally. A preferred proposition makes it preferred when that fact is present.
  • <superaction name="…"/> associates the goal's action with a broader ontology action that it can satisfy.
  • postcond remains in the XSD, but the Tala 31.0.1 compiler does not process it. Use explicit downdate_condition children instead.

For example, mark booking a room as a preferred way to arrange travel when the user has selected business class:

<goal type="perform" action="book_room">
  <preferred>
    <proposition predicate="travel_mode" value="business_class"/>
  </preferred>
  <superaction name="arrange_travel"/>
  <plan><invoke_service_action name="BookRoom"/></plan>
</goal>

See Plans and postplans, Plan items, and Downdate conditions.