NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Active Prompting with Chain-of-Thought for Large Language Models

Shizhe Diao, Pengcheng Wang, Yong Lin, Rui Pan, Xiang Liu, Tong Zhang

Abstract

The increasing scale of large language models (LLMs) brings emergent abilities to various complex tasks requiring reasoning, such as arithmetic and commonsense reasoning. It is known that the effective design of task-specific prompts is critical for LLMs’ ability to produce high-quality answers. In particular, an effective approach for complex question-and-answering tasks is example-based prompting with chain-of-thought (CoT) reasoning, which significantly improves the performance of LLMs. However, current CoT methods rely on a fixed set of human-annotated exemplars, which are not necessarily the most effective examples for different tasks. This paper proposes a new method, Active-Prompt, to adapt LLMs to different tasks with task-specific example prompts (annotated with human-designed CoT reasoning). For this purpose, we propose a solution to the key problem of determining which questions are the most important and helpful to annotate from a pool of task-specific queries. By borrowing ideas from the related problem of uncertainty-based active learning, we introduce several metrics to characterize the uncertainty so as to select the most uncertain questions for annotation. Experimental results demonstrate the superiority of our proposed method, achieving superior performance on eight complex reasoning tasks. Further analyses of different uncertainty metrics, pool sizes, zero-shot learning, and accuracy-uncertainty relationships demonstrate the effectiveness of our method.

Introduction

Chain-of-Thought (CoT) prompting has revolutionized how Large Language Models (LLMs) handle complex mathematics and logic. By providing a few examples (exemplars) alongside step-by-step reasoning, models can solve problems that were previously out of reach. However, the selection of these exemplars is often arbitrary—chosen randomly or hand-picked by researchers. This approach is inefficient, as not all questions are equally informative for "teaching" a model a specific task.

The core challenge addressed in this research is identifying which specific questions are the most helpful to annotate when working with a limited human annotation budget. If we can only afford to annotate a handful of examples, we must select those that provide the maximum signal to the model.

Methodology: The Active-Prompt Framework

To solve the exemplar selection problem, we introduce Active-Prompt, a four-stage pipeline that leverages uncertainty-based active learning to identify the most valuable questions for human annotation.

The four-stage pipeline of Active-Prompt: Uncertainty Estimation, Selection, Annotation, and Inference.

1. Uncertainty Estimation

The model is presented with a pool of task-specific unlabeled questions. It is prompted to answer each question multiple times (e.g., $k=10$). This allows us to observe the consistency of the model's reasoning and output.

2. Selection and Uncertainty Metrics

We calculate the "uncertainty" of the model’s answers to rank the questions. Several metrics were evaluated to determine which best captures model confusion:

  • Disagreement (D): The ratio of unique answers to the total number of attempts ($u = h/k$).
  • Entropy (E): A statistical measure of unpredictability in the model's output distribution.
  • Variance: Used for arithmetic tasks to measure the fluctuation in numerical answers.
  • Self-Confidence: Directly asking the model for its confidence level (though this proved less reliable).

3. Annotation

Human annotators provide step-by-step reasoning chains and correct answers for the top-$n$ most uncertain questions identified in the previous step.

4. Inference

These high-value, human-annotated exemplars are used as the few-shot prompt for the final test set, providing the model with guidance on the exact types of problems it previously found most difficult.

Experimental Evaluation

Active-Prompt was evaluated across eight complex reasoning benchmarks, including arithmetic (GSM8K, ASDiv, SVAMP, AQuA, SingleEq), commonsense (CSQA, StrategyQA), and symbolic reasoning (Last Letter Concatenation).

Key Results

Active-Prompt consistently outperformed standard CoT, Self-Consistency (SC), and Auto-CoT (which uses clustering for diversity rather than uncertainty).

Quantitative comparison of Active-Prompt against various baselines across multiple LLMs and datasets.
  • Performance Gains: On the text-davinci-002 model, Active-Prompt achieved an average improvement of 7.0% over the standard self-consistency baseline.
  • State-of-the-Art Math Reasoning: On the GSM8K benchmark, Active-Prompt reached 83.4% accuracy using code-davinci-002, a significant jump from the 63.1% achieved by standard CoT.
  • Metric Effectiveness: Disagreement and Entropy metrics (Active-Prompt D and E) were found to be the most effective indicators of uncertainty, significantly outperforming self-reported confidence.

Discussion and Insights

Our findings suggest that uncertainty is the best teacher. Questions where the model produces a wide spread of different answers are the most informative to annotate. By providing the correct reasoning for these specific cases, the model generalizes better to the rest of the task.

Furthermore, we observed exemplar transferability. Exemplars selected based on the uncertainty of one model often improved the performance of other models. This suggests that certain questions are inherently more complex or informative across different architectures. Finally, the method is highly efficient; annotating just 8 high-uncertainty questions often outperformed annotating 8 random questions by a wide margin.

Conclusion

Active-Prompt offers a low-cost, high-reward strategy for prompt engineering. While it requires an upfront computational cost to estimate uncertainty, the resulting performance gains and the reduction in required human annotation make it a powerful tool for adapting LLMs to specialized reasoning tasks. Future work may explore combining uncertainty-based selection with diversity-based metrics to further optimize the exemplar set.

Summary updated

BibTeX
@inproceedings{diao2024active,
  author = {Shizhe Diao and Pengcheng Wang and Yong Lin and Rui Pan and Xiang Liu and Tong Zhang},
  title = {{Active Prompting with Chain-of-Thought for Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=Ow8TIy6EB3},
}
Figure