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
neopen/video-shot-agent
剧本→分镜→片段→prompt | 基于 LangGraph+LLM,自动解析任意格式剧本,生成 Sora/Veo/Runway...
KudoAI/ai-personas
💬 1,000+ epic AI personas for LLMs and agents.
ThamJiaHe/claude-code-handbook
Comprehensive guide for writing professional Claude Standard prompts with MCP, Skills, and...
MasuRii/pi-must-have-extension
RFC 2119 keyword normalizer extension for the Pi coding agent.
MushroomFleet/DJZ-Nodes
Custom nodes for ComfyUI — video effects, batch processing, prompt tools, image manipulation &...