Improving Consistency in Large Language Models through Chain of Guidance

Harsh Raj, Vipul Gupta, Domenic Rosati, Subhabrata Majumdar

Abstract

Large Language Models (LLMs) frequently exhibit semantic inconsistency, where slight variations in input phrasing lead to contradictory outputs. This paper introduces Chain of Guidance (CoG), a multi-step prompting strategy designed to enhance reliability. By utilizing a high-capability "teacher" model to generate and rank synthetic paraphrased data, researchers successfully fine-tuned smaller models to be significantly more consistent. Our results demonstrate that consistency is a distillable trait, with fine-tuned models achieving nearly double the consistency of their base versions while maintaining strong general performance.

Introduction

Trust in AI systems is often undermined by a lack of semantic consistency. For instance, a model might correctly state that no magic word opens a door when asked directly, yet suggest "Open Sesame" when the question is slightly rephrased. This sensitivity to syntax—where semantically equivalent inputs yield divergent outputs—remains a major hurdle for automated workflows. Chain of Guidance (CoG) addresses this by providing a standard mechanism to ensure LLMs remain grounded across varied phrasings.

Methodology: The Chain of Guidance Pipeline

The CoG strategy is a three-step pipeline designed to extract and distill the most consistent answers from frontier models:

  1. Guided Paraphrase Generation: A specialized paraphrasePrompt generates multiple realistic variations of a seed question using synonyms and syntactic changes.
  2. Guided Answer Generation: The model generates preliminary answers for all paraphrases, which are then condensed into concise, short-form versions via an answerPrompt.
  3. Self-Ranking: The system presents the model with the full list of generated short answers as multiple-choice options. The model uses a rankPrompt to select the most correct answer for each paraphrase, forcing a consensus across the variation set.
The Chain of Guidance (CoG) pipeline illustrating the flow from question paraphrasing to final answer ranking.

This synthetic data is then used to fine-tune smaller models (e.g., Llama 3 8B) using Supervised Fine-Tuning (SFT) or Low-Rank Adaptation (LoRA).

Experimental Setup

The CoG pipeline was evaluated using diverse open-source datasets, including TruthfulQA (misconceptions), HotpotQA (multi-hop reasoning), CommonsenseQA, and AmbigQA. Evaluation also included adversarial sets to test robustness against "jailbreak" attempts. To measure success, the researchers prioritized Entailment scores—which use a classifier to determine if different answers logically imply one another—over traditional token-overlap metrics like ROUGE-L.

Key Results and Discussion

Applying the CoG prompting technique yielded massive consistency gains across nine different LLMs. As shown in the performance data, models like text-davinci-003 saw Entailment-based consistency jump from 35.5% to 84.4%.

Consistency metrics (Entailment, Paraphrase, and Rouge-L) for various LLMs before and after applying the CoG strategy.

Key findings include:

  • Distillability: Llama 3 8B models fine-tuned on CoG data achieved consistency scores of 0.652, nearly doubling the 0.354 score of the base model.
  • Generalization: Models trained on one dataset (e.g., TruthfulQA) showed improved consistency on entirely different tasks (e.g., HotpotQA), suggesting the model learned the underlying concept of consistency.
  • Accuracy Synergy: CoG + LoRA models were often slightly more accurate than base models, indicating that consistency and correctness are mutually reinforcing.

Limitations and Conclusion

While CoG is highly effective for short-form Q&A, challenges remain. Smaller models occasionally struggle with the complex instruction-following required by the rankPrompt. Additionally, aggressive SFT for consistency can lead to performance degradation in specialized tasks like mathematical reasoning (GSM8K). Future work will explore customized loss functions to penalize inconsistency during training directly. Overall, CoG represents a significant step toward making LLMs reliable enough for mission-critical automation.

Summary updated

BibTeX
@article{raj2025improving,
  author = {Harsh Raj and Vipul Gupta and Domenic Rosati and Subhabrata Majumdar},
  title = {{Improving Consistency in Large Language Models through Chain of Guidance}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
  url = {https://openreview.net/forum?id=PFR5xXz280},
}
Figure