| name | string-seed-of-thought |
| description | Use when designing or evaluating prompts that need distribution-faithful sampling, probabilistic instruction following, mixed-strategy actions, random-seeming choices, or more diverse open-ended LLM outputs using String Seed of Thought prompting. |
String Seed of Thought
Use this skill to apply String Seed of Thought (SSoT), a prompt-only method from Misaki and Akiba's ICLR 2026 paper, "String Seed of Thought: Prompting LLMs for Distribution-Faithful and Diverse Generation."
SSoT is for tasks with multiple valid answers where the distribution or diversity of repeated outputs matters. Do not use it for single-answer factual, math, retrieval, or deterministic coding tasks unless the user is explicitly testing randomness.
Decision Rule
Prefer an external PRNG when exact randomness, auditability, security, fairness, or legal/compliance guarantees matter. Use SSoT when the user needs a prompt-only approach, the model cannot call tools, or the goal is to improve diversity/probabilistic behavior without changing model weights or decoding controls.
Workflow
- Classify the task:
PIF: closed set of options with target probabilities.
DAG: open-ended task where repeated calls should produce varied high-quality answers.
Game: mixed-strategy choice, such as Rock-Paper-Scissors or another equilibrium policy.
Random value: integer, bucket, or synthetic randomized artifact.
- Add a seed step: require the model to generate a complex random-looking string before making stochastic choices.
- Add a mapping step: require the model to derive the final choice from the complete seed string using a deterministic operation.
- Add answer tags: put the final user-facing output in a parseable tag such as
<answer>...</answer>.
- For repeated-generation systems, evaluate empirical outputs against the target distribution or diversity metric.
Prompting Pattern
Use tags for parseability. Avoid requesting hidden chain-of-thought from agents that should not reveal private reasoning; ask for a compact derivation summary instead.
Core SSoT scaffold:
If this task requires probabilistic choice or diverse generation, first create a complex arbitrary seed string inside <random_string>...</random_string>.
Use the entire seed string to guide stochastic decisions. Derive choices from the seed with a deterministic method such as sum-mod for uniform choices or rolling-hash thresholds for weighted choices.
Provide only a concise derivation summary inside <seed_mapping>...</seed_mapping>, then put the final result inside <answer>...</answer>.
For reusable task-specific templates, read references/templates.md.
Mapping Guidance
Use simple mappings that an LLM can execute reliably:
- Uniform
n-way choice: sum character codepoints from the seed, compute sum % n, and map residues to options in a fixed order.
- Weighted categorical choice: compute a rolling hash from the seed, reduce it to a large range such as
0..9999, and compare with cumulative probability thresholds.
- Open-ended diversity: split or scan the seed to choose content dimensions such as topic, setting, tone, structure, examples, constraints, or viewpoint.
- Mixed strategies: state the target strategy, map the seed to a bucket, then choose the move for that bucket.
Keep option order explicit and stable. For weighted choices, convert probabilities to integer thresholds before sampling.
Validation
When checking whether a prompt works across repeated generations:
- Collect many independent outputs with the same user prompt.
- Parse only the final answer tag.
- Compare empirical frequencies with the target distribution using total variation distance, KL divergence, JS divergence, or a chi-square goodness-of-fit test.
- Inspect failures for direct answer bias, ignored seed, malformed tags, or inconsistent mapping.
The bundled evaluator can summarize tagged outputs:
python3 skills/string-seed-of-thought/scripts/evaluate_pif.py outputs.jsonl --target '{"Heads": 0.5, "Tails": 0.5}'
Input may be JSONL with answer or output fields, or plain text blocks containing <answer>...</answer>.
Limits
SSoT is not a substitute for cryptographic randomness or externally verifiable sampling. It works best with models capable of following multi-step instructions and executing simple arithmetic or hashing. If the model repeatedly ignores the seed, exposes excessive reasoning, or collapses to one option, simplify the mapping, increase seed length, or use an external PRNG.
Sources