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

General Purpose Verification for Chain of Thought Prompting

Robert Vacareanu, Anurag Pratik, Evangelia Spiliopoulou, Zheng Qi, Giovanni Paolini, Neha Anna John, Jie Ma, Yassine Benajiba, Miguel BallesterosarXiv 2024

Abstract

Many of the recent capabilities demonstrated by Large Language Models (LLMs) arise primarily from their ability to exploit contextual information. In this paper, we explore ways to improve reasoning capabilities of LLMs through (1) exploration of different chains of thought and (2) validation of the individual steps of the reasoning process. We propose three general principles that a model should adhere to while reasoning: (i) Relevance, (ii) Mathematical Accuracy, and (iii) Logical Consistency. We apply these constraints to the reasoning steps generated by the LLM to improve the accuracy of the final generation. The constraints are applied in the form of verifiers: the model itself is asked to verify if the generated steps satisfy each constraint. To further steer the generations towards high-quality solutions, we use the perplexity of the reasoning steps as an additional verifier. We evaluate our method on 4 distinct types of reasoning tasks, spanning a total of 9 different datasets. Experiments show that our method is always better than vanilla generation, and, in 6 out of the 9 datasets, it is better than best-of N sampling which samples N reasoning chains and picks the lowest perplexity generation.

Introduction

Large Language Models (LLMs) have demonstrated remarkable proficiency in "showing their work" through Chain-of-Thought (CoT) prompting. However, a persistent challenge remains: the "hallucination" problem. A model may arrive at a correct final answer despite intermediate steps containing mathematical errors, logical contradictions, or irrelevant information. Because CoT lacks a built-in error-correction mechanism, a mistake in an early step often cascades through the rest of the reasoning chain.

Existing solutions frequently rely on task-specific verifiers trained on narrow datasets (e.g., math-only models), which fail to generalize. This research introduces a problem-agnostic framework that uses the LLM itself as a "System 2" critic to verify reasoning steps against universal principles without requiring task-specific fine-tuning.

The Verification Framework

The proposed method treats the LLM as both a generator and a verifier. The process involves three main stages:

  1. Step-by-Step Generation: The model generates multiple candidate reasoning chains for a given problem.
  2. Multi-Pronged Verification: Each step in a chain is evaluated by four distinct verifiers:
  3. Relevance: Does the step contribute to solving the problem, or is it a distraction?
  4. Mathematical Accuracy: Are equations calculated correctly? This uses a hybrid approach where the LLM extracts the formula and a program executes it for precision.
  5. Logical Consistency (Coherence): Does the step contradict any previously established information in the chain?
  6. Step-wise Perplexity: A measure of how "surprised" the model is by the tokens it generated; lower perplexity often correlates with higher reasoning quality.
  7. Aggregation and Selection: Scores are combined using a geometric mean to penalize chains with even a single flawed step, alongside a weighted arithmetic mean to select the optimal reasoning chain.
Figure 1: Examples of the three core verification principles—Relevance, Mathematical Accuracy, and Logical Coherence—applied to candidate reasoning steps.

Experimental Results

The framework was evaluated across 9 datasets spanning four reasoning categories: Mathematics (GSM8k, SVAMP, AddSub), Commonsense (CSQA, CSQA 2.0, StrategyQA), Symbolic Reasoning (Coinflip, Last Letter Concatenation), and Date Understanding (BigBench).

Key findings include:

  • Superior Performance: The proposed method outperformed vanilla generation across all 9 datasets. Notably, on the "Last Letter Concatenation" task, accuracy improved by 25.68 points over random sampling.
  • Beating Best-of-N: In 6 out of 9 datasets, the verifier-led selection was superior to standard "Best-of-N" sampling, which typically selects the chain with the lowest overall perplexity.
  • Human Alignment: Automated verifier scores showed a positive correlation with human judgments of reasoning quality.
Figure 4: Accuracy comparison across GSM8k, CSQA, and BigBench Date Understanding datasets, showing the proposed weighted method consistently outperforming Low PPL and Random Chain baselines as the number of reasoning chains increases.

Discussion and Insights

One of the most significant insights is the "Early Catch" Phenomenon: verifying just the first 20% of reasoning steps is often sufficient to significantly outperform random sampling. This suggests that flawed reasoning often manifests early in the generation process.

While LLMs may struggle to self-correct within a single generation pass, they are highly capable in an "audit" mode, identifying flaws when prompted to evaluate specific steps. However, the framework does face limitations, including the computational cost of running multiple verifiers per step and occasional noise in the "Relevance" and "Logical Consistency" outputs. Future work will focus on improving verifier efficiency and refining symbolic reasoning verification logic.

Summary updated

BibTeX
@misc{vacareanu2024general,
  author = {Robert Vacareanu and Anurag Pratik and Evangelia Spiliopoulou and Zheng Qi and Giovanni Paolini and Neha Anna John and Jie Ma and Yassine Benajiba and Miguel Ballesteros},
  title = {{General Purpose Verification for Chain of Thought Prompting}},
  year = {2024},
  eprint = {2405.00204},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.00204},
}
Figure