Table of Contents
Fetching ...

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

Kou Misaki, Takuya Akiba

TL;DR

This work tackles the challenge that large language models struggle to sample from explicit distributions (Probabilistic Instruction Following) and to generate diverse open-ended outputs (DAG). It introduces String Seed of Thought (SSoT), a simple two-stage prompting approach where the model first outputs a random seed string and then manipulates it to sample from a target distribution or produce diverse responses. Theoretical results bound how closely SSoT’s empirical distributions approximate the desired targets as seed length and sample size grow, using 2-universal hash functions and sum-mod/rolling-hash strategies. Empirically, SSoT improves distribution fidelity and diversity across multiple frontier models, open-ended generation benchmarks like NoveltyBench, and adversarial games, while revealing how reasoning length and CoT strategies correlate with randomness extraction and performance. Overall, SSoT offers a practical, tuning-free pathway to more reliable, diverse, and scalable LLM behavior in applications requiring stochasticity and creativity.

Abstract

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.

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

TL;DR

This work tackles the challenge that large language models struggle to sample from explicit distributions (Probabilistic Instruction Following) and to generate diverse open-ended outputs (DAG). It introduces String Seed of Thought (SSoT), a simple two-stage prompting approach where the model first outputs a random seed string and then manipulates it to sample from a target distribution or produce diverse responses. Theoretical results bound how closely SSoT’s empirical distributions approximate the desired targets as seed length and sample size grow, using 2-universal hash functions and sum-mod/rolling-hash strategies. Empirically, SSoT improves distribution fidelity and diversity across multiple frontier models, open-ended generation benchmarks like NoveltyBench, and adversarial games, while revealing how reasoning length and CoT strategies correlate with randomness extraction and performance. Overall, SSoT offers a practical, tuning-free pathway to more reliable, diverse, and scalable LLM behavior in applications requiring stochasticity and creativity.

Abstract

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.
Paper Structure (37 sections, 7 theorems, 44 equations, 10 figures, 5 tables)

This paper contains 37 sections, 7 theorems, 44 equations, 10 figures, 5 tables.

Key Result

Theorem 4.1

Suppose the random strings generated by the LLM, $(x^n)_k$, satisfies the condition that for each character $x_i \sim X_i$ and for some $\delta \leq 1/A$, the conditional probability is bounded as $\delta \leq P(x_i|\{x_j\}_{0\leq j<i}) \leq 1 - (A - 1)\delta.$ Then, for a family of 2-universal hash

Figures (10)

  • Figure 1: The schematic figure illustrating our method for PIF and diversity-aware generation in NoveltyBench, where we query the LLM multiple times using the same prompt and collect the resulting outputs. We used deepseek-r1 $(T=0.6)$ to obtain the results in the right panels. See Section \ref{['sec:experiments_pif']} for PIF and Section \ref{['sec:experiments_novelty_bench']} for diversity-aware generation experimental details.
  • Figure 2: The PIF empirical distribution with baseline and SSoT prompts for deepseek-r1.
  • Figure 3: JS divergences for Unbiased and Biased PIF. Shaded areas represent the standard deviation.
  • Figure 4: RPS results against black-belt bots.
  • Figure 5: Randomness extraction strategy of LLM in PIF.
  • ...and 5 more figures

Theorems & Definitions (18)

  • Theorem 4.1: TV distance bound with random hash function (Informal)
  • proof : Sketch of proof (full proof in Appendix \ref{['app_sec:proof_theorem_1']})
  • Theorem 4.2: TV distance bound with sum-mod strategy (Informal)
  • proof : Sketch of proof (full proof in Appendix \ref{['app_sec:proof_theorem_2']})
  • Definition D.1: Total Variation Distance
  • Definition D.2: Rényi entropy
  • Definition D.3: min-entropy
  • Definition D.4: 2-universal hash functions, carter_universal_hash_1977
  • Definition D.5: Santha-Vazirani sources, santha_vazirani_1986
  • Theorem D.6: An upper bound on TV distance between the empirical and the true distributions, weissman2003inequalities
  • ...and 8 more