Abstract
Zero-Shot In-Context Learning (ZS-ICL) enables Large Language Models (LLMs) to perform tasks by generating their own "pseudo-demonstrations." However, existing methods often solve problems in a random order, leading to error accumulation where early mistakes propagate through the demonstration set. We introduce DAWN-ICL (Demonstration-AWare MoNte Carlo Tree Search), a framework that treats the problem-solving sequence as a strategic planning task. By using Monte Carlo Tree Search (MCTS) to optimize the trajectory of solved examples, DAWN-ICL generates high-quality demonstrations that can outperform human-annotated few-shot examples.
Introduction: The Challenge of Error Accumulation
In-Context Learning (ICL) has become a cornerstone of LLM utility, typically relying on human-labeled examples to guide model behavior. Zero-Shot ICL (ZS-ICL) attempts to automate this process by having the model generate its own examples. A significant bottleneck in current ZS-ICL approaches is the random selection of problem-solving sequences. If a model incorrectly solves an early, difficult problem, that error is baked into the "demonstrations" for every subsequent problem. This leads to a cascade of failures, particularly in cross-domain scenarios where tasks are heterogeneous and mixed together.
Methodology: Strategic Planning with DAWN-ICL
DAWN-ICL reformulates ZS-ICL as a Markov Decision Process (MDP), where the "state" represents the set of currently solved problems and the "action" is the selection of the next problem to solve.
The core of the system is a Demonstration-AWare Monte Carlo Tree Search (MCTS). Key innovations include:
- Demonstration-Aware Q-Value: Standard MCTS can be slow and "blind" at the start. DAWN-ICL initializes the value of a path ($Q$-value) by evaluating the semantic similarity and model confidence of retrieved pseudo-demonstrations, prioritizing "helpful" examples early in the search.
- Action Cache: To mitigate the high computational cost of MCTS, an action cache stores high-confidence problem-solving steps. If the search encounters a known step, it pulls the answer from memory, skipping expensive LLM inference.
- Calibration-Enhanced Aggregation: Since MCTS explores multiple paths, the model receives several "votes" for the final answer. DAWN-ICL aggregates these while debiasing the results to account for common LLM token biases.
Experimental Evaluation
The researchers evaluated DAWN-ICL across two major benchmarks and a specialized subset:
- BIG-Bench Hard (BBH): A collection of 23 challenging tasks requiring multi-step reasoning.
- MMLU (Massive Multitask Language Understanding): A vast benchmark covering 57 subjects across STEM, humanities, and more.
- BBH-mini: A subset created to test "cross-domain" performance, where the model must navigate a mix of different tasks simultaneously.
Key Results
DAWN-ICL demonstrated significant improvements over state-of-the-art baselines like DAIL and Self-ICL across various models, including Llama3.1-8B, Qwen2.5-7B, Mistral-7B, and GPT-4o-mini.
- Outperforming Human Annotations: Remarkably, DAWN-ICL often outperformed standard Few-Shot ICL using human-annotated examples. For instance, on BBH with Llama3.1-8B, DAWN-ICL achieved 48.01% accuracy, compared to 45.42% for human-labeled few-shot prompts.
- Robustness in Mixed Tasks: In cross-domain scenarios (BBH-mini), DAWN-ICL’s ability to strategically pick the next best problem allowed it to maintain high accuracy even when the input stream was messy, whereas random ordering performed poorly.
- Efficiency: The "Action Cache" mechanism allowed the model to achieve these results with significantly fewer API calls than a naive MCTS approach would require.
Discussion and Future Work
The success of DAWN-ICL highlights that the order of problem-solving is a critical lever for performance. By solving "easier" or more "confident" problems first, the model constructs a high-quality "textbook" of examples for more challenging tasks.
While MCTS introduces additional computational cost and latency compared to single-pass zero-shot prompting, the strategic planning approach offers a robust path toward self-improving AI systems. Future work may involve training dedicated "value models" to predict trajectory quality, potentially making the search even more efficient and accurate.
Summary updated