Decision-Targeted Gibbs Sampling for Best-Prompt Identification

Choosing the best prompt, model configuration, or pipeline from a large pool under a fixed evaluation budget is a simple regret problem. Only the quality of the final pick matters, not how well the intermediate trials went. The strongest methods for this setting share information across candidates through a statistical model, so that testing one prompt tells you something about similar ones. Today those models are kept deliberately crude, typically a Gaussian surrogate with analytic updates, because the selection rule needs a fresh posterior after every round of evaluations. Crude models discard the structure that matters most when outcomes are binary pass/fail scores on shared test queries. Some queries are simply hard for every prompt, and comparing two prompts on the same query cancels that difficulty out.

We propose to fit the right model and still make decisions quickly. The model is a crossed-effects probit model with prompt effects, query difficulties, and sparsity-inducing shrinkage over prompt-embedding features. Its posterior is sampled with data-parallel Gibbs sampling, a Markov chain Monte Carlo method in which, after adding one latent variable per observation, all observations can be resampled at once on a GPU. We then change what "enough sampling" means. Rather than running chains until they mix in the usual integration sense, we run many short, warm-started parallel chains and stop each round's sampling once the chains agree on the leading candidate and its strongest challenger. One draw per independent chain then serves as the committee of posterior samples that a Thompson-style pure-exploration rule needs.

Core Claim

For fixed-budget best-arm identification with binary outcomes on shared queries, a paired crossed-effects probit model sampled by warm-started parallel Gibbs chains can find a better final candidate per evaluation call than Gaussian-surrogate methods. The added inference cost per round is a small, bounded number of GPU sweeps, because only decision-relevant convergence is needed. The new element is the stopping rule that couples Gibbs computation to the simple-regret decision, together with using cross-chain rather than within-chain samples as the exploration committee. That second choice sidesteps the autocorrelation problem that would otherwise break the concentration arguments behind pure-exploration rules.

Where This Sits

Three lines of work supply the pieces, and none combines them. The first is model-based pure exploration. BayesGap in On correlation and budget constraints in model-based bandit optimization with application to automatic machine learning uses a Gaussian process or linear-Gaussian model to pick between the empirical leader and its most threatening competitor, and it succeeds when there are more candidates than evaluations. TRIPLE in Efficient Prompt Optimization Through the Lens of Best Arm Identification casts prompt selection as fixed-budget best-arm identification and adds embedding-based clustering and a Gaussian surrogate for large pools. Both motivate this proposal, since they show that correlation across candidates matters. Both also constrain it: each assumes conjugate Gaussian inference and treats a prompt's score as a noisy scalar, ignoring which query produced it. We keep their leader-versus-challenger logic and replace the inference engine.

The second line supplies the selection rule. TS-Explore in Thompson Sampling for (Combinatorial) Pure Exploration draws $M$ independent posterior samples and uses their agreement with the empirical best to decide what to pull. It assumes independent Gaussian arms, where independent draws are free. We reuse the committee idea in a correlated, non-conjugate posterior, where independence has to be bought with separate chains.

The third line supplies the sampler. GPU-accelerated Gibbs sampling: a case study of the Horseshoe Probit model shows that probit data augmentation makes all latent variables conditionally independent, so a GPU can update them in one pass. That work reports 10,000 iterations at $N=1{,}000{,}000$, $p=1{,}000$ in 2 minutes 17 seconds, against 71 minutes on a 16-core workstation. The same authors stress in GPU-accelerated Gibbs Sampling that faster iterations do not reduce autocorrelation. This caveat is exactly why we avoid relying on within-chain draws for decisions. Faster Parallel MCMC: Metropolis Adjustment Is Best Served Warm shows that ensembles of hundreds of chains, with tuning driven by ensemble statistics, cut wall-clock time sharply. Its goal is accurate integration, however, not decisions, and it saturates beyond roughly 128 to 256 chains. That saturation point guides our choice of $M$.

Randomized Kriging Believer for Parallel Bayesian Optimization with Regret Bounds is the closest conceptual neighbor. It shows that filling pending parallel evaluations with genuine posterior samples preserves a simple-regret bound independent of worker count. Its posterior is an analytic Gaussian process, though, and its parallelism lies in the evaluators, not in inference. We need its insight when issuing batches of LLM calls, but our contribution is on the inference side.

The Model and Sampler

Let $y_{ij}\in\{0,1\}$ record whether prompt $i$ answers query $j$ correctly. We model

$$P(y_{ij}=1)=\Phi(\theta_i - b_j),\qquad \theta_i = e_i^\top w + u_i,$$

where $\Phi$ is the standard normal CDF, $\theta_i$ is prompt quality, $b_j$ is query difficulty, $e_i$ is a sentence embedding of prompt $i$, $w$ carries a horseshoe prior (heavy shrinkage of most embedding directions toward zero, as in Terenin et al.), and $u_i$ is a Gaussian residual. Following Albert–Chib augmentation, each observation gets a latent $z_{ij}$ drawn from a normal truncated by $y_{ij}$. Given $(\theta,b)$, every $z_{ij}$ is independent, so they are sampled in one GPU kernel. Given $z$, the blocks $\theta$, $b$, and $w$ have Gaussian conditionals solved by Cholesky factorization.

The query effects $b_j$ are what Gaussian surrogates lack. Once two prompts have both been tried on query $j$, their comparison no longer carries that query's difficulty as noise.

Each round, the selection rule looks at the posterior-mean leader $L$ and the challenger $C$ most often ranked first by committee draws among non-leaders. It then evaluates $L$ and $C$ on the same freshly sampled query, which makes the design paired. Batched variants issue several such pairs at once, with pending outcomes filled in by committee draws in the spirit of RKB.

Decision-Targeted Stopping

Between rounds, the posterior changes by only one or a few observations, so each of the $M$ chains continues from its last state. A round's sampling stops after the smallest number of sweeps $s$ for which two things hold: the leader–challenger pair computed from the committee is unchanged over a trailing window of sweeps, and the committee's estimate of $P(\theta_L>\theta_C)$ moves less than a tolerance. A cap on $s$ bounds latency.

The committee used for the decision is one draw per chain, so its members are as independent as the chains are mixed. The cost of warm-starting then shows up as lag, meaning a chain still reflects an outdated posterior, rather than as correlation among committee members. We will measure lag directly. We will compare the committee's statistics against those of a long, cold-started reference run at the same data. We will also derive a simple bound on the misidentification probability added by lag, under the assumption that each new observation shifts the posterior only locally.

Research Program

The work has three parts. We will build a GPU implementation of the crossed-effects horseshoe probit sampler with warm-started multi-chain execution and the stopping rule. We will analyze how the sweeps needed per round scale with pool size, data size, and the gap between the best and second-best prompt. The hypothesis is that sweeps-to-decision shrink as gaps widen, unlike sweeps-to-mixing. Finally, we will test on prompt selection and AutoML model selection against the strongest Gaussian-surrogate and elimination methods, with ablations that separate the model, the paired design, the exact sampler, and the stopping rule.

Baselines

The naive reference is uniform allocation: spread the budget equally across candidates and return the best empirical mean. TRIPLE reports beating uniform testing and UCB by 3% to 16% in accuracy across 47 Instruction-Induction and BigBench-ii tasks (Efficient Prompt Optimization Through the Lens of Best Arm Identification). Any method that does not clear uniform allocation is not worth pursuing.

The strongest existing competitors are the TRIPLE family. TRIPLE-SH and TRIPLE-CR cover small pools; TRIPLE-CLST and TRIPLE-GSE cover large pools, where the paper reports beating Bayesian optimization by up to 56% on Llama2 under tight budgets. These are the right opponents because they were built for exactly this task and already exploit embeddings. We will run them on the same tasks, candidate pools, LLMs (Mistral-7B and Llama2), query budgets, and embedding model, using the hyperparameters the paper recommends plus the same small tuning grid we allow ourselves. Beating them means lower simple regret at equal LLM-call budgets on a majority of tasks, with the advantage holding at the tightest budgets.

BayesGap with a Gaussian process over prompt embeddings (On correlation and budget constraints in model-based bandit optimization with application to automatic machine learning) is the second model-based competitor. It shares our leader-versus-challenger logic, so it isolates the effect of the probit and query-effect model. On its own AutoML benchmark it reports a qualitative win over Expected Improvement; no reported numeric result was found on Lacuna for BayesGap error rates, so we rerun it.

Three ablations isolate our ingredients. The first is our model with a Laplace (Gaussian) posterior approximation in place of Gibbs. The second is our model with long cold-started chains each round in place of decision-targeted stopping. This tests whether the stopping rule loses accuracy and how much time it saves. The third is our model with unpaired query assignment. All variants share the same random query streams.

Why not just…?

Why not just run sequential halving on paired differences, with no model at all? Pairing removes query difficulty without any Bayesian machinery, and in small pools where each prompt gets many evaluations this may match us. That is a real threat. We include paired sequential halving as an explicit baseline. We expect our advantage, if any, to appear in the regime TRIPLE identifies as hard, where the pool exceeds the budget and elimination methods cannot even evaluate every candidate once. Only the embedding regression can rank unseen prompts in that regime. If paired halving matches us there too, the conclusion is that the model is unnecessary, and we will report it.

Why not just use a Laplace or variational Gaussian approximation of the same model? That approach would keep the model and avoid samplers. With few binary observations per prompt, though, the posterior is prior-dominated and skewed, and the horseshoe prior is precisely the kind of heavy-tailed distribution Gaussian approximations misrepresent. Robnik and Seljak note that even ensemble tuning heuristics resting on local Gaussian assumptions are misled on curved, non-Gaussian targets. Our Laplace ablation settles this directly. If it matches Gibbs on simple regret, the sampler is not earning its place and the contribution reduces to the model and design.

Why not just bootstrap or ensemble point estimates to form the committee? This is cheaper still. Scalable Bayesian Monte Carlo: fast uncertainty estimation beyond deep ensembles reports that on IMDb abstention, parallel Monte Carlo reached AUC-ROC 0.892 against 0.855 for deep ensembles and 0.828 for a MAP estimate. The point is that ensembles tend to understate epistemic uncertainty, and the committee's job is to measure exactly that. We will include a bootstrap committee of $M$ refits of the MAP estimate under the same model, compared at matched wall-clock time.

Proposed Experiments

The main benchmark is TRIPLE's prompt-optimization suite: Instruction-Induction and BigBench-ii, 47 tasks, Mistral-7B and Llama2, with candidate pools of 30 and of several hundred prompts. Ground-truth prompt quality comes from exhaustive evaluation on a held-out query set. Simple regret is the held-out accuracy gap between the best prompt in the pool and the returned prompt. We also report the probability of identifying the best prompt and per-round inference latency.

The second benchmark is UCI Wine Quality AutoML from Hoffman et al. ($K=160$, $T=10$), with cross-validation folds playing the role of queries. Error becomes a thresholded binary outcome, or a Gaussian likelihood is substituted for the probit. This tests whether shared difficulty structure helps outside prompting.

A synthetic suite, with controlled variance in query difficulty, controlled embedding informativeness, and controlled best-to-second gaps, provides known ground truth for the scaling analysis.

The decisive checks are as follows. Simple regret versus LLM calls must favor our method over TRIPLE-GSE and paired halving in the pool-exceeds-budget regime. Gibbs must beat the Laplace ablation in that same regime. Decision-targeted stopping must match long cold-started chains in regret while using far fewer sweeps per round, with the savings growing as gaps widen. Cross-chain committees must show calibrated $P(\theta_L>\theta_C)$ against the long-run reference, whereas a within-chain committee of the same size is expected to be overconfident. If the third check fails, the stopping rule is the problem. If the second fails, the sampler is unnecessary. Either outcome is informative and will be reported.