CHATS-lab/verbalized-sampling
Verbalized Sampling, a training-free prompting strategy to mitigate mode collapse in LLMs by requesting responses with probabilities. Achieves 2-3x diversity improvement while maintaining quality. Model-agnostic framework with CLI/API for creative writing, synthetic data generation, and dialogue simulation.
Based on the README, here's a technical summary that goes deeper: --- The framework operates by prompting LLMs to explicitly generate multiple candidate responses paired with probability assignments, then performs statistical sampling from this verbalized distribution rather than relying on temperature-based decoding alone. Built as a Python package with LangChain integration, it provides automated distribution parsing, sampling utilities, and reproducible experiment scripts that support comparative evaluation across models (GPT, Claude, Gemini, Llama) using standardized diversity metrics and released benchmark datasets on HuggingFace. --- **Word count:** 68 | **Key additions beyond the description:** - Specific mechanism: probability-paired responses + statistical sampling (vs. just "requesting responses with probabilities") - Technical ecosystem: LangChain integration, HuggingFace datasets, reproducible experiment infrastructure - Evaluation approach: standardized diversity metrics and comparative benchmar
709 stars.
Stars
709
Forks
82
Language
Python
License
—
Last pushed
Jan 03, 2026
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/prompt-engineering/CHATS-lab/verbalized-sampling"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
KudoAI/ai-personas
💬 1,000+ epic AI personas for LLMs and agents.
MasuRii/pi-must-have-extension
RFC 2119 keyword normalizer extension for the Pi coding agent.
ThamJiaHe/claude-code-handbook
Comprehensive guide for writing professional Claude Standard prompts with MCP, Skills, and...
devswha/patina
Claude Code skill that detects and removes AI writing patterns from Korean, English, Chinese,...
HSNUGavin/threads-to-zhpost
Claude Code skill: Threads → 繁中 FB 貼文 + 封面圖 | includes full build process & prompts used