Unsupervised Extraction of Dialogue Policies from Conversations

Makesh Narsimhan Sreedhar, Traian Rebedea, Christopher Parisien

TL;DR

Building task-oriented chatbots traditionally requires conversation designers to manually map out complex dialogue flows, a process that is both time-consuming and expensive. This paper introduces a hybrid unsupervised approach that uses Large Language Models (LLMs) to translate raw chat transcripts into standardized "canonical forms" and then applies graph traversal algorithms to automatically extract clean, interpretable dialogue policies. By combining the semantic power of LLMs with the deterministic control of graph theory, the method outperforms pure LLM prompting baselines while giving developers full control over the extracted flows.

What Problem Does This Paper Address?

When developing Task-Oriented Dialogue Systems (TODS)—like virtual assistants that handle restaurant reservations or e-commerce returns—developers rely on a Dialogue Manager governed by specific dialogue policies. These policies dictate how a bot should respond given a user's intent and the current state of the conversation.

While companies often possess vast repositories of historical customer service chat logs, transforming these unstructured transcripts into structured, deployable dialogue policies remains a major bottleneck. Current automated methods either rely on rigid, pre-defined taxonomies of speech acts or use pure LLM prompting. The former lacks flexibility, while the latter operates as an opaque "black box" that is highly sensitive to input order and prone to producing inconsistent, uncontrollable results.

Methods

The authors propose a three-stage hybrid pipeline that bridges the gap between neural flexibility and symbolic control:

Figure 1: The three stages of the proposed solution for extracting dialogue flows: 1) Label user and bot turns in the conversations with canonical forms (§3.1); 2) Construct an interaction graph between user and bot canonical forms (§3.2); 3) Use graph traversal to extract dialogue flows as sequences of canonical forms (§3.3).
  1. Intent Identification & Normalization: Instead of using a closed set of expert-defined intent classes, the system uses an LLM to translate each turn of a conversation into a canonical form—a concise, descriptive phrase capturing the core intent and slots (e.g., bot ask for username, email address, and order id). To smooth out minor phrasing variations, these forms are embedded using a sentence transformer and grouped via agglomerative clustering.
Figure 2: Intent identification: (a) Extraction of canonical forms from conversation turns using an LLM, (b) Intent normalization via clustering.
  1. Graph Construction: The normalized canonical forms from the entire corpus are merged into a single directed, weighted interaction graph (a flow network). Nodes represent the canonical turns, and edge weights represent the frequency of transitions between turns across the dataset.
  2. Policy Extraction via Graph Traversal: To find the standard "happy path" of a conversation, the authors apply Fattest-Path Dijkstra, a variation of the classic algorithm that maximizes the minimum capacity (bottleneck) along a path. To handle real-world complexities, they introduce a similarity-based thresholding method to identify digressions—common alternative sub-flows that branch off the main path (e.g., a user forgetting their account number).
Figure 3: Digression from the main path in a graph.

Datasets

The methodology was evaluated on two prominent task-oriented dialogue benchmarks:

  • Schema Guided Dialogue (SGD): A large-scale dataset containing over 20,000 annotated conversations spanning 20 domains (e.g., travel arrangements, calendar management), originally generated via a state-machine policy and crowd-sourced paraphrasing.
  • Action-Based Conversations Dataset (ABCD): A corpus of over 10,000 human-to-human dialogues simulating realistic e-commerce customer support scenarios, featuring complex agent actions and guidelines.

Key Insights and Ideas

  • Graphs Beat Pure Prompting: A common instinct in the generative AI era is to throw the entire dataset into a long-context LLM prompt and ask it to summarize the dialogue policy. The authors show that this approach is brittle and noisy. A hybrid approach—using the LLM strictly for local semantic translation (canonical forms) and a graph algorithm for global structure extraction—yields vastly superior results.
  • The Power of the Bottleneck: Using Fattest-Path Dijkstra is uniquely suited for this task. Unlike algorithms that simply look for the longest path or the highest cumulative weight (which can favor long, repetitive loops), maximizing the bottleneck ensures that the extracted policy represents the most consistently traveled, high-consensus route through the conversation network.
  • Controllability for Developers: Because the final policy is derived from a graph, developers can explicitly tune parameters: they can adjust path lengths, prune low-frequency transitions, and selectively inject or remove specific digression branches based on business logic.

Key Results

The authors evaluated the extracted policies against held-out evaluation conversations using standard text generation metrics (BLEU, ROUGE-L, METEOR, BERTScore) as proxies for policy coverage, alongside human evaluation.

Quantitative comparison of dialogue flow extraction methods using automatic metrics.
  • Algorithmic Superiority: The Fattest-Width Dijkstra approach significantly outperformed other graph baselines (Longest Path, Max Weighted Sum) across both datasets, boosting BLEU scores by 8 to 12 points.
  • Outperforming GPT-4: The graph-based method surpassed direct prompting of gpt-4-turbo by +1.5 BLEU and +2 ROUGE-L on SGD, demonstrating that structured algorithms can beat state-of-the-art LLMs at structural synthesis tasks.
  • Digression Gains: Incorporating just a single common digression branch into the extracted flow improved all automatic metrics by approximately 1 point across the board.
  • Human Validation: Human annotators verified that the graph method achieves substantially higher precision (73.06% vs 68.72% for GPT-4), confirming that the graph-extracted policies are cleaner and less prone to generating irrelevant or noisy steps.

Limitations and Future Work

While highly effective as a productivity tool for conversation designers, the authors note several limitations:

  • Human Curation Required: The extracted policies are not flawless out-of-the-box and still require inspection and refinement by a domain expert before production deployment.
  • Sensitivity to Upstream Errors: The quality of the final graph heavily depends on the initial intent identification and clustering stages. Errors or biases introduced by the p-tuned LLM or the embedding model can propagate downstream.
  • Security Risks: If the source conversational corpus contains malicious or highly irrelevant interactions, these could theoretically be captured as canonical forms, necessitating careful data filtering.

Future work will focus on exploring alternative clustering techniques, testing different embedding models, and evaluating the pipeline across a broader variety of conversational datasets.

Summary updated

BibTeX
@inproceedings{sreedhar2024unsupervised,
  author = {Makesh Narsimhan Sreedhar and Traian Rebedea and Christopher Parisien},
  title = {{Unsupervised Extraction of Dialogue Policies from Conversations}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.1060},
}
Figure