Abstract
Building intelligent virtual assistants remains a significant challenge due to the complexity of natural language and the high cost of manual data annotation. This paper introduces ThingTalk, a strongly-typed, executable formal language designed to represent task-oriented dialogues as programs. By shifting from traditional "slot-filling" models to a contextual semantic parsing approach, ThingTalk allows agents to handle complex, multi-turn requests across multiple domains. Leveraging the Genie framework for data synthesis, the system achieves state-of-the-art performance on the MultiWOZ benchmark using only a fraction of the manual training data typically required.
Introduction
Traditional conversational agents, such as Siri or Alexa, primarily rely on intent classification and slot filling. While effective for simple tasks, these methods struggle with multi-domain requests, complex logic, or scenarios where users change their minds mid-conversation. Furthermore, training these systems is notoriously data-intensive, requiring thousands of hours of human-labeled dialogues.
Existing formal representations often fail to strike a balance between expressivity and readability. The authors propose ThingTalk to bridge this gap, providing a language that is powerful enough for real-world complexity, executable by machines, and efficient for neural model training.
The ThingTalk Language and Framework
ThingTalk is designed around four core principles to ensure it is both robust and scalable:
- Executable Statements: User requests are translated into formal programs (e.g.,
query => action). This ensures the agent produces a verifiable execution plan rather than just a set of labels. - Strong Typing and Standardization: By adopting a standard type system (compatible with Wikidata and Schema.org), ThingTalk enables cross-vendor composition. For example, a user can find a restaurant on Yelp and share its details via a messaging app seamlessly.
- Contextual Semantic Parsing (CSP): Rather than processing sentences in isolation, the system utilizes a neural sequence-to-sequence model that tracks the dialogue state. This allows the agent to maintain context over multiple turns.
- The Genie Framework: To overcome data scarcity, the authors employ a "synthesis-first" approach. A grammar-based simulator generates millions of synthetic dialogues, which are then paraphrased by neural models to capture natural linguistic variety.
Contextual Semantic Parsing and State Management
A key innovation in ThingTalk is its approach to dialogue state. Unlike models that feed the entire conversation history into a parser—which can lead to performance degradation as history grows—ThingTalk summarizes the conversation into a compact, executable state. This canonicalization ensures that different ways of expressing the same intent map to a single formal representation, reducing the noise the neural model must navigate.
As shown in the dialogue flow, the CSP model takes the current user utterance and the previous formal dialogue state to generate a new state. This state is then passed to an agent that executes the query and generates both a formal output and a natural language response.
Experimental Evaluation
The system was evaluated primarily on the MultiWOZ (2.1 & 3.0) benchmarks. To facilitate this, the authors re-annotated the MultiWOZ 2.1 test set with precise ThingTalk labels, creating MultiWOZ 3.0.
Key Results
- Accuracy: ThingTalk achieved a 79% turn-by-turn exact match accuracy on MultiWOZ, setting a new state of the art.
- Slot Filling: In identifying specific details (e.g., time, location), the model reached 87% accuracy, a significant improvement over the previous best of 61%.
- Sample Efficiency: Most notably, the system outperformed models trained on 50 times more manual data by leveraging synthetic data generation.
- Expressivity: The language successfully modeled 98% of utterances in the test set, demonstrating its readiness for diverse real-world applications.
Discussion and Limitations
While ThingTalk represents a major step forward, some challenges remain. Approximately 2% of utterances in the benchmark fall outside the current formal grammar or contain human errors that the system cannot yet resolve. Additionally, the system's performance is tied to the quality of the natural language templates used in the Genie framework; if user speech patterns diverge significantly from these templates, the model's accuracy may decrease.
Future work will focus on expanding ThingTalk to support more complex "trigger-action" programming and refining the automated paraphrasing pipeline to further enhance linguistic diversity and robustness.
Summary updated