Training a Generally Curious Agent

Fahim Tajwar, Yiding Jiang, Abitha Thankaraj, Sumaita Sadia Rahman, J Zico Kolter, Jeff Schneider, Ruslan Salakhutdinov · DOI

TL;DR

Large language models (LLMs) struggle with strategic exploration in complex environments. This paper introduces PAPRIKA, a novel fine-tuning approach that trains LLMs on diverse, synthetic interaction data to develop general decision-making skills. PAPRIKA enables LLMs to learn effective exploration strategies that transfer zero-shot to unseen tasks, paving the way for more capable autonomous agents.

What Problem Does This Paper Address?

Modern LLMs excel at many language-based tasks but often falter when deployed as agents that need to interact with an environment to gather information and make sequential decisions. Existing methods for training such agents face challenges: naturally occurring data often lacks the structured context needed for interaction modeling, and direct real-world deployment can be risky and expensive. The paper aims to bridge this gap by enabling LLMs to learn general decision-making and exploration capabilities that are not tied to specific environments or tasks.

Methods

PAPRIKA employs a multi-stage approach:

  1. Task Design: The authors create a diverse suite of 10 text-based, partially observable, multi-turn decision-making tasks. These tasks require strategic information gathering and are designed to be varied enough to encourage generalizable skills.
  2. Synthetic Data Generation: LLMs are used to generate interaction trajectories for these tasks. A curriculum learning strategy is introduced to prioritize sampling from tasks with high "learning potential," measured by the coefficient of variation of task rewards.
  3. Preference Optimization: A sequential variant of Direct Preference Optimization (DPO) is used to fine-tune the LLM. This involves training the model to prefer successful trajectories over less successful ones, effectively learning "good" exploration and decision-making behaviors.
  4. Curriculum Learning: A novel curriculum learning algorithm is proposed to improve data efficiency by dynamically selecting task groups that offer the most learning potential.

Datasets

The paper introduces a new benchmark suite comprising 10 task groups designed for evaluating sequential decision-making and exploration capabilities. These tasks include:

  • Twenty Questions
  • Guess My City
  • Customer Service
  • Murder Mystery
  • Wordle
  • Cellular Automata
  • Mastermind
  • Battleship
  • Minesweeper
  • Bandit Best Arm Selection

For training, they generated synthetic interaction data from these tasks. They also evaluated their models on the LMRL-Gym dataset for "Guess My City" and "Twenty Questions."

Key Insights and Ideas

  • Generalization through Diversity: Training on a diverse set of tasks, even with synthetic data, allows LLMs to learn generalizable decision-making strategies that transfer to entirely new tasks without further training. This is a significant departure from task-specific fine-tuning.
  • Curriculum Learning for Efficiency: Prioritizing tasks with higher "learning potential" (measured by coefficient of variation) significantly improves data efficiency, a crucial factor when data generation is the primary bottleneck.
  • In-Context RL is Key: The approach focuses on teaching LLMs "in-context reinforcement learning" (ICL-RL) rather than explicit RL algorithms. This leverages the LLM's inherent ability to learn from demonstrations and adapt its behavior based on environmental feedback.
  • PAPRIKA Doesn't Hurt Regular Capabilities: Fine-tuning with PAPRIKA does not degrade the LLM's performance on standard benchmarks, suggesting it enhances, rather than replaces, existing capabilities.

Key Results

  • PAPRIKA significantly improves the success rate of LLMs (Llama-3.1-8B-Instruct and Gemma-3-12B-IT) across all 10 task groups, often outperforming baseline models and even matching or exceeding GPT-40-mini on some tasks.
  • The learned decision-making abilities generalize zero-shot to unseen task groups, with leave-one-out experiments showing comparable or even better performance than training on a single task group.
  • PAPRIKA reduces the number of turns required to solve tasks, indicating improved efficiency and strategic exploration.
  • The curriculum learning strategy improves data efficiency, leading to better performance with fewer training trajectories.

Limitations and Future Work

  • Base Model Dependency: PAPRIKA's effectiveness relies on the quality and diversity of the base LLM. A weak base model may lead to poorer performance.
  • Computational Resources: The current implementation uses offline preference tuning due to computational constraints. Future work could explore online RL for potentially larger improvements.
  • Environment Hacking: While measures are taken to prevent task environment hacking, it remains a challenge, especially for open-ended tasks. The authors suggest that using more powerful LLMs as judges or designing less hackable environments could be future directions.
  • Task Grouping Quality: The curriculum learning algorithm's effectiveness depends on the quality of task group clusters. Future work could explore more robust clustering methods.
  • Scalable Task Generation: The authors acknowledge that designing diverse tasks requires significant human effort and suggest training LLMs to generate suitable tasks automatically.

Summary updated

BibTeX
@inproceedings{tajwar2025training,
  author = {Fahim Tajwar and Yiding Jiang and Abitha Thankaraj and Sumaita Sadia Rahman and J Zico Kolter and Jeff Schneider and Ruslan Salakhutdinov},
  title = {{Training a Generally Curious Agent}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=UeB3Hdrhda},
}
Figure