DiverseAgentEntropy: Quantifying Black-Box LLM Uncertainty through Diverse Perspectives and Multi-Agent Interaction

Yu Feng, Phu Mon Htut, Zheng Qi, Wei Xiao, Manuel Mager, Nikolaos Pappas, Kishaloy Halder, Yang Li, Yassine Benajiba, Dan Roth · OpenReview

Abstract

Quantifying the uncertainty in the factual parametric knowledge of Large Language Models (LLMs), especially in a black-box setting, poses a significant challenge. Existing methods, which gauge a model's uncertainty through evaluating self-consistency in responses to the original query, do not always capture true uncertainty. Models might respond consistently to the origin query with a wrong answer, yet respond correctly to varied questions from different perspectives about the same query, and vice versa. In this paper, we propose a novel method, DiverseAgentEntropy, for evaluating a model's uncertainty using multi-agent interaction under the assumption that if a model is certain, it should consistently recall the answer to the original query across a diverse collection of questions about the same original query. We further implement an abstention policy to withhold responses when uncertainty is high. Our method offers a more accurate prediction of the model's reliability and further detects hallucinations, outperforming other self-consistency-based methods. Additionally, it demonstrates that existing models often fail to consistently retrieve the correct answer to the same query under diverse varied questions even when knowing the correct answer.

Introduction

As Large Language Models (LLMs) are increasingly deployed via black-box APIs, quantifying their uncertainty—knowing when they are "guessing"—is critical for reliability. Current state-of-the-art methods typically rely on self-consistency: asking the same question multiple times and measuring the entropy (disagreement) among the responses.

However, a major flaw exists in this approach: LLMs are highly susceptible to contextual biases. A model might confidently provide a wrong answer to a specific query, yet provide the correct answer if the same question is phrased slightly differently. Standard self-consistency fails here because it samples from a single, potentially biased "view" of the model's knowledge. This leads to "confidently wrong" hallucinations that existing metrics cannot catch.

Figure 1: Comparison of self-consistency and DiverseAgentEntropy in identifying correct answers through varied perspectives.

Methodology: DiverseAgentEntropy

We propose DIVERSEAGENTENTROPY, a framework that estimates uncertainty by querying a model through multiple "agents" using diverse, knowledge-preserving variations of a question. The process follows three key steps:

  1. Diverse Query Generation: Instead of repeating the same prompt, the system generates $n$ "knowledge-preserving" perturbations. These include semantically equivalent rephrasings and questions from different perspectives (e.g., asking about symptoms vs. causes to identify a specific disease).
  2. Multi-Agent Interaction: Each query is treated as a separate "agent" instantiated from the same black-box model. These agents engage in multiple rounds of one-on-one "cross-play" interactions, where they are shown a peer's query and answer and given the chance to refine their own response.
  3. Uncertainty Calculation: The final uncertainty score is derived from the weighted entropy of the agents' final answers. Weights are determined by stability; an agent that changes its mind frequently is considered less reliable.
Figure 2: The DiverseAgentEntropy multi-agent interaction process.

Experimental Evaluation

The method was evaluated across several challenging benchmarks designed to test factual knowledge and hallucination detection:

  • PopQA: Divided into "popular" and "less popular" entities to test the "long tail" of knowledge.
  • FalseQA: Questions containing false assumptions to see if the model can identify incorrect premises.
  • TruthfulQA: A standard benchmark for measuring whether models mimic human falsehoods.
  • FreshQA: A dataset focusing on fast-changing or recent real-world facts.

Key Results

DIVERSEAGENTENTROPY consistently outperformed all baseline black-box uncertainty methods across multiple models, including Llama-3-70b and Claude-3-Sonnet.

  • Better Calibration: It achieved significantly higher AUROC scores, particularly on long-tailed data (+3.8% on PopQA less popular) and realistic benchmarks like FreshQA (+7.5%) and TruthfulQA (+5.2%).
  • Hallucination Detection: By applying an abstention policy based on the uncertainty score, the method improved accuracy on "known" questions by an average of 2.5%.
  • Robustness: The method proved robust even when some agents were intentionally fed misleading signals, especially in more capable models like Claude-3.

Discussion and Conclusion

Our findings suggest that model knowledge is often "hidden" by suboptimal phrasing. Multi-agent interaction acts as a remedy that helps the model navigate its own parametric memory more effectively. If agents starting from wildly different perspectives converge on the same answer, it is a strong indicator of truth. Conversely, persistent divergence signals high uncertainty.

While the primary drawback is the computational cost—requiring roughly 5x more API calls than standard self-consistency—the gains in reliability are substantial. Future work will focus on reducing these costs through higher-quality query selection and extending the framework to long-form generation tasks.

Summary updated

BibTeX
@misc{feng2024diverseagententropy,
  author = {Yu Feng and Phu Mon Htut and Zheng Qi and Wei Xiao and Manuel Mager and Nikolaos Pappas and Kishaloy Halder and Yang Li and Yassine Benajiba and Dan Roth},
  title = {{DiverseAgentEntropy: Quantifying Black-Box LLM Uncertainty through Diverse Perspectives and Multi-Agent Interaction}},
  year = {2024},
  eprint = {2412.09572},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.09572},
}
Figure