DFLOW: Diverse Dialogue Flow Simulation with Large Language Models

Wanyu Du, Song Feng, James Gung, Lijia Sun, Yi Zhang, Saab Mansour, Yanjun Qi

TL;DR

This paper introduces DFLOW, a novel framework for generating diverse, task-oriented dialogues by simulating structured "dialogue flows." By leveraging LLMs to create decision-tree-based task plans, DFLOW generates a rich dataset that significantly improves the performance of smaller language models on next-action prediction tasks, even outperforming larger models like GPT-4.

What Problem Does This Paper Address?

Developing effective task-oriented dialogue agents relies heavily on large, diverse datasets. While existing methods often focus on linguistic or topic diversity, they largely neglect the crucial aspect of dialogue flow diversity – the variety of logical paths a conversation can take to achieve a task. Manually creating these diverse flows is challenging and time-consuming. Consequently, current datasets often suffer from sparse flow annotations and lack efficient, automated methods for generating them, hindering the development of robust dialogue agents that can handle complex, multi-step interactions.

Methods

The DFLOW framework tackles this by employing a three-step LLM-driven simulation process:

  1. Task Plan Generation: An LLM planner is prompted to generate a decision tree-structured task plan based on a given task instruction. This plan outlines multiple possible trajectories for completing the task.
  2. Dialogue Flow Sampling: Depth-first search is applied to the task plan to extract all valid trajectories, each representing a "dialogue flow." This step also incorporates error-handling flows (out-of-scope requests, early conversation stops) to enhance robustness.
  3. Flow Controlled Dialogue Generation: An LLM synthesizer uses the sampled dialogue flows to generate multi-turn dialogues. Each turn in the dialogue is guided by a step in the corresponding dialogue flow, ensuring task logic consistency. An automatic filter removes low-quality dialogues.

Datasets

The paper introduces the DFLOW dataset, a synthetic dataset comprising 3,886 dialogue flows across 15 different domains, generated using multiple LLMs (GPT-3.5-turbo, Falcon-40B-instruct, MPT-30B-chat, Mistral-8x7B-instruct). This dataset is designed to be more diverse and include error-handling flows compared to existing datasets like ABCD (Chen et al., 2021).

Key Insights and Ideas

  • Dialogue Flow Diversity is Key: The paper strongly emphasizes that focusing on the diversity of task logic at the dialogue level, rather than just utterance-level diversity, is critical for building more capable dialogue agents.
  • LLMs as Generative Engines for Dialogue Logic: By framing task plan generation as a decision tree problem and then using these plans to guide dialogue synthesis, LLMs can be effectively leveraged to create structured and logically coherent dialogues.
  • Synthetic Data Can Outperform Human-Curated Data: The DFLOW dataset, entirely generated by LLMs, demonstrates comparable quality to human-annotated datasets and, when used for fine-tuning, enables smaller models to outperform larger ones on specific tasks.
  • Error Handling Flows are Crucial: The inclusion of out-of-scope and early-stop conversation flows makes the generated dialogues more realistic and the resulting models more robust to unexpected user behavior.

Key Results

  • The DFLOW dataset contains 3,886 dialogue flows with an average of 7.76 steps and 3,886 dialogues with an average of 8.83 turns.
  • Intrinsic evaluation shows high quality in plan generation, plan coherence, flow coherence, and dialogue faithfulness, comparable to human-annotated datasets.
  • Extrinsic evaluation demonstrates that 7B language models fine-tuned on the DFLOW dataset significantly outperform strong baselines, including GPT-4, on the next action prediction task. For instance, fine-tuned Mistral-7B-instruct-v0.2 achieved a higher joint accuracy than 3-shot GPT-4 on both DFLOW and ABCD test sets.
  • An ablation study showed a significant performance drop when dialogue flows were excluded from the training data, highlighting their importance.

Limitations and Future Work

  • Domain Coverage: The 15 chosen domains may not fully represent the vast spectrum of real-world applications.
  • LLM Dependency: The quality and diversity of generated dialogues are inherently tied to the capabilities and potential biases of the LLMs used for generation.
  • Computational Resources: Some LLMs require substantial GPU resources, suggesting a need for more memory-efficient inference methods.
  • Text-Only Focus: The current framework generates text-based dialogues. Future work could explore incorporating other data modalities like images, graphs, and tabular data for richer task plan generation and dialogue simulation.

Summary updated

BibTeX
@inproceedings{du2025dflow,
  author = {Wanyu Du and Song Feng and James Gung and Lijia Sun and Yi Zhang and Saab Mansour and Yanjun Qi},
  title = {{DFLOW: Diverse Dialogue Flow Simulation with Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure