Simulating Task-Oriented Dialogues with State Transition Graphs and Large Language Models

Chris Samarinas, Pracha Promthaw, Atharva Nijasure, Hansi Zeng, Julian Killingback, Hamed ZamaniarXiv 2024 · DOI

Abstract

This paper explores SynTOD, a new synthetic data generation approach for developing end-to-end Task-Oriented Dialogue (TOD) Systems capable of handling complex tasks such as intent classification, slot filling, conversational question-answering, and retrieval-augmented response generation, without relying on crowdsourcing or real-world data. SynTOD utilizes a state transition graph to define the desired behavior of a TOD system and generates diverse, structured conversations through random walks and response simulation using large language models (LLMs). In our experiments, using graph-guided response simulations leads to significant improvements in intent classification, slot filling and response relevance compared to naive single-prompt simulated conversations. We also investigate the end-to-end TOD effectiveness of different base and instruction-tuned LLMs, with and without the constructed synthetic conversations. Finally, we explore how various LLMs can evaluate responses in a TOD system and how well they are correlated with human judgments. Our findings pave the path towards quick development and evaluation of domain-specific TOD systems. We release our datasets, models, and code for research purposes.

Introduction

Building effective Task-Oriented Dialogue (TOD) systems—such as recipe assistants or e-commerce bots—requires massive amounts of high-quality, labeled training data. Traditionally, this data is collected via expensive crowdsourcing or by logging real-world interactions, which is slow and often fails to cover "edge cases." While Large Language Models (LLMs) can generate synthetic data, a "naive" approach (using a single prompt to "simulate a conversation") often results in repetitive, shallow dialogues that lack the structural complexity needed for robust system training. This paper introduces SynTOD, a framework designed to bridge this gap by generating structured, diverse, and grounded synthetic dialogues without human-in-the-loop collection.

Methodology: The SynTOD Framework

The core of the approach is the SynTOD framework, which moves away from single-prompt generation toward a multi-step, graph-guided process.

State Transition Graph (STG)

Developers define a graph where nodes represent system states (e.g., "showing results") and edges represent user intents (e.g., "select item"). This graph serves as a blueprint for the desired conversational behavior.

Path Generation and Response Simulation

The system performs random walks on the STG to create diverse conversation outlines. For each step in the walk, an LLM (such as GPT-4) is prompted to generate a specific turn. Crucially, the system uses distinct prompts for the "user" and the "system" to maintain persona consistency and prevent the model from collapsing into a single voice.

Retrieval-Augmented Generation (RAG)

To ensure the dialogues are grounded in reality, the simulation includes a retriever that pulls actual items (e.g., recipes or products) from a corpus. This grounds the conversation in facts and allows for the simulation of complex queries like attribute-related questions or product comparisons.

Overview of the SynTOD conversation simulation framework

Experimental Setup

The authors generated two new synthetic datasets using SynTOD:

  • Cooking Assistance: 2,000 training conversations based on 4,000 recipes from the Tasty dataset.
  • E-commerce Assistance: 2,000 training conversations based on 4,000 products from MAVE and Amazon reviews.

These datasets are significantly richer than existing benchmarks like MultiWOZ, covering features like attribute-related questions and result summarization.

Results and Discussion

The benefits of using a state transition graph are stark across all metrics. The STG prevents "mode collapse," where LLMs repeatedly generate the most likely intents. Instead, the graph forces the model to explore rare states and edge cases, ensuring a balanced training set.

Performance Gains

As shown in the table below, intent classification accuracy jumped from ~76% to 95.8% in the cooking domain and from ~67% to 82.9% in e-commerce when using graph-guided data. Slot filling performance also saw dramatic improvements, with Slot F1 scores nearly doubling in the e-commerce domain (from 0.28 to 0.56).

Performance comparison of models trained with and without the state transition graph

Data Efficiency and Evaluation

The models converged quickly; in the recipe domain, using just ~200 graph-guided examples (roughly 12% of the data) was sufficient for high performance, suggesting that the quality of structure is more important than the quantity of raw text. Additionally, the study explored LLMs as evaluators, finding that larger models like GPT-4 show a 64% correlation with human judgments, supporting the potential for fully automated development pipelines.

Conclusion

SynTOD demonstrates that guiding LLMs with state transition graphs significantly enhances the quality and diversity of synthetic TOD data. While challenges remain in ensuring perfect intent consistency and improving automated evaluation metrics, this approach paves the way for rapid, domain-specific TOD system development without the need for manual data collection.

Summary updated

BibTeX
@misc{samarinas2024simulating,
  author = {Chris Samarinas and Pracha Promthaw and Atharva Nijasure and Hansi Zeng and Julian Killingback and Hamed Zamani},
  title = {{Simulating Task-Oriented Dialogues with State Transition Graphs and Large Language Models}},
  year = {2024},
  eprint = {2404.14772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.14772},
}
Figure