JSON DDD format¶
The JSON format mirrors the XML Dialogue Domain Description (DDD) language. The same domain concepts and plan items are available; JSON uses nested objects instead of XML attributes and child elements.
Top-level structure¶
{
"schema_version": "1.0",
"ontology": { "name": "MyOntology", "sorts": [], "predicates": [], "individuals": [], "actions": [] },
"domain": { "name": "MyDomain", "plans": [], "parameters": [], "validators": [], "queries": [], "dependencies": {} },
"service_interface": { "actions": [], "queries": [], "validators": [] }
}
Question objects¶
WH question¶
{ "wh": { "predicate": "destination" } }
Yes/No question¶
{ "yn": { "proposition": { "predicate": "need_visa" } } }
Alternative question¶
{
"alt": [
{ "resolve": { "question": { "wh": { "predicate": "monthly_payment" } } } },
{ "perform": { "action": "book_train_ticket" } }
]
}
Knowledge precondition question (KPQ)¶
{
"kpq": {
"question": { "wh": { "predicate": "destination" } }
}
}
Plan items (selected)¶
Findout with fact-backed alternatives¶
{
"findout": {
"question": { "wh": { "predicate": "filthy_animal" } },
"alts_predicate": "available_animal"
}
}
Bind with yes/no answer binding¶
{
"bind": {
"question": {
"yn": { "proposition": { "predicate": "filthy_animal", "value": "dog" } }
},
"allow_binding_yn_answers": true
}
}
Invoke service query with result bounds¶
{
"invoke_service_query": {
"question": { "wh": { "predicate": "available_animal" } },
"min_results": 2,
"max_results": 2
}
}
Raise and assume-issue with KPQ¶
{ "raise": { "question": { "kpq": { "question": { "wh": { "predicate": "destination" } } } } } }
{ "assume_issue": { "question": { "kpq": { "question": { "wh": { "predicate": "destination" } } } } } }
Deprecated: background parameters¶
The background parameter is no longer supported by current TDM/Tala runtimes. JSON domains should avoid background even if older docs mention it.