Dynamic Evaluation Set Generation with Large Language Models
Project description
YourBench: A Dynamic Benchmark Generation Framework
[GitHub] · [Dataset] · [Documentation] · [Paper]
YourBench is an open-source framework for generating domain-specific benchmarks in a zero-shot manner. It aims to keep your large language models on their toes—even as new data sources, domains, and knowledge demands evolve.
Highlights:
- Dynamic Benchmark Generation: Produce diverse, up-to-date questions from real-world source documents (PDF, Word, HTML, even multimedia).
- Scalable & Structured: Seamlessly handles ingestion, summarization, and multi-hop chunking for large or specialized datasets.
- Zero-Shot Focus: Emulates real-world usage scenarios by creating fresh tasks that guard against memorized knowledge.
- Extensible: Out-of-the-box pipeline stages (ingestion, summarization, question generation), plus an easy plugin mechanism to accommodate custom models or domain constraints.
Quick Start (Alpha)
# 1. Clone the repo
git clone https://github.com/huggingface/yourbench.git
cd yourbench
# Use uv to install the dependencies
# pip install uv # if you do not have uv already
uv venv
source .venv/bin/activate
uv sync
uv pip install -e .
# 3. Get a key from https://openrouter.ai/ and add it to the .env file (or make your own config with a different model!)
touch .env
echo "HF_TOKEN=<your_huggingface_token>" >> .env
echo "HF_ORGANIZATION=<your_HF_username_or_organization>" >> .env
# 4. Run the pipeline with an example config
yourbench run --config example/configs/example.yaml
Note: The above instructions are a work-in-progress, and more comprehensive usage info will be provided soon.
Process Flow
Key Features
-
Automated Benchmark Generation
Generate question-answer pairs that test LLMs on specific domains or knowledge slices, derived directly from your raw documents. -
Flexible Pipeline
Each stage (ingestion, summarization, chunking, multi-/single-hop QG, deduplication) can be enabled or disabled via YAML config. Fine-grained control allows minimal or comprehensive runs. -
Robust Config System
A single YAML config controls model roles, data paths, chunking parameters, question generation instructions, deduplication thresholds, etc. -
Multi-Model Ensemble Support
Use different LLMs for ingestion, summarization, question generation, or answering. This fosters broader coverage and question style diversity. -
Deduplication & Quality Filtering
Automatic grouping of near-duplicate questions to prune and keep a curated set. -
Extensive Logging & Analysis
Built-in modules measure dataset coverage, question distribution, difficulty metrics, and more. -
Public or Private
Optionally push ingested or generated data to the Hugging Face Hub or keep it local. -
Extensible
Each pipeline step is modular. Easily add custom question-generation prompts, chunking logic, or domain-specific expansions.
Core Concepts & Workflow
YourBench follows a multi-stage approach:
-
Document Ingestion
Convert PDFs, HTML, Word, or text into a standardized Markdown format. -
Summarization
Generate a concise "global summary" for each document, using a designated summarization LLM. -
Chunking
Split or chunk documents (and optionally combine multiple smaller segments) based on text similarity or length constraints. -
Question Generation
- Single-Shot: Create straightforward, single-chunk questions.
- Multi-Hop: Combine multiple chunks to produce more complex, integrative questions.
-
Deduplication
Remove or group near-duplicate questions across your dataset using embedding-based similarity. -
Analysis
Evaluate question distribution, difficulty, coverage, or run custom analyses. -
Export
The resulting question sets can be stored locally or uploaded as a new dataset on the Hugging Face Hub.
🧰 Development
We use:
🚀 Try YourBench on Hugging Face
To test YourBench on your own documents:
- Use the Demo Space to generate a dataset and leaderboard in one click – entirely free
- Use the Advanced Space for full control over the pipeline, with custom configs and your own inference
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Install development dependencies
- Make your changes
- Run tests and ensure code style compliance
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
🙏 Acknowledgments
- Sentence Transformers for semantic embeddings
- Hugging Face for dataset infrastructure
Citation
If YourBench is helpful to you, please cite!:
@misc{shashidhar2025yourbencheasycustomevaluation,
title={YourBench: Easy Custom Evaluation Sets for Everyone},
author={Sumuk Shashidhar and Clémentine Fourrier and Alina Lozovskia and Thomas Wolf and Gokhan Tur and Dilek Hakkani-Tür},
year={2025},
eprint={2504.01833},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2504.01833},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yourbench-0.3.1.tar.gz.
File metadata
- Download URL: yourbench-0.3.1.tar.gz
- Upload date:
- Size: 62.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
792a495d81fa6288974ce382e3e7270a302f52f31691b16168600c4e8c2d7f9b
|
|
| MD5 |
a71c15f00e02bd00a49a755a4d3d0174
|
|
| BLAKE2b-256 |
2d21e345965a376ba463d338ca93c58400ebcfdbdb2be10b888c484895b1213f
|
Provenance
The following attestation bundles were made for yourbench-0.3.1.tar.gz:
Publisher:
python-publish.yml on huggingface/yourbench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yourbench-0.3.1.tar.gz -
Subject digest:
792a495d81fa6288974ce382e3e7270a302f52f31691b16168600c4e8c2d7f9b - Sigstore transparency entry: 214048083
- Sigstore integration time:
-
Permalink:
huggingface/yourbench@dd62da907df1b310989d9f77b60c4dced72f18bc -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/huggingface
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dd62da907df1b310989d9f77b60c4dced72f18bc -
Trigger Event:
release
-
Statement type:
File details
Details for the file yourbench-0.3.1-py3-none-any.whl.
File metadata
- Download URL: yourbench-0.3.1-py3-none-any.whl
- Upload date:
- Size: 69.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5628117322dbbb35861f63a4e097765a1be7b58be9e01c10348434e0d810a96b
|
|
| MD5 |
eaa4f659cc1072401f47561128ba1658
|
|
| BLAKE2b-256 |
486bd13a40ce09f69f8548e2266bcd40ae147a88791a0c7a6db81d61910adf3b
|
Provenance
The following attestation bundles were made for yourbench-0.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on huggingface/yourbench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yourbench-0.3.1-py3-none-any.whl -
Subject digest:
5628117322dbbb35861f63a4e097765a1be7b58be9e01c10348434e0d810a96b - Sigstore transparency entry: 214048092
- Sigstore integration time:
-
Permalink:
huggingface/yourbench@dd62da907df1b310989d9f77b60c4dced72f18bc -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/huggingface
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dd62da907df1b310989d9f77b60c4dced72f18bc -
Trigger Event:
release
-
Statement type: