Introduction
Chain-of-Thought (CoT) prompting has revolutionized the way Large Language Models (LLMs) handle complex reasoning tasks. By providing a few examples that include step-by-step explanations, models can solve multi-step problems with significantly higher accuracy. However, CoT performance is notoriously sensitive to the specific explanations used in the prompt. An explanation that is clear to a human may not be the optimal "trigger" for an LLM's internal logic. Currently, most researchers rely on hand-written "seed" explanations, which are often sub-optimal and require tedious manual engineering to refine.
This paper introduces a black-box framework designed to automatically select the best combinations of explanations using unlabeled data and efficient proxy metrics. This approach eliminates the need for large labeled datasets and reduces the computational cost of searching through millions of possible prompt combinations.
The Optimization Framework
The proposed method optimizes prompts without requiring access to a model's internal weights, making it applicable to proprietary APIs like GPT-3. The process follows a two-stage pipeline:
- Candidate Generation: To move beyond human-written seeds, the framework uses a "leave-one-out" strategy. The LLM is prompted to generate alternative explanations for a specific example by viewing other seed examples. This creates a pool of "model-native" candidate explanations.
- Silver Labeling: To evaluate these candidates without ground-truth labels, the authors use an unlabeled development set. The LLM generates answers for this set via self-consistency (majority voting), and these consensus answers serve as "silver labels" for validation.
Efficient Search via Proxy Metrics
Finding the best combination of $K$ explanations from $N$ candidates is an exponential problem ($N^K$). To make this tractable, the authors introduce two "one-shot" proxy metrics that correlate strongly with final few-shot performance:
- One-shot Silver Accuracy ($S_{OSAcc}$): Measures how well a single explanation performs across the silver-labeled development set.
- One-shot Log Likelihood ($S_{OSLL}$): Measures the model's likelihood of generating the correct answer for one exemplar when conditioned on another single explanation.
By ranking candidates using these cheap-to-calculate proxies, the system can prune the search space and only evaluate the most promising combinations against the full development set.
Experimental Results
The researchers evaluated the framework across four diverse reasoning benchmarks: GSM (math), ECQA (commonsense), E-SNLI (natural language inference), and StrategyQA.
Key findings include:
- Significant Accuracy Gains: Optimized prompts outperformed original human-written seeds by an average of 4% across all tasks. On the E-SNLI dataset, improvements reached as high as 7.1%.
- Model-Native Preference: The results suggest that LLMs often perform better when prompted with explanations phrased in their own "style" or logic rather than those written by human crowdworkers.
- Generalizability: Explanations optimized on one dataset (e.g., GSM) were found to improve performance on out-of-domain datasets (e.g., SVAMP), indicating that the optimization captures fundamental reasoning patterns.
Conclusion
This work demonstrates that ground-truth labels are not a prerequisite for prompt optimization. By leveraging the model's own consensus on unlabeled data and using efficient one-shot proxies, researchers can significantly boost the reasoning capabilities of LLMs. While the method requires an initial investment in API calls for candidate generation, the resulting performance gains and the ability to discover "model-optimal" explanations provide a powerful alternative to manual prompt engineering.
Summary updated