Fast and Light-Weight Answer Text Retrieval in Dialogue Systems

Hui Wan, Siva Sankalp Patel, J. William Murdock, Saloni Potdar, Sachindra Joshi · DOI

Abstract

Modern dialogue systems face a significant challenge in balancing retrieval accuracy with computational efficiency. While neural dense retrievers offer superior performance over traditional keyword-based methods, their high latency and memory requirements often make them impractical for large-scale, multi-tenant industrial deployments. This paper presents a streamlined approach to neural text retrieval that utilizes distilled "tiny" encoders and an asynchronous iterative learning strategy. Our findings demonstrate that this approach achieves state-of-the-art accuracy with a 6x reduction in latency and a significant decrease in memory footprint, making high-performance retrieval viable on standard, inexpensive hardware.

Introduction

Industrial dialogue systems, such as IBM Watson Assistant or Amazon Lex, have traditionally relied on intent detection—a process of matching user queries to pre-defined categories with scripted responses. While effective, this method is labor-intensive to maintain and lacks flexibility. Text retrieval offers a more dynamic alternative by searching a corpus to find the best answer on the fly.

However, state-of-the-art neural retrievers like Dense Passage Retrieval (DPR) and ColBERT are computationally "heavy," often requiring hundreds of millions of parameters and expensive GPU support. For cloud providers hosting thousands of custom chatbots, deploying such models for every client is economically unfeasible. This research addresses the need for "industrial-strength" neural models that are fast, cost-effective, and capable of performing well even with limited training data.

Methodology

To bridge the gap between performance and efficiency, we propose a multi-pronged strategy to optimize the retrieval pipeline:

1. Distilled Encoders

We replace full-sized BERT models with TinyBERT (4 layers, 312 dimensions). This reduction in layers and dimensionality drastically lowers the parameter count and the time required to encode user queries without a proportional loss in semantic understanding.

2. Asynchronous Iterative Learning

Effective training of dense retrievers requires "hard negatives"—passages that are semantically similar to the query but do not contain the correct answer. We implemented a loop where a Sampler module identifies these examples using the current model state, while a Trainer module uses them to refine the model. By running these processes in parallel (asynchronous learning), we eliminate the bottleneck of the Trainer waiting for the Sampler, significantly reducing total training time.

3. Dimensionality and Query Optimization

We observed that most dialogue queries are inherently short. By capping the maximum query length at 32 tokens and reducing vector dimensions, we achieved an 80% increase in processing speed with negligible impact on accuracy.

4. Hybrid Ensembling

To ensure robustness, we combined the semantic strengths of the tiny neural model with the keyword-matching capabilities of traditional BM25. This ensemble approach ensures that the system can handle both nuanced semantic queries and exact term matches.

Experimental Setup

The proposed methods were evaluated using two real-world industrial datasets:

  • HRFAQ: An HR policy FAQ bot containing 186 documents and approximately 5,400 training queries.
  • MEDFAQ: A medical group portal FAQ bot with 87 documents and 862 training queries.

Models were initially pre-trained on the Natural Questions (NQ) dataset before being fine-tuned on these specific, small-data FAQ tasks.

Results and Discussion

Latency and Footprint

The proposed ColBERT-tiny model demonstrated remarkable efficiency gains. It achieved a latency of 10ms on a standard CPU, compared to 59ms for the full ColBERT model and 267ms for DPR. Furthermore, the model's memory footprint was reduced from 419MB to just 55MB, allowing for high-density deployment on shared infrastructure.

Retrieval Accuracy

In zero-shot settings on the HRFAQ dataset, the ensemble of BM25 and ColBERT-tiny achieved a Match@1 score of 39.0. This outperformed both standalone BM25 (29.2) and the full-sized DPR model (29.9), suggesting that for short-query dialogue systems, massive parameter counts may lead to overfitting or unnecessary overhead.

Training Efficiency

The asynchronous iterative approach reached peak accuracy in approximately 78 seconds (for 1 example/doc), whereas traditional "all-negative" training methods required 475 seconds. This represents a significant improvement in the speed at which models can be updated or customized for new clients.

Conclusion

This research demonstrates that it is possible to deploy high-performing neural retrieval systems on inexpensive hardware by focusing on model distillation and training parallelism. While the system showed some performance gaps in highly specialized domains like medicine (MEDFAQ), future work in domain-specific distillation and advanced quantization promises to further close this gap. These optimizations pave the way for more responsive, intelligent, and cost-effective dialogue systems in the enterprise sector.

Summary updated

BibTeX
@inproceedings{wan2022fast,
  author = {Hui Wan and Siva Sankalp Patel and J. William Murdock and Saloni Potdar and Sachindra Joshi},
  title = {{Fast and Light-Weight Answer Text Retrieval in Dialogue Systems}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-industry.37},
}
Figure