agentleFS
eristoddleeristoddle/agent-skills/skills/verbalized-sampling/SKILL.md

verbalized-sampling

Skill4 starsChanged 9 days agoMITView on GitHub

Generate diverse, high-quality responses by producing multiple candidates with probability distributions instead of a single answer. Use when the user asks for brainstorming, creative options, diverse alternatives, original ideas, or when you detect a task that benefits from exploring multiple approaches before committing to one. Also use when explicitly asked for 'verbalized sampling', 'diverse candidates', 'tail sampling', or 'show me options'. Covers creative writing, synthetic data, dialogue simulation, open-ended QA, and any task where mode collapse (repetitive/predictable outputs) is a risk.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. gnurio/nurijanian-skills★ 112same 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 repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After generating candidates internally, select using one of these strategies:

    line 46
  2. Distinctive:

    When running VS transparently (user asked for options): show all candidates with brief probability context.

    line 58
  3. Distinctive:

    When running VS internally (auto-detected creative task): present only the selected output.

    line 60
  4. Distinctive:

    k=5: Default, good balance of diversity and efficiency

    line 65
  5. Distinctive:

    tau=0.10: Default tail threshold

    line 67
  6. Distinctive:

    Use fork mode when the user wants a single polished answer but the task benefits from internal exploration.

    line 80

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verbalized Sampling

Training-free prompting technique that mitigates LLM mode collapse by generating multiple candidate responses with explicit probability assignments, then selecting from the distribution. Based on the VS research paper — achieves 1.6-2.1x diversity increase over direct prompting.

When to Apply Automatically

Apply VS internally (without the user asking) when detecting:

  • Brainstorming or ideation requests
  • "Give me something original/creative/unexpected"
  • Tasks where the first instinct feels generic or predictable
  • Requests for multiple options or alternatives

Core Workflow

1. Generate Candidates

Internally generate k candidate responses using this structure:

<response>
<text>Candidate response content.</text>
<probability>0.07</probability>
</response>

Default parameters: k=5 candidates, probability threshold tau=0.10.

2. Choose a Mode

ModeInstructionBest for
StandardGenerate k responses with probabilitiesGeneral diversity
TailAdd: "probability of each response is less than 0.10"Maximum creativity, breaking patterns
CoTPrepend: "Think step-by-step about different approaches first"Analytical/reasoning tasks
MultiRequest additional distinct candidates in follow-up turnsExhaustive exploration

Default to Tail mode for creative tasks. Use Standard for analytical tasks. See references/prompt-templates.md for exact prompt text.

3. Select Output

After generating candidates internally, select using one of these strategies:

  • Present all options — Show the user all k candidates when they want to choose (human-in-the-loop)
  • Weighted random — Pick one, weighted by probabilities (default for creative tasks)
  • Best-of-k — Pick highest probability (default for factual/analytical tasks)
  • Tail pick — Pick lowest probability for maximum surprise
  • Merge — Synthesize best elements from multiple candidates

See references/selection-strategies.md for detailed guidance on each strategy.

4. Present the Result

When running VS transparently (user asked for options): show all candidates with brief probability context.

When running VS internally (auto-detected creative task): present only the selected output. Optionally mention that you explored multiple approaches.

Parameter Tuning

  • k=3: Simple tasks, quick options
  • k=5: Default, good balance of diversity and efficiency
  • k=7-10: Maximum diversity, brainstorming sessions
  • tau=0.10: Default tail threshold
  • tau=0.05: Extreme divergence, very unconventional outputs
  • tau=0.20: Mild diversity, closer to standard generation

Fork Mode (Advanced)

For complex agentic workflows, execute VS in a "context fork":

  1. Spawn a separate reasoning path
  2. Generate k candidates with probabilities
  3. Evaluate candidates against task requirements internally
  4. Return only the best candidate to the main conversation

Use fork mode when the user wants a single polished answer but the task benefits from internal exploration. Do not show the fork process unless asked.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.