Learning to Shift Numeric Predictive Densities for Uncertainty-Aware LLM Agents
Abstract
Scientific-discovery and optimization agents often need to choose new experiments from only a small notebook of expensive oracle evaluations. In this setting, an LLM surrogate should not only estimate candidate values, but also expose uncertainty that downstream acquisition rules can use. We study a simple LLM-native approach: keep the language model frozen, learn a small notebook-specific soft prompt from leave-one-out oracle feedback, and read out a predictive density by scoring a grid of formatted numeric answers rather than relying on a single generated completion. On six deterministic surrogate tasks, soft-prompted Qwen/Qwen3.5-9B usually shifts predictive mass toward held-out oracle values, improving density-mean error and density Wasserstein error in 11 of 12 task--notebook settings over the frozen prompted baseline. The learned density shape also contains useful risk information: entropy usually ranks examples by prediction error, although it is not yet a calibrated uncertainty guarantee. A small qualitative candidate-selection pilot shows that the same density interface can be used inside optimization loops, with mean and expected-improvement readouts behaving differently across tasks. These results position numeric density readouts as a practical interface for uncertainty-aware LLM surrogate agents under scarce feedback.