The
settings, initial state and parameters can be left out of the domain
specification if empty. The number of rule-structured models is
arbitrary.

For more complex domains, the domain specification can be split in several files through the import marker:

<importhref="path to another file"/>

Numerous examples of dialogue domains can be found in the directory domains and test/domains of the base directory.

XML format for <domain>:

Content

XML Type

Cardinality

Description

<initialstate>

Element

0-1

Initial state for the dialogue domain

<parameters>

Element

0-1

Prior parameter distributions

<import href="..."/>

Element

0-n

Import of other XML files

<model trigger="...">

Element

0-n

Dialogue model

<settings>

Element

0-1

Domain-specific system settings

2. Initial state

The initial state for the domain defines the variables included in the
dialogue state upon starting the dialogue system. Each variable has a
particular identifier and a probability distribution.

Variables with a discrete range of values are defined as categorical tables:

<variableid="variable_id"><valueprob="probability for first value">first value</value><valueprob="probability for second value">second value</value> ...<valueprob="probability for the nth value">nth value</value></variable>

Probability
values must be comprised between 0 and 1. If the total probability
amounts to less than 1, OpenDial automatically adds an empty value (None) for the remaining probability mass. If the prob attribute is omitted, the value is assumed to have a probability 1.

Probability distributions can also be defined for a continuous range, using the XML element <distrib type="..."> (see below).

XML format for <initialstate>:

Content

XML Type

Cardinality

Description

<variable id="...">

Element

0-n

State variable

XML format for <variable> in <initialstate>:

Content

XML Type

Cardinality

Description

id

Attribute

1

Variable label

<value prob="p">

Element

1-n

Possible value for the variable with probability p. If the attribute prob is omitted, the probability is assumed to be 1.

or<distrib type="...">

Element

0-1

cf. below

IMPORTANT NOTE:
Generally speaking, variable can have arbitrary identifiers, but a
couple of special characters should be avoided. Variables should not include primes ('), curly brackets ({,}) or square brackets ([,]), as these are used internally in OpenDial. Furthermore, variables ending with ^p, ^t and ^o have a special function: ^p denotes predictive variables, ^t denotes temporary variables that are deleted immediately after each update loop, and ^o denotes observation variables for user simulators.

Some variable values also have a special meaning in OpenDial: "None" denotes an "empty" value, and values between square brackets [] denote sets of elements.

3. Parameters

Probabilistic
rules can include parameters whose values is initially unknown and must
be estimated from data. As OpenDial adopts a Bayesian learning
approach, each parameter must be associated with an prior distribution
over its (usually continuous) range of possible values.

XML format for <parameters>:

Content

XML Type

Cardinality

Description

<variable id="...">

Element

0-n

State variable

Parameters are defined in exactly the same way as state variables. Their distributions are defined in a parametric manner:

Uniform distributions are defined with two parameters min and max. The distribution U(-1,3) is thus encoded as:

Dirichlet distributions.
A Dirichlet distribution is a multivariate continuous distribution.
It is often employed to describe the prior parameter distribution of
categorical/multinomial distributions. Dirichlet distributions are
defined by a list of alpha values (one for each dimension). For instance, the 3-dimensional distribution Dirichlet(1,1,2) is expressed as:

4. Models

A
dialogue model is essentially defined as a set of probabilistic rules
combined with one or more "trigger variables" that defines when the
rules are to be applied:

<modeltrigger="trigger variable(s)">

<ruleid="rule 1"> ...</rule>

<ruleid="rule 2"> ...</rule>

...

<ruleid="rule n"> ...</rule>

</model>

The
trigger variables must be separated by a comma. The rules can either
encode probability or utility rules, as we explain below.

XML format for <model>:

Content

XML Type

Cardinality

Description

id

Attribute

0-1

(optional) name for the model

trigger

Attribute

1

Comma-separated list of trigger variables

<rule>

Element

1-n

Probability or utility rule

Probability rules

Probability
rules express how a subset of state variables (the "input variables" of
the rule) affect the probability distribution over some other state
variables (the "output variables"). The output variables may either
already exist in the dialogue state (in which case their content is
erased) or represent new variables to include in the dialogue state.

Rule r1
simply indicates that the probability of a fire if there is no rain and
a hot weather is 0.03, while this probability is 0.01 in other cases.

In
some circumstances, one may want to enforce a particular dominance
hierarchy among the rules (in order to ensure that some rules have
priority over others if they are triggered simultaneously). This can be
specified using the priority attribute, taking an integer value (where 1 indicates the highest priority).

XML format for <rule>:

Content

XML Type

Cardinality

Description

id

Attribute

0-1

(optional) name for the rule

priority

Attribute

0-1

(optional) integer indicated the priority level of the rule (where 1 is highest)

Effects

Each case
contains one or more (alternative) effects. Each effect has a
particular probability of occurrence. This probability can be specified
by hand, as in the example above:

<effectprob="0.03"><setvar="Fire"value="true"/></effect>

When the effect does not specify any prob
attribute, the effect is assumed to have a probability 1. When the
total probability for all effects is lower than 1, an empty effect is
implicitly assumed to cover the remaining probability mass.

The probability of a particular effect can also be a parameter. In this case, each case with n alternative effects is associated with a nth
dimensional Dirichlet distribution that express the possible values for
the effect probabilities. For instance, the effect probabilities in
rule r1 can be rewritten as:

Note the brackets after the parameter name to refer to a specific dimension of the multivariate Dirichlet.

XML format for <effect> (for probability rules):

Content

XML Type

Cardinality

Description

prob

Attribute

0-1

Probability for the effect (either fixed or parameter). Default value is 1.

<set ...>

Element

1-n

Basic effect

Inside each effect is a list of basic assignment of values to variables. Each assignment is defined by a <set.../> markup with two attributes: var and value.

XML format for <set .../> (for probability rules):

Content

XML Type

Cardinality

Description

var

Attribute

1

Variable label

value

Attribute

1

Variable value

Utility rules

Rule
can also be employed to express utility models. A utility rule defines
the utility of particular actions (from the system perspective)
depending on particular state variables. The general skeleton remains
similar to probability rules, with the difference that effects are this
time associated to particular utilities instead of probabilities. Here
is an example of utility rule (rule r2 of Lison (2014), p. 69):

Rule r2 indicates that the utility of the drop-water action is +5 is there is a fire (and -1 otherwise), and that the utility of wait is -5 is there is a fire and 0 otherwise.

Conditions are defined similarly to probability rules. Effects also have a similar structure, with one exception: the prob attribute is replaced by util. The variables specified in the effect (Tanker in the above example) are action variables.

As for probability rules, utilities can be fixed or correspond to parameters to estimate. For instance, rule r2 can include four parameters that denote the respective utility of the system actions depending on the situation:

[1]
Multivariate Gaussian distributions can also be defined. In this case,
the scalar values for the mean and variance are replaced by vector
values in the form <mean>[v1,v2,..,vn]</mean>.
Multivariate Gaussian distributions support for the moment only
distributions with a diagonal covariance (i.e. independent Gaussians).