Interactive Dialogue Agents via Reinforcement Learning on Hindsight Regenerations

Joey Hong, Jessica Lin, Anca Dragan, Sergey Levine

TL;DR

While Large Language Models (LLMs) excel at single-turn responses, they struggle with strategic, multi-turn dialogues like persuasion or counseling. This paper introduces Hindsight RL, a method that uses LLMs to rewrite suboptimal dialogue data post-hoc (in hindsight) and then trains a conversational agent using offline reinforcement learning. The resulting agent significantly outperforms standard prompting and supervised fine-tuning in real-world human user studies.

What Problem Does This Paper Address?

Current LLM training focuses heavily on single-turn accuracy—answering a question or completing a prompt effectively in one shot. However, real-world human interaction is deeply interactive and goal-directed. In tasks like mental health support, negotiation, or persuasion, an agent must dynamically steer the conversation, build rapport, and handle resistance over multiple turns.

Training agents for these complex interactions is notoriously difficult. Online reinforcement learning (RL) requires costly or brittle human-in-the-loop simulation, while offline RL suffers when the training dataset lacks examples of successful strategies. Since average humans often fail at difficult tasks like persuasion, standard human-to-human datasets are flooded with suboptimal trajectories, leaving offline RL agents with nothing good to "stitch" together.

Methods

The core insight of this paper is that while LLMs struggle to plan optimal strategies a priori, they are excellent at identifying mistakes and generating better alternatives in hindsight.

The authors propose a pipeline that takes a static dataset of suboptimal dialogues and augments it through a three-step process before applying offline RL:

  1. Hindsight Action Relabeling: A "hindsight controller" (an LLM prompted with the entire completed dialogue) reviews a past conversation, identifies a suboptimal agent turn, and proposes a more effective alternative utterance.
  2. Forward Dialogue Regeneration: To understand the counterfactual impact of this new utterance, a fine-tuned LLM "world model" simulates how the conversational partner would respond, playing out the rest of the dialogue to completion.
  3. Reward Labeling: A few-shot prompted LLM acts as a proxy reward model to score the newly generated trajectory.
Figure 1: Overall scheme for hindsight regenera- tions, our proposed approach for augmenting data to train language agents via RL.

Once the original dataset is augmented with these high-quality "hindsight regenerations," the authors train the final dialogue policy using Implicit Language Q-Learning (ILQL), an offline value-based RL algorithm designed to extract pessimistic, robust policies from text data.

Figure 2: Overview of our approach. We relabel suboptimal actions in the original dataset, then generate plausible completions of the dialogue after relabeling to obtain hindsight regenerations. Then, these regenerations are aggregated with the original data to be used for downstream offline RL.

Datasets

The method was evaluated on two demanding interactive dialogue domains:

  • PERSUASION-FOR-GOOD: A dataset of 1,017 human-human dialogues where one person attempts to persuade another to donate up to $2 to the charity Save the Children.
  • ESConv (Emotional Support Conversation): A dataset of 1,053 dialogues between a human help-seeker experiencing negative emotions and a supporter.

Key Insights and Ideas

  • Hindsight is Easier Than Foresight: LLMs don't need to be perfect planners to be perfect editors. Giving the model oracle access to how a conversation actually ended allows it to easily spot the exact moment an agent lost the user's trust or interest.
  • The "Agreeableness" Bias of LLMs: The authors discovered that vanilla LLMs make poor conversational simulators because they are inherently too polite and agreeable. To fix this, they fine-tuned their forward world models on the actual datasets and specifically trained a "hard" forward model on the bottom 25% of data to simulate stubborn or skeptical users.
  • RL vs. Pure Imitation: Simply copying the best rewritten data (Rejection Fine-Tuning) isn't enough. Dialogue agents trained via offline RL (ILQL) perform better because they learn a value function, allowing them to dynamically recover and switch strategies when a user pushes back.

Key Results

The Hindsight RL agent was evaluated in both large-scale simulations and a user study with real humans, going head-to-head against state-of-the-art prompting techniques (like ProCoT and GDP-ZERO) and supervised fine-tuning (SFT).

Quantitative results for the persuasion task
  • Higher Persuasion Success: In the human user study, Hindsight RL achieved the highest average donation reward (0.57) and the highest naturalness/fluency scores. In simulated environments with highly skeptical users, it blew past baselines, achieving a reward of 0.85 compared to ProCoT's 0.40.
  • Strategic Adaptability: Qualitative analysis showed that while prompted models conceded too quickly when faced with a skeptical user, the Hindsight RL agent actively adapted its strategy—switching between logical and emotional appeals based on the user's perceived cognitive state.
Example dialogues showing agents interacting with a skeptical user

Limitations and Future Work

  • Reward Parameterization: The framework relies on the task having a well-defined reward signal (e.g., donation amount or quantified emotional improvement) that an LLM can calibrate against. It remains difficult to apply to open-ended dialogues where the only signal is binary success or failure.
  • Prompt Engineering: The hindsight controller and reward models are heavily reliant on hand-crafted, task-specific prompts. The authors note that automating prompt design is a crucial next step for scaling this approach to broader domains.

Summary updated

BibTeX
@misc{hong2024interactive,
  author = {Joey Hong and Jessica Lin and Anca Dragan and Sergey Levine},
  title = {{Interactive Dialogue Agents via Reinforcement Learning on Hindsight Regenerations}},
  year = {2024},
  eprint = {2411.05194},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.05194},
}
Figure