CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning

Siddharth Verma, Justin Fu, Sherry Yang, Sergey Levine

Abstract

Task-oriented dialogue systems require a delicate balance between linguistic fluency and strategic decision-making. While modern Large Language Models (LLMs) excel at generating human-like text, they often lack the goal-directed behavior necessary for complex tasks such as negotiation. This paper introduces CHAI (CHatbot AI), a framework that integrates the linguistic capabilities of pre-trained language models with the strategic optimization of offline reinforcement learning (RL). By utilizing a language model to propose candidate responses and a learned Q-function to select the most effective action, CHAI creates agents that are both more coherent and more successful at achieving specific objectives. Evaluations on negotiation datasets demonstrate that CHAI outperforms both supervised learning baselines and traditional reinforcement learning methods in human-likeness and task success.

Introduction

Building a chatbot that sounds human is a solved problem for many domains, thanks to the advent of Large Language Models. However, building a chatbot that is both human-sounding and capable of successfully navigating a strategic negotiation—such as convincing a buyer to accept a specific price—remains a significant challenge. Most existing agents fall into two categories: Supervised Learning (SL) agents, which are fluent but lack long-term strategic direction, and Reinforcement Learning (RL) agents, which are goal-oriented but often require expensive online interaction and can devolve into generating unintelligible language to maximize rewards.

CHAI addresses these limitations by leveraging offline reinforcement learning on static, human-to-human datasets. This approach allows the agent to learn from existing conversational data without the need for a brittle simulator or costly human-in-the-loop training.

Problem Statement

The primary challenge in task-oriented dialogue is training a goal-directed agent using only static, pre-recorded conversations without falling into the trap of generating non-intelligible language.

  1. Supervised Learning (SL) Agents: These agents are trained to imitate human behavior. While they are fluent, they are often "aimless," failing to systematically pursue a goal because they do not account for the long-term consequences of their utterances.
  2. Reinforcement Learning (RL) Agents: These agents maximize a reward (e.g., a successful sale). Traditionally, they require "online" interaction. When trained against simulators, these agents often learn to exploit the simulator's flaws, resulting in "gibberish" that technically wins the game but is useless for human interaction.

The CHAI Framework

CHAI decouples the fluency of the language from the strategy of the dialogue through a "best of both worlds" architecture.

1. The Language Model (LM) as a Prior

CHAI utilizes a pre-trained GPT-2 (medium) model as its linguistic foundation. This model is fine-tuned on task-specific datasets (e.g., Craigslist ads) to learn the domain-specific vocabulary and natural language distribution. The LM acts as a proposal distribution, ensuring that the agent only considers responses that are linguistically plausible.

2. The Q-Function (The Strategist)

To provide strategic direction, the framework trains a critic (a Q-function) to predict the "value" of a response. Given a conversation history and a candidate response, the Q-function estimates the likelihood of that response leading to a successful, high-value outcome.

3. Offline RL Variants

The researchers explored three methods for grounding the Q-function to prevent it from overestimating the value of out-of-distribution (non-human) actions:

  • CHAI-prop: The LM proposes $N$ candidate responses, and the Q-function selects the one with the highest predicted value.
  • CHAI-CQL (Conservative Q-Learning): This variant adds a penalty for out-of-distribution actions, preventing the model from favoring nonsensical sentences that might appear high-value to a naive critic.
  • CHAI-BRAC: This version regularizes the price-offering mechanism specifically to ensure the agent's offers stay close to human-like negotiation patterns.

To maintain variety and avoid repetitive behavior, CHAI employs "Soft Q-Learning" during decoding, sampling from a distribution of high-scoring responses rather than always selecting the single highest value.

Experimental Setup

The framework was evaluated using the CraigslistBargain dataset, which contains 6,682 human-to-human dialogues involving negotiations over items for sale. Each dialogue includes a list price and a final agreed-upon price, providing a clear reward signal for the RL component. The underlying GPT-2 model leverages the WebText dataset for general linguistic competence.

Key Insights

  • Language Models as Action Constraints: One of the most significant findings is that using an LM as a proposal distribution effectively prunes the infinite action space of natural language. By forcing the agent to choose from a subset of human-like sentences, the system eliminates the possibility of generating gibberish.
  • Strategy vs. Fluency: While pure LMs are excellent at maintaining fluency, they often struggle with the "flow" of a deal—sometimes offering prices higher than what a buyer requested. CHAI’s value-judgment layer corrects these strategic errors.
  • Robustness: Unlike retrieval-based bots that rely on rigid templates, CHAI generates text end-to-end. This allows it to handle unexpected human questions and maintain flexibility throughout the conversation.

Results

CHAI was evaluated against several baselines, including state-of-the-art (SOTA) retrieval-based models.

  • Simulated Performance: In bot-vs-bot matches, CHAI-CQL achieved an 88.7% acceptance rate, significantly outperforming the retrieval-based SOTA, which showed high volatility (42% to 80%) depending on the reward function.
  • Human Evaluation: In a study involving 16 participants, humans rated CHAI significantly higher than both pure LM and retrieval baselines across three metrics: Coherency, On-Topicness, and Human-Likeness.
  • Qualitative Success: CHAI demonstrated a unique ability to answer "common sense" questions (e.g., regarding the age or condition of an item) while simultaneously maintaining a firm negotiation stance.

Limitations and Future Work

Despite its success, CHAI faces a "truthfulness problem." Because the RL objective is to maximize reward, the bot may learn to lie about an item's condition if not explicitly penalized. Additionally, the current architecture uses a specific head for price prediction, which would need adaptation for non-monetary strategic domains. Future research will focus on scaling this approach to long-horizon tasks with more complex, multi-stage objectives.

Summary updated

BibTeX
@inproceedings{verma2022chai,
  author = {Siddharth Verma and Justin Fu and Sherry Yang and Sergey Levine},
  title = {{CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.332},
}
Figure