String Seed of Thought: Prompting LLMs for Distribution-Faithful and Diverse Generation

LLM CoT NLP APGO
我们提出了一种名为“思维字符串种子”(String Seed of Thought,简称SSoT)的新型大语言模型提示方法,用于改进概率性指令遵循(Probabilistic Instruction Following, PIF)。我们将PIF定义为一项任务:要求大语言模型从一组预定义的选项中选择答案,每个选项对应一个特定的概率,使得在多次提示下,模型生成答案的经验分布能够与目标分布保持一致。尽管大语言模型在具有唯一确定性答案的任务上表现出色,但在PIF任务中常常表现不佳,容易产生偏差。这种偏差对需要非确定性行为的应用场景尤为不利,例如模拟人类行为、内容多样化以及多人游戏等。此外,这种偏差还会导致生成的回答多样性下降,在测试时扩展(test-time scaling)中这一问题尤为关键,因为输出会坍缩到少数几种答案。为解决这一问题,我们提出了SSoT——一种简单的提示方法,指导大语言模型首先输出一个随机字符串,以产生足够的熵。SSoT还指示模型通过对该字符串进行操作来提取随机性,从而推导出最终答案,这样既保持了输出的多样性,又满足了特定的概率约束。实验表明,SSoT显著提升了大语言模型在PIF任务上的表现,使其接近伪随机数生成器的理想性能。此外,我们在NoveltyBench上的实验进一步证明,SSoT的优势不仅限于封闭式任务,还能通过增强回答的多样性,有效提升开放式任务的表现。
We introduce String Seed of Thought (SSoT), a novel prompting method for LLMs that improves Probabilistic Instruction Following (PIF). We define PIF as a task requiring an LLM to select its answer from a predefined set of options, each associated with a specific probability, such that the empirical distribution of the generated answers aligns with the target distribution when prompted multiple times. While LLMs excel at tasks with single, deterministic answers, they often fail at PIF, exhibiting biases problematic for applications requiring non-deterministic behaviors, such as human-behavior simulation, content diversification, and multiplayer games. It also harms the diversity of generated responses, a crucial factor in test-time scaling, by causing the outputs to collapse into a limited set of answers. To address this, we propose SSoT, a simple prompting method that instructs an LLM to first output a random string to generate sufficient entropy. SSoT also instructs the LLM to extract randomness by manipulating this string to derive a final answer, thereby preserving diversity while adhering to specific constraints. We demonstrate that SSoT significantly improves the PIF performance of LLMs, approaching the ideal performance of a pseudo-random number generator. Furthermore, our experiments on NoveltyBench show SSoT's benefits extend beyond closed-set tasks to open-ended tasks by enhancing response diversity.
许愿