verbalized-sampling
Skill112 starsChanged 7 months agoMITView on GitHub
Generate diverse outputs by prompting for a probability distribution instead of a single response. Implements Verbalized Sampling (VS) from Zhang et al. 2025 — a training-free technique that counteracts LLM mode collapse caused by typicality bias in alignment data.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- eristoddle/agent-skillstheir own version, first seen Nov 6, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- eristoddle/agent-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- adversarial-roleplaySkill
- blind-spot-scanSkill
- corporate-misalignment-finderSkill
- decision-auditSkill
- focal-point-finderSkill
- make-requirements-greatSkill
- orchestrate-pm-alignmentSkill
- reasons-people-buySkill
- rulebook-for-argumentsSkill
- situation-retrospectiveSkill
- team-perspective-revealSkill
- tech-sensemakingSkill
- vibe-code-leaf-finderSkill
- workflow-trellisSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
VS-CoT: add "reasoning": "step-by-step thought process" as the first field in each dict.
- Distinctive: line 63
If you cannot answer Step 2 without asking the user, ask first before generating.
- Very specific: line 67
After generating VS output, run a self-critique pass before presenting results.
- Distinctive: line 86
Use when outputs feed into downstream processing, storage, or evaluation
- Distinctive: line 133
If the highest and lowest probabilities in your output are within 3× of each other (e.g., all between 0.05–0.09), you're likely in an …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verbalized Sampling
Universal VS Template
[Task description with rich context]
Generate {k} responses. Return in JSON format with key "{output_key}" (list of dicts). Each dict:
• text: [output specification]
• probability: estimated probability (0.0–1.0) of this response given the input
{Distribution constraint}
Output ONLY the JSON object.Distribution constraints — pick one:
Sample from the full distribution.— balanced, moderate diversitySample from the tails of the distribution, with each probability below 0.10.— high diversitySample from the tails of the distribution, with each probability below 0.01.— maximum diversity
Variant Selection
| Variant | When to use | Trade-off |
| VS-Standard | Straightforward tasks, speed priority | Best balance |
| VS-CoT | Complex tasks needing quality + diversity | Slight diversity cost, higher quality |
| VS-Multi | Maximum diversity, token cost acceptable | Best diversity, 2× token cost |
VS-CoT: add "reasoning": "step-by-step thought process" as the first field in each dict.
VS-Multi: Turn 1 generates k/2 responses. Turn 2: "Generate k alternative responses to the original prompt — do not repeat ideas from Turn 1."
Context-First Phase (run before VS)
VS outputs are only as good as the problem framing going in. Before constructing the VS prompt:
Step 1 — Decompose into subproblems: Break the task into 3–5 distinct subproblems or angles. Example: "improve sales for a B2B SaaS" → (1) acquisition channels, (2) conversion from trial, (3) pricing/packaging, (4) referral/word-of-mouth, (5) partnerships.
Step 2 — Load context for each subproblem:
- What are the real constraints? (time, budget, team size, org politics, market saturation)
- What do others in this space actually do? (base rates — what approaches are common, what have failed)
- What has already been tried? (avoid re-suggesting)
Step 3 — Inject context into the VS prompt: Compress answers from Step 2 into the prompt preamble. Name the subproblems as explicit coverage requirements: "Cover at least one idea addressing each of: [subproblem 1], [subproblem 2], ..."
If you cannot answer Step 2 without asking the user, ask first before generating. Generic outputs caused by thin context are the primary failure mode for brainstorming tasks (FM-2).
Critique-and-Improve Loop (run after VS, before presenting)
After generating VS output, run a self-critique pass before presenting results. See references/critique-framework.md for the full 6-dimension framework and prompt templates.
Quick pass: For each output item, check:
- Is this naive/obvious? (would it appear in a top-10 listicle?)
- Is this actionable? (could execution start Monday without further research?)
- Does this require magical thinking? (assumes steps will "just work" with no mechanism)
- Does this ignore base rates? (approaches with known low success rates presented as good bets)
If 2+ items fail 2+ checks:
- Flag the specific failures with reasons
- Generate 2–3 improved variants that directly address the flagged weaknesses
- Present: original outputs + critique summary + improved variants
For automated quality scoring of VS outputs, see references/judges.md for LLM-as-Judge prompts.
Output Mode Selection
JSON mode (default for agent pipelines — pipe-able, machine-readable):
- Use when outputs feed into downstream processing, storage, or evaluation
- Return raw JSON as-is
Readable mode (in-chat or external sharing):
- Format using
scripts/format_vs_output.py(see below), or render inline as numbered markdown - Group by diversity tier: High (p < 0.05), Moderate (p 0.05–0.15), Low/Common (p > 0.15)
- Show probabilities inline as
(p=0.07)
To format manually in-chat:
## High diversity (p < 0.05)
1. [text] (p=0.03)
## Moderate diversity (p 0.05–0.15)
2. [text] (p=0.08)CLI formatting: echo '<json>' | python ~/.cursor/skills/verbalized-sampling/scripts/format_vs_output.py
Probability Threshold Quick Reference
| Threshold | Use case |
| Full distribution | General brainstorm, want common + uncommon mix |
| p < 0.15 | Moderate novelty — avoids top-5 obvious answers |
| p < 0.10 | High diversity — noticeably non-obvious outputs |
| p < 0.05 | Aggressive — expect surprising, niche ideas |
| p < 0.01 | Maximum — edge cases, stress testing, adversarial |
Failure Modes (from empirical evals)
FM-1: Overfit Topic Collapse High-frequency training topics (weight loss, productivity, exercise) resist VS even at p<0.01. The tail of the model's distribution is still inside the well-known solution cluster. The paper's 1.6-2.1× diversity gains apply to creative and niche domains — not saturated self-help topics.
Mitigation: Add explicit exclusion constraints: "Exclude any idea covered in mainstream [domain] journalism. Prioritize ideas from adjacent fields or underrepresented subcultures."
FM-2: Context Starvation → Generic Gravity Thin prompt context ("Xero + retention") produces generic-category outputs even at tail sampling. The more proprietary and specific the context, the better VS performs.
Mitigation: Load rich context before the VS prompt — company stage, current channels, known constraints, target segment, what's already been tried.
FM-3: Semantic Clustering Despite Syntactic Diversity Tail sampling can produce a list that looks different but covers the same solution space. VS does not automatically cross problem-frame boundaries.
Mitigation: Name the problem frames explicitly: "Cover at least one idea from each of: distribution, pricing, community, product, and partnerships."
FM-4: Probability Spread Collapse If the highest and lowest probabilities in your output are within 3× of each other (e.g., all between 0.05–0.09), you're likely in an overfit topic and diversity is illusory.
Diagnosis signal: Good VS output has a spread of at least 5-10× between highest and lowest probability. If spread is tight, switch to FM-1/FM-2 mitigations.
Meta-Prompt: Generate a VS Prompt
I need to generate diverse {output_type} for {use_case}.
Create a Verbalized Sampling prompt that:
1. Clearly describes the task with specific context about {use_case}
2. Requests k={number} outputs in JSON format
3. Requires each output to include "text" and "probability" fields
4. Specifies a distribution constraint appropriate for the diversity level needed:
- 0.10–0.15 for moderate diversity
- 0.05–0.10 for high diversity
- 0.01–0.05 for maximum diversity
5. Ends with "Output ONLY the JSON"
6. Includes explicit problem-frame coverage if topic is likely overfitDomain Templates
See references/templates.md for ready-to-paste prompts across: creative writing, brainstorming/ideation, dialogue simulation, synthetic data, adversarial examples, open-ended QA.
When NOT to Use VS
- Single correct answer exists
- Factual lookup or retrieval
- Task requires strict format compliance
- You need one best answer, not a distribution
- Overfit topic with no rich context available (add context first, then re-evaluate)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

