Enhancing Zero-shot Chain of Thought Prompting via Uncertainty-Guided Strategy Selection

Shanu Kumar, Saish Mendke, Karody Lubna Abdul Rahman, Santosh Kurasa, Parag Agrawal, Sandipan Dandapat

TL;DR

The paper introduces ZEUS (Zero-shot Uncertainty-based Selection), a novel method that optimizes Chain-of-Thought (CoT) prompting by automatically selecting the most effective demonstration examples based on model uncertainty. By evaluating how consistently a model answers perturbed versions of a question, ZEUS selects examples tailored to a model's specific capabilities, consistently outperforming existing automated prompting methods without requiring human annotations or access to internal model parameters.

What Problem Does This Paper Address?

Chain-of-Thought (CoT) prompting drastically improves how Large Language Models (LLMs) handle complex reasoning by asking them to output intermediate steps ("let's think step by step"). However, crafting the perfect few-shot examples (Manual-CoT) requires intense human labor. While automated methods like Auto-CoT exist, they select examples based purely on semantic diversity, completely ignoring whether a question is too easy or too hard for the model. This oversight often leads to generating incorrect or unhelpful reasoning paths (rationales) that degrade final performance.

The authors address this gap by asking: Can we use a model's own uncertainty to automatically select the optimal difficulty level of prompt demonstrations, entirely from unlabeled data?

Methods

ZEUS operates in three distinct stages, entirely treating the LLM as a black box (no logit or parameter access required):

  1. Uncertainty Estimation: For each unlabeled question, ZEUS creates a pool of 15 variations using three types of perturbations:
  2. Temperature Perturbation: Sampling multiple answers at a high temperature ($T=1$).
  3. Trigger Phrase Perturbation: Appending different prompt variations (e.g., "Let's think about this logically step by step").
  4. Rephrasing Perturbation: Asking the model to rephrase the core question.

The system calculates the Predictive Entropy (PE) based on how consistent the model's answers are across these 15 variations. High consistency means low uncertainty.

  1. Uncertainty-Based Selection: Questions are categorized into seven difficulty strategies (from Trivial to Very Hard) based on the dataset's mean ($\mu$) and standard deviation ($\sigma$) of uncertainty.
  2. Demonstration Construction: The selected subset of questions is embedded and clustered using $k$-Means++ to ensure semantic diversity. The questions closest to the cluster centroids are processed via Zero-Shot-CoT to generate rationales and answers, forming the final few-shot prompt.
Figure 1: Overview of ZEUS: Uncertainty for a question qj is calculated using a pool of answers generated using various prompts, including trigger phrases, non-zero temperature-based decoding, and rephrasing of qj. Subse- quently, questions with uncertainty within a certain range are selected and used for constructing demonstrations.

Datasets

The authors evaluated ZEUS across four diverse reasoning benchmarks:

  • GSM8K: Grade-school math word problems requiring multi-step arithmetic.
  • StrategyQA: Question-answering requiring implicit, multi-hop commonsense reasoning.
  • Logical Fallacy: Detecting formal and informal fallacies in arguments.
  • Epistemic Reasoning (EPR): Natural language inference evaluating a model's ability to reason about human mental states.

Key Insights and Ideas

  • One Size Does Not Fit All: The most surprising finding is a clear bifurcation in model behavior based on capability. Advanced models (like GPT-4o and Phi3) perform best when prompted with Hard or Challenging examples, which effectively unlock their advanced reasoning capabilities. Conversely, simpler models (like Mistral and GPT3-XL) perform better with Trivial or Easy examples; forcing hard examples on them introduces noisy, erroneous rationales into their context window.
  • High Sensitivity: Traditional uncertainty estimation relies solely on temperature scaling (Temp-Perb). The authors show that combining temperature, trigger phrases, and rephrasing provides a much more linear and sensitive correlation with actual model accuracy.
  • Uncertainty as an Oracle Proxy: At test time, a model's accuracy is inversely correlated with its uncertainty. ZEUS leverages this by selecting the strategy that minimizes test-time uncertainty (ZEUS (LU)), effectively finding the optimal prompting strategy without needing ground-truth labels.

Key Results

ZEUS consistently outpaced standard automated baselines like Auto-CoT across various models (GPT-4o, Phi3, Mistral, GPT3.5, GPT3-XL).

  • GSM8K: On grade-school math, GPT-4o using ZEUS achieved 95.8% accuracy, outperforming Auto-CoT (94.2%) and Zero-Shot-CoT (94.8%). Simpler models saw even larger jumps; GPT3-XL improved from 44.6% (Auto-CoT) to 51.9% using ZEUS's easy-sample strategy.
  • Logical Fallacy: On the Fallacy dataset, GPT-4o reached 98.0% accuracy with ZEUS, compared to 97.0% for Auto-CoT and 84.8% for Zero-Shot-CoT.
  • Close to Oracle Performance: The automated selection strategy (ZEUS (LU)) yielded nearly identical performance to the absolute best-performing strategy found through exhaustive search (ZEUS (HA)), proving its real-world viability.

Limitations and Future Work

The primary limitation of ZEUS is its computational overhead. Finding the optimal strategy currently requires an exhaustive exploration across all difficulty tiers, which can be time-consuming and expensive due to the high volume of API calls/inference steps.

The authors suggest that future iterations could automate this via a greedy search algorithm guided by uncertainty estimates to find the optimal strategy faster. Additionally, exploring how dataset size and intrinsic diversity impact these uncertainty metrics remains an open area for research.

Summary updated

BibTeX
@inproceedings{kumar2025enhancing,
  author = {Shanu Kumar and Saish Mendke and Karody Lubna Abdul Rahman and Santosh Kurasa and Parag Agrawal and Sandipan Dandapat},
  title = {{Enhancing Zero-shot Chain of Thought Prompting via Uncertainty-Guided Strategy Selection}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
}
Figure