TLDR: String Seed of Thought (SSoT) is a novel prompting method that significantly improves Large Language Models’ (LLMs) ability to follow probabilistic instructions and generate diverse responses. By instructing LLMs to first create and then manipulate an internal random string, SSoT helps them overcome inherent biases, achieving near-ideal probabilistic sampling and enhancing creativity in open-ended tasks. Experiments show SSoT’s effectiveness in various scenarios, from fair coin flips to complex game strategies and diverse content generation.
Large Language Models (LLMs) have shown incredible capabilities in understanding and generating human-like text. They excel at tasks with a single, clear answer, like answering factual questions or summarizing documents. However, a new research paper introduces a clever prompting method called String Seed of Thought (SSoT) that significantly boosts LLMs’ ability to handle tasks requiring probabilistic choices and diverse outputs.
The paper, titled STRINGSEED OFTHOUGHT: PROMPTINGLLMS FOR DISTRIBUTION-FAITHFUL ANDDIVERSEGENERATION, by Kou Misaki and Takuya Akiba from Sakana AI, addresses a fundamental challenge: LLMs often struggle when asked to make choices according to a specific probability distribution or to generate truly varied responses. For instance, if you ask an LLM to “flip a fair coin” 100 times, it might produce a skewed result like 70% heads, rather than the expected 50-50 split. Similarly, in creative tasks, LLMs can sometimes fall into repetitive patterns, limiting the diversity of their generated content.
The Core Problem: Biased Probabilities and Lack of Diversity
The researchers define two key areas where LLMs fall short:
- Probabilistic Instruction Following (PIF): This involves an LLM selecting an answer from a set of options, each with a target probability, such that the empirical distribution of its answers aligns with the target distribution over multiple attempts. Think of it as an LLM needing to act like a truly random dice roll or a fair coin flip.
- Diversity-Aware Generation (DAG): This refers to open-ended tasks, like brainstorming ideas or writing stories, where the goal is to produce a wide range of unique and high-quality outputs without repeating itself.
These limitations are problematic for applications such as simulating human behavior, diversifying content, or playing games that require mixed strategies (where optimal play involves probabilistic choices).
String Seed of Thought (SSoT): A Simple Yet Powerful Solution
SSoT is a novel prompting technique designed to overcome these biases. Its elegance lies in its simplicity: it instructs the LLM to first generate a unique and complex random string. This string acts as an internal “seed” for randomness. The LLM then uses this generated string to guide its subsequent decisions, either to sample probabilistically or to ensure diversity in its output.
For PIF tasks, the prompt might instruct the LLM to “Generate a random string, and manipulate it to sample from the target distribution.” For DAG tasks, it would be “Generate a random string, and manipulate it to generate one diverse response.” The LLM is then expected to internally process this string to derive its final answer, ensuring that the randomness is truly integrated into its decision-making process.
Impressive Results Across Various Tasks
The researchers conducted extensive experiments to demonstrate SSoT’s effectiveness:
- Improved PIF Performance: SSoT significantly enhanced the PIF performance of five different frontier LLMs, bringing their probabilistic sampling much closer to that of an ideal pseudo-random number generator. It consistently outperformed other strong baselines, including prompt ensembling and few-shot examples.
- Strategic Game Play: In an adversarial Rock-Paper-Scissors game against sophisticated bots designed to exploit patterns, SSoT enabled an LLM to successfully employ a mixed strategy, maintaining an average score near zero. This highlights its potential for robust, unexploitable behavior in strategic scenarios.
- Enhanced Diversity: On the NoveltyBench benchmark for open-ended tasks, SSoT generated more diverse responses than traditional methods like increasing temperature or prompt paraphrasing, all without sacrificing the quality of the output. This was particularly evident in creative categories.
Understanding the Mechanism: LLM’s Internal Strategies
A fascinating aspect of SSoT is how LLMs autonomously develop internal strategies to manipulate the random string. For unbiased probabilistic tasks, LLMs often use a simple “sum-mod” strategy (summing character codes and taking a modulo). However, for more complex biased distributions, they adapt to sophisticated methods like “rolling hash” algorithms, demonstrating their ability to adjust their approach based on task complexity.
Furthermore, the study found a direct correlation between the length of the LLM’s reasoning process (its “Chain of Thought” or CoT) and the quality of the generated randomness. Longer reasoning traces led to more uniform random integers and more complex, high-entropy random strings, ultimately resulting in better performance.
Also Read:
- Magellan: Guiding AI to Generate Breakthrough Scientific Ideas
- Enhancing Mathematical Reasoning in Language Models: A Reinforcement Learning Approach to Budget Forcing
Conclusion: A Step Towards More Reliable and Creative LLMs
String Seed of Thought offers a practical and tuning-free method to significantly improve LLMs’ reliability in applications requiring strategic randomness or creativity. By leveraging the LLM’s own reasoning capabilities to generate and process an internal random seed, SSoT helps models overcome inherent biases and produce more faithful probabilistic samples and diverse responses. This advancement opens new possibilities for LLMs in areas like human-behavior simulations, content diversification, and complex game-playing, making them more versatile and trustworthy tools.


