Skip to main content
QUICK REVIEW

[Paper Review] A comprehensive solution to retrieval-based chatbot construction

Kristen Moore, Shenjun Zhong|arXiv (Cornell University)|Jun 11, 2021
Topic ModelingComputer Science6 citations
TL;DR

This paper presents an end-to-end framework for building a retrieval-based chatbot from unlabelled chatlogs using self-supervised contrastive learning, a hierarchical RNN architecture with cached utterance embeddings, and a systematic method for generating canned responses and weakly labelled datasets. The self-supervised contrastive learning model outperformed binary and multi-class classification baselines, demonstrating that large-scale self-supervision can eliminate the need for costly manual annotation in real-world deployment.

ABSTRACT

In this paper we present the results of our experiments in training and deploying a self-supervised retrieval-based chatbot trained with contrastive learning for assisting customer support agents. In contrast to most existing research papers in this area where the focus is on solving just one component of a deployable chatbot, we present an end-to-end set of solutions to take the reader from an unlabelled chatlogs to a deployed chatbot. This set of solutions includes creating a self-supervised dataset and a weakly labelled dataset from chatlogs, as well as a systematic approach to selecting a fixed list of canned responses. We present a hierarchical-based RNN architecture for the response selection model, chosen for its ability to cache intermediate utterance embeddings, which helped to meet deployment inference speed requirements. We compare the performance of this architecture across 3 different learning objectives: self-supervised contrastive learning, binary classification, and multi-class classification. We find that using a self-supervised contrastive learning model outperforms training the binary and multi-class classification models on a weakly labelled dataset. Our results validate that the self-supervised contrastive learning approach can be effectively used for a real-world chatbot scenario.

Motivation & Objective

  • To develop a deployable, retrieval-based chatbot for customer support agents without requiring fully labelled datasets.
  • To address the challenge of constructing a high-quality canned response list from unstructured chatlogs using embedding-based clustering and expert refinement.
  • To create a scalable, self-supervised training pipeline that avoids manual annotation by leveraging contrastive learning on raw chatlogs.
  • To optimize model inference speed for CPU deployment through a hierarchical RNN architecture with cached utterance embeddings.
  • To compare self-supervised contrastive learning against supervised baselines (binary and multi-class classification) in a real-world customer service setting.

Proposed method

  • Constructed a self-supervised dataset by treating agent responses as positive samples and randomly sampled utterances as negatives, using skip-thought embeddings for negative sampling.
  • Built a hierarchical RNN architecture that caches intermediate utterance embeddings to accelerate inference on CPU.
  • Generated a weakly labelled dataset using both exact (regex) and fuzzy (embedding-based) matching between agent responses and canned responses.
  • Trained three response selection models: contrastive learning, binary classification, and multi-class classification, using the same canned response list and dataset splits.
  • Applied a confidence thresholding mechanism to decide when to suggest a canned response, minimizing inappropriate suggestions.
  • Optimized the model serving pipeline by leveraging cached embeddings and efficient similarity computation to meet real-time inference requirements.

Experimental results

Research questions

  • RQ1Can self-supervised contrastive learning effectively train a response retrieval model without any human-annotated labels?
  • RQ2How does the performance of a self-supervised contrastive learning model compare to supervised baselines (binary and multi-class classification) on a real-world chatlog dataset?
  • RQ3To what extent does caching utterance embeddings in a hierarchical RNN architecture improve inference speed for CPU deployment?
  • RQ4How do different negative sampling strategies affect model performance, particularly in terms of confidence and recall?
  • RQ5What are the practical trade-offs between training time, inference speed, and extensibility when adding new canned responses?

Key findings

  • The self-supervised contrastive learning model outperformed both the binary and multi-class classification models in terms of response selection accuracy and top-1 recall on the internal chatlog dataset.
  • The multi-class classification model exhibited the highest prediction confidence, making it easier to set a reliable threshold for response suggestion.
  • The hierarchical RNN architecture with cached embeddings achieved sufficient inference speed for real-time CPU deployment, outperforming more complex attention-based models in latency.
  • Random negative sampling led to suboptimal performance in both binary and contrastive learning models, suggesting that negative sampling quality significantly impacts embedding space quality.
  • The self-supervised approach enabled easy extension of the canned response list without retraining, unlike supervised baselines that require retraining after list updates.
  • The weakly labelled dataset, though imperfect, enabled effective training of supervised models and validated the feasibility of automated label generation from raw chatlogs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.