Efficient Retrieval Augmented Generation from Unstructured Knowledge for Task-Oriented Dialog

David Thulke, Nico Daheim, Christian Dugast, Hermann NeyarXiv 2021

Abstract

This paper summarizes a contribution to the ninth Dialog System Technology Challenge (DSTC 9), Track 1: "Beyond Domain APIs: Task-oriented Conversational Modeling with Unstructured Knowledge Access." The objective is to generate responses in task-oriented dialogs that require information from unstructured documents. The task is divided into three subtasks: detection, selection, and generation. To achieve computational efficiency, the selection problem is formulated as a hierarchical classification process. Alternatively, Siamese sequence embedding models, termed Dense Knowledge Retrieval (DKR), are employed to retrieve relevant documents, reducing computation time by over 100x compared to the hierarchical model. Finally, Retrieval Augmented Generation (RAG) is used to generate responses based on multiple selected snippets, demonstrating its utility in fine-tuning trained embeddings.

Introduction

Most task-oriented dialog systems rely on structured APIs to fetch data. While effective for standard requests, these systems often fail when users ask questions requiring information found in unstructured text, such as FAQs or reviews. The DSTC 9 challenge focuses on this gap. The baseline approach for selecting relevant knowledge snippets is computationally heavy, treating every snippet as a binary classification problem. This paper proposes more efficient methods—Hierarchical Selection and Dense Knowledge Retrieval—to make such systems viable for real-time use.

Methodology

The problem is decomposed into three subtasks:

Detection

The system first detects whether a user turn requires external knowledge access.

Selection

Two primary innovations are introduced for the selection phase:

  1. Hierarchical Selection: A "coarse-to-fine" approach that first identifies the relevant Domain, then the Entity, and finally the specific Snippet. This reduces search complexity from $O(N)$ to approximately $O(\log N)$.
  2. Dense Knowledge Retrieval (DKR): Using Siamese networks (RoBERTa), both dialog context and knowledge snippets are mapped into a shared vector space. Retrieval is performed via fast nearest-neighbor search, utilizing pre-computed document embeddings.

Generation

The system employs Retrieval Augmented Generation (RAG). Instead of using only the top-ranked snippet, RAG considers the top $n$ snippets. This allows the BART-based generator to aggregate information and provides robustness against minor selection errors.

Key Results

Accuracy and Performance

The Hierarchical Selection model achieved state-of-the-art results, reaching an R@1 of 96.1% on validation data and 89.9% on the test set, significantly outperforming the challenge baseline.

Performance metrics on the DSTC 9 test set across different models.

Computational Efficiency

A major focus was reducing latency. While the baseline required over 111 seconds per turn, the Hierarchical model reduced this to 4.6 seconds. The DKR model achieved a runtime of just 0.04 seconds per turn, representing a speedup of over 2,500x compared to the baseline.

Runtime comparison for detection, selection, and generation tasks, highlighting the efficiency of DKR.

Insights and Discussion

  • Context Importance: Increasing the dialog context window from 128 to 384 tokens resulted in a 10.5% absolute improvement in retrieval accuracy (R@1), highlighting that user intent often spans multiple turns.
  • Metadata Utilization: Prepending domain names to knowledge snippets significantly reduced confusion between similar documents in different domains.
  • RAG as an Error Corrector: RAG was qualitatively shown to "fix" selection errors by synthesizing correct answers even when the top-ranked snippet was slightly off, provided the correct information was in the top $n$ results.
  • Efficiency-Accuracy Trade-off: DKR is thousands of times faster than the baseline but incurs a 5-6% drop in R@1 compared to the Hierarchical method.

Conclusion

The proposed methods demonstrate that task-oriented dialog systems can effectively leverage unstructured knowledge with high efficiency. While Hierarchical Selection offers superior accuracy, Dense Knowledge Retrieval provides the extreme low latency necessary for production environments. Future work includes improving performance on spoken transcripts and better integrating structured and unstructured knowledge sources.

Summary updated

BibTeX
@misc{thulke2021efficient,
  author = {David Thulke and Nico Daheim and Christian Dugast and Hermann Ney},
  title = {{Efficient Retrieval Augmented Generation from Unstructured Knowledge for Task-Oriented Dialog}},
  year = {2021},
  eprint = {2102.04643},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.04643},
}
Figure