Abstract
While Large Language Models (LLMs) excel at single-turn reasoning, they often struggle in multi-turn environments that require strategic exploration and active information gathering. This paper introduces PAPRIKA, a fine-tuning framework designed to instill general, transferable decision-making skills in LLMs. By training models on self-generated trajectories from a diverse set of text-based games, PAPRIKA enables "amortized exploration" strategies. These strategies generalize zero-shot to entirely unseen environments and improve task efficiency without degrading the model's standard conversational or reasoning abilities.
Introduction
Modern LLMs are highly capable at answering direct questions or performing single-step reasoning tasks. However, when deployed as autonomous agents in partially observable environments—such as debugging complex codebases or conducting medical diagnostics—they often fail to act strategically. These tasks require Reinforcement Learning (RL) capabilities: the ability to ask probing questions, interpret feedback, and iteratively refine a plan.
Training LLMs for these scenarios is traditionally difficult. Real-world trial-and-error is prohibitively expensive, and synthetic training data often relies on "expert" algorithms (like Upper Confidence Bound) that do not exist for open-ended, complex tasks. PAPRIKA addresses this by asking whether an LLM can learn general exploration strategies using only its own self-generated data across a diverse curriculum of synthetic environments.
The PAPRIKA Framework
PAPRIKA (Preference-based Amortized Policy for RL-In-context Knowledge Acquisition) utilizes a four-stage pipeline to bridge the gap between static reasoning and active exploration.
1. Diverse Task Design
The authors developed 10 distinct task groups involving multi-turn interactions. These include deductive games like Twenty Questions, Wordle, and Mastermind; spatial reasoning tasks like Battleship and Minesweeper; and logic-heavy scenarios like Murder Mystery and Customer Service. Each task requires the agent to balance gathering clues (exploration) with making a final decision (exploitation).
2. Self-Generated Data and Preference Optimization
Rather than using expert demonstrations, PAPRIKA uses the base model (e.g., Llama-3.1-8B-Instruct) to generate its own training data. By employing high-temperature sampling, the model produces a wide variety of trajectories.
The framework then constructs preference pairs. The most efficient successful trajectory (the one requiring the fewest turns) is designated as the "winner," while failed or inefficient trajectories are designated as "losers." The model is then fine-tuned using Supervised Fine-Tuning (SFT) followed by a multi-turn variant of Direct Preference Optimization (DPO). This process amplifies the model's ability to stumble upon and then internalize efficient search strategies.
3. Variance-Based Curriculum Learning
To optimize the training process, the authors introduced a curriculum learning strategy based on a multi-armed bandit algorithm. This algorithm prioritizes tasks with high "learning potential," defined by the variance in the model's performance. Tasks that are too easy (consistent success) or too difficult (consistent failure) provide poor signal for DPO. By focusing on tasks where the model shows high variance, the framework ensures a steady supply of high-quality contrasting pairs.
Experimental Results
Performance and Efficiency
PAPRIKA significantly improved the decision-making capabilities of the base models. For Llama-3.1-8B-Instruct, the average success rate across the 10 task groups increased by a relative 47% (from ~42% to ~62%). Beyond mere success, the models became more efficient, solving tasks in fewer turns and demonstrating more strategic inquiry rather than random guessing.
Zero-Shot Generalization
A key finding of the study is that exploration strategies are transferable. In leave-one-out experiments—where the model was trained on nine tasks and tested on a tenth unseen task—PAPRIKA improved zero-shot performance in 9 out of 10 cases. For example, an agent that learned to narrow down possibilities in Battleship could apply similar deductive logic to Mastermind without specific training on the latter.
Stability of General Capabilities
Fine-tuning often carries an "alignment tax," where specialized training degrades general performance. However, PAPRIKA-tuned models maintained stable scores on standard benchmarks such as MT-Bench, GPQA, and MMLU-Pro, suggesting that strategic exploration skills can be added as a complementary layer to existing LLM capabilities.
Discussion and Limitations
While PAPRIKA demonstrates the power of self-generated data, it is currently limited by the "base model bottleneck." If a model is initially too weak to ever solve a specific task, it cannot generate the positive trajectories required for preference learning. Additionally, the current implementation relies on offline DPO; the authors suggest that online RL methods (such as PPO or GRPO) could further enhance reasoning depth.
Future work may involve the procedural generation of training environments by the LLM itself, reducing the human effort required to design diverse task groups and further scaling the "curiosity" of the agent.
Conclusion
PAPRIKA proves that LLMs do not require expert algorithms to learn how to explore. By bootstrapping from their own successes and failures across a diverse curriculum, models can develop a general sense of "curiosity" and strategic thinking that generalizes across domains, paving the way for more capable and autonomous AI agents.
Summary updated