Predicting the Performance of Black-box Language Models with Follow-up Queries

Dylan Sam, Marc Finzi, Zico Kolter
1/1/2025
11 citations

Official code: dsam99/QueRE (12 stars, Python, last commit 2025-01-09).

Abstract

Reliably predicting the behavior of language models -- such as whether their outputs are correct or have been adversarially manipulated -- is a fundamentally challenging task. This is often made even more difficult as frontier language models are offered only through closed-source APIs, providing only black-box access.

Show full abstract

In this paper, we predict the behavior of black-box language models by asking follow-up questions and taking the probabilities of responses \emph{as} representations to train reliable predictors. We first demonstrate that training a linear model on these responses reliably and accurately predicts model correctness on question-answering and reasoning benchmarks. Surprisingly, this can \textit{even outperform white-box linear predictors} that operate over model internals or activations. Furthermore, we demonstrate that these follow-up question responses can reliably distinguish between a clean version of an LLM and one that has been adversarially influenced via a system prompt to answer questions incorrectly or to introduce bugs into generated code. Finally, we show that they can also be used to differentiate between black-box LLMs, enabling the detection of misrepresented models provided through an API. Overall, our work shows promise in monitoring black-box language model behavior, supporting their deployment in larger, autonomous systems.

View on arXivView PDF

Code Implementations(1)

dsam99/QueREOfficial100%

Code repository for the paper on "Predicting the Performance of Black-Box LLMs through Self-Queries".

120PythonDec 29, 20241 years ago

Similar Papers

Cite this paper

@article{sam2025predicting,
  title  = {Predicting the Performance of Black-box Language Models with Follow-up Queries},
  author = {Dylan Sam and Marc Finzi and Zico Kolter},
  year   = {2025},
  eprint = {2501.01558},
  archivePrefix = {arXiv},
  doi    = {10.52202/085713-5305},
  url    = {https://doi.org/10.52202/085713-5305},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.01558.svg)](https://codeofpaper.com/paper/2501.01558)

Discussion