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

TL;DR

SSoT prompts LLMs with random strings and operations, achieving near-ideal distribution fidelity and enhanced diversity.

cs.AI 🔴 Advanced 2025-10-24 54 views
Kou Misaki Takuya Akiba
LLM prompting probabilistic sampling distribution alignment response diversity theoretical guarantees

Key Findings

Methodology

This paper introduces SSoT, which prompts models to generate a random string, then manipulates it via operations like hashing and summation to sample from a target distribution. Theoretically, it guarantees diminishing total variation distance between the empirical and target distributions, even with autoregressive character correlations. Experiments across five frontier LLMs (e.g., deepseek-r1, GPT-4) show significant improvements in Probabilistic Instruction Following (PIF), approaching the performance of pseudo-random number generators. Additionally, on NoveltyBench, SSoT enhances response diversity without sacrificing quality, confirming the theoretical insights.

Key Results

  • Across models, SSoT reduces JS divergence by over 51%, nearly matching PRNG performance, outperforming prompt ensembling and few-shot baselines.
  • In biased distribution scenarios, SSoT maintains high fidelity, demonstrating robustness against skewed target distributions.
  • In adversarial Rock-Paper-Scissors, SSoT enables models to adopt mixed strategies, resisting pattern exploitation.
  • On NoveltyBench, SSoT significantly increases diversity metrics while preserving content quality, validating the theoretical framework.

Significance

This work addresses fundamental limitations of LLMs in probabilistic sampling and response diversity, providing a theoretically grounded, simple yet powerful prompting technique. It bridges the gap between descriptive modeling and faithful sampling, enabling applications in content creation, behavioral simulation, and strategic decision-making. The approach’s scalability and theoretical guarantees make it a promising foundation for future multi-objective prompt engineering, pushing the boundaries of what LLMs can achieve in realistic, non-deterministic scenarios.

Technical Contribution

The core technical innovation lies in leveraging random string generation combined with hashing and sum-mod operations, supported by rigorous information-theoretic analysis. The authors prove that the total variation distance diminishes with string length, even under character correlations, and demonstrate that models can autonomously develop internal strategies to manipulate randomness. This provides a new paradigm for probabilistic sampling in LLMs, distinct from temperature tuning or few-shot prompting, with formal guarantees and practical effectiveness validated through extensive experiments.

Novelty

This is the first work to embed randomness via string generation and manipulation within LLM prompts to achieve distribution-faithful sampling. Unlike prior methods relying solely on temperature or few-shot examples, SSoT offers a theoretically sound, scalable, and versatile approach that ensures the empirical distribution converges to the target, even with autoregressive character correlations. Its integration of information theory, hashing, and internal strategy development marks a significant leap forward in prompt design innovation.

Limitations

  • The effectiveness depends on the length and character distribution of the generated string; extreme biases or dependencies may reduce performance.
  • The theoretical guarantees assume certain conditions on character probabilities, which may not hold perfectly in practice.
  • Computational overhead from string operations could be non-trivial in large-scale or real-time applications, requiring further optimization.

Future Work

Future research could explore adaptive strategies for string length and operation selection, integrate reinforcement learning to optimize randomness extraction, and extend the framework to multi-modal models. Investigating robustness under extreme biases and real-world deployment scenarios will further enhance applicability. Combining SSoT with other calibration or diversity-promoting techniques could yield even more powerful prompts for complex tasks.

AI Executive Summary

Large language models (LLMs) have revolutionized natural language processing, yet their ability to faithfully sample from complex probability distributions remains limited. Traditional prompting methods excel at deterministic tasks but falter when it comes to probabilistic instruction following (PIF) and response diversity. These limitations hinder applications such as behavioral simulation, content diversification, and strategic game playing, where non-deterministic, distribution-aligned outputs are essential.

To address this, the authors propose String Seed of Thought (SSoT), a novel prompting paradigm that guides LLMs to generate a random string first, then manipulate it through operations like hashing and summation to produce samples from a target distribution. This approach leverages information-theoretic principles, with formal proofs showing that the total variation distance between the generated empirical distribution and the target diminishes as the string length increases, even when character correlations exist.

Extensive experiments across five cutting-edge LLMs demonstrate SSoT’s effectiveness. The method significantly reduces divergence metrics (e.g., JS divergence drops by over 51%), approaching the performance of pseudo-random generators. In biased distribution scenarios, SSoT maintains high fidelity, outperforming baselines such as prompt ensembling and temperature tuning. Moreover, in open-ended tasks like those in NoveltyBench, SSoT enhances response diversity without compromising quality, validating its practical utility.

A key application highlighted is adversarial game playing, where SSoT enables models to adopt unexploitable mixed strategies in Rock-Paper-Scissors, illustrating its potential in strategic AI. The theoretical analysis and empirical results reveal that models can autonomously develop internal strategies to manipulate randomness, further boosting performance. Despite its strengths, the method faces limitations under extreme biases or dependencies, and computational costs may rise with larger strings.

Looking ahead, future work involves optimizing string operations, integrating reinforcement learning for adaptive randomness extraction, and extending the framework to multi-modal, multi-task settings. Overall, SSoT offers a simple yet powerful tool to improve the distribution fidelity and diversity of LLM outputs, paving the way for more robust, realistic AI applications in complex, uncertain environments.

Deep Dive

Glossary

Total Variation Distance (总变差距离)

衡量两个概率分布差异的指标,数值越小表示越相似。技术上定义为所有事件概率差的一半。

用于评估模型采样分布与目标分布的偏差程度。

2-Universal Hashing (2-均匀哈希)

一种哈希函数族,具有在任意两个不同输入映射到相同输出的概率相等的性质。确保随机性和分布均匀性。

在理论分析中用来保证随机字符串的熵提取效果。

Probabilistic Instruction Following (概率指令跟随)

模型根据给定的概率分布,从多个候选答案中采样的任务。强调输出分布的匹配。

本文的核心任务,检验模型在分布匹配上的能力。

NoveltyBench (新颖性基准测试)

评估模型在开放式、多样性任务中的表现的基准,包括内容多样性和创新性指标。

用以验证SSoT在实际生成任务中的效果。

Hash操作 (哈希操作)

将随机字符串通过哈希函数映射到某个类别或范围,保证分布的均匀性。

在SSoT中用来实现从随机字符串到目标分布的映射。

Open Questions Unanswered questions from this research

  • 1 如何在极端偏置或字符相关性极强的场景中保持分布忠实性仍是未解难题,未来需结合更复杂的随机提取策略。
  • 2 模型自主策略的学习机制尚未完全理解,如何优化其内部随机操作以适应不同任务仍需深入研究。
  • 3 大规模、多模态、多任务环境下的效率和鲁棒性问题,特别是在实时应用中的优化路径仍待探索。

Applications

Immediate Applications

内容生成与多样性提升

在新闻、广告、故事创作中,利用SSoT增强内容多样性,避免模式崩溃,提升用户体验。

行为模拟与策略游戏

在多玩家游戏或模拟场景中,确保AI行为符合概率分布,增强策略多样性和不可预测性。

Long-term Vision

多模态智能系统

结合视觉、语音等多模态信息,利用SSoT实现复杂环境中的多样性决策和行为生成,推动智能机器人和虚拟助手发展。

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.

cs.AI