Experimental Design for Active Transductive Inference in Large Language Models
Subhojyoti Mukherjee, Anusha Lalitha, Aniket Deshmukh, Ge Liu, Yifei Ma, Branislav Kveton
TL;DR
This work addresses adaptive prompt design for large language models by framing it as active learning to select informative in-context demonstrations. It introduces two principled methods, GO (G-Optimal design) and SAL (Simulation-Based Active Learning), which aim to minimize test-set uncertainty by selectively labeling informative examples; GO uses posterior covariance in a linear-model surrogate, while SAL uses LLM-driven simulations and converges to GO in the linear regime as the simulation budget grows. The authors provide monotonicity and equivalence analyses (GO vs SAL) and demonstrate strong empirical gains across classification, regression, ARC, PCFG, and natural-language tasks using multiple LLMs, highlighting goes beyond heuristic prompt selection. The approach offers a practical, model-agnostic avenue for efficient prompt design with potential extensions to multi-modal and diffusion-model contexts, supporting more reliable and sample-efficient in-context learning.
Abstract
One emergent ability of large language models (LLMs) is that query-specific examples can be included in the prompt at inference time. In this work, we use active learning for adaptive prompt design and call it Active In-context Prompt Design (AIPD). We design the LLM prompt by adaptively choosing few-shot examples from a training set to optimize performance on a test set. The training examples are initially unlabeled and we obtain the label of the most informative ones, which maximally reduces uncertainty in the LLM prediction. We propose two algorithms, GO and SAL, which differ in how the few-shot examples are chosen. We analyze these algorithms in linear models: first GO and then use its equivalence with SAL. We experiment with many different tasks in small, medium-sized, and large language models; and show that GO and SAL outperform other methods for choosing few-shot examples in the LLM prompt at inference time.
