PersianEval
The first serious open-source benchmark for evaluating LLMs on Persian (Farsi). اولین بنچمارک متنبازِ جدی برای ارزیابی مدلهای زبانی فارسی
English · فارسی · Leaderboard
English
Why this project matters
Persian is spoken by more than 100 million people, yet the LLM ecosystem has almost no trustworthy way to measure Persian capability. Popular leaderboards barely cover Farsi, translated datasets are often machine-translated and leaked into training data, and the challenges that are uniquely Persian — Arabic/Persian homoglyphs (ي/ی، ك/ک), half-space rules (نیمفاصله), the cultural commons of Iran — are invisible to most benchmarks. PersianEval fills that gap with 8 frozen, checksummed tasks, a reproducible async evaluation harness, and a weekly-updated leaderboard that anyone can audit. Everything — code, data, prompts, judge prompts, scores — is Apache-2.0 and open.
Tasks (8)
| Task | What it measures | Scoring | Min samples |
|---|---|---|---|
reasoning |
Multi-step arithmetic & logic in Persian (GSM8K-style, nativized) | exact | 200 |
reading_comprehension |
Passage + short literal questions | fuzzy ≥ 0.85 | 200 |
spelling |
ي/ی، ك/ك confusion, Arabic digits, ZWNJ (نیمفاصله) | fuzzy ≥ 0.90 | 200 |
cultural_knowledge |
Iranian history, literature, geography (MCQ) | exact | 200 |
translation_fa_en |
FA↔EN translation, 4 registers | LLM judge | 200 |
rag_faithfulness |
Is the answer grounded in the passage? (RAG companion) | exact | 200 |
bias_detection |
Stereotype generalization about Iranian groups & gender | LLM judge | 200 |
code_with_persian_comments |
Complete Python functions from Persian specs | LLM judge | 200 |
Every task ships exactly 200 frozen, checksummed samples in v0.1.0 (1,600 in total) — see data provenance for per-task counts and sources.
Quickstart
pip install persianeval
export OPENAI_API_KEY=sk-... # or ANTHROPIC_API_KEY / local Ollama
persianeval tasks # list the 8 tasks
persianeval run --task reasoning --provider openai --model gpt-4o-mini --rpm 60
persianeval leaderboard --results-dir results --out leaderboard # static site
Every run is reproducible: fixed seed (default 42), temperature 0, responses cached per
provider+model+task+seed+prompt in .persianeval_cache/. Cost is controlled with
--max-tokens, --max-requests-per-minute and --max-requests.
Sample CLI output
$ persianeval run --task reasoning --provider dummy --model demo --limit 5
task=reasoning provider=dummy model=demo seed=42 temperature=0.0 concurrency=4
--------------------------------------------------------
accuracy : 0.00% mean score: 0.000
items : 5 (0 served from cache)
results : results/reasoning__demo.json
results : results/reasoning__demo.parquet
Results are written with an explicit pydantic schema (RunResult, schema version 1.0) to
both JSON and Parquet.
Leaderboard
The leaderboard is a dependency-free static
page (sortable table + radar chart) regenerated every Monday by
.github/workflows/leaderboard.yml, which evaluates
a rotating seeded sample of open-source models (Qwen 2.5, Llama 3.1, Gemma 2, Aya Expanse)
through local Ollama runners and publishes the page with GitHub Pages. Raw results are
linked as data.json artifacts.
Adding a task in 15 minutes
Implement AbstractTask, ship a JSONL file with {"id","prompt","expected","metadata"},
register nothing — the entry-point group persianeval.tasks picks external packages up
automatically. Full walkthrough: docs/adding_a_task.md.
Contributing
PRs welcome — data additions must carry a documented source and a permissive license;
code must pass ruff, mypy --strict and pytest ≥ 80% coverage (CI enforces all
three). See CONTRIBUTING.md.
License & citation
Apache-2.0 — free for research and commercial use, including data reuse. If you use
PersianEval, please cite (see CITATION.cff):
@software{persianeval2026,
title = {PersianEval: An Open-Source Benchmark for Persian LLMs},
author = {PersianEval Contributors},
year = {2026},
url = {https://github.com/Abolfazlrwm/persianeval},
version= {v0.1.0}
}
فارسی
چرا این پروژه مهم است
بیش از ۱۰۰ میلیون نفر فارسیزباناند، اما اکوسیستم مدلهای زبانی تقریباً هیچ راه قابل اعتمادی برای سنجش توانایی فارسی ندارد. لیدربوردهای معروف فارسی را پوشش نمیدهند، دیتاستهای ترجمهشده اغلب با ماشین ترجمه شدهاند و احتمالاً به دادههای آموزشی نشت کردهاند، و چالشهای «تکفارسی» — همگردانی عربی/فارسی (ي/ی، ك/ک)، قواعد نیمفاصله، دانش فرهنگی ایران — در بیشتر بنچمارکها دیده نمیشوند. PersianEval این خلأ را پر میکند: ۸ تسک فریزشده و checksumدار، یک هارنس ارزیابی async و تکرارپذیر، و لیدربوردی که هر هفته بهروز میشود و هر کسی میتواند آن را ممیزی کند. همهچیز — کد، داده، پرامپت، پرسشهای داور و نتایج — با لایسنس Apache-2.0 باز است.
تسکها (۸ تسک)
| تسک | چه چیزی را میسنجد | امتیازدهی | حداقل نمونه |
|---|---|---|---|
reasoning |
استدلال چندمرحلهای ریاضی و منطقی به فارسی | exact | ۲۰۰ |
reading_comprehension |
متن + پرسش کوتاه مستقیم | fuzzy ≥ ۰٫۸۵ | ۲۰۰ |
spelling |
همگردانی ي/ی و ك/ک، ارقام عربی، نیمفاصله | fuzzy ≥ ۰٫۹۰ | ۲۰۰ |
cultural_knowledge |
تاریخ، ادبیات و جغرافیای ایران (چهارگزینهای) | exact | ۲۰۰ |
translation_fa_en |
ترجمهٔ دوسویه در چهار سبک | داور LLM | ۲۰۰ |
rag_faithfulness |
آیا پاسخ به متن وفادار است؟ (مکمل RAG فارسی) | exact | ۲۰۰ |
bias_detection |
تعمیم کلیشه دربارهٔ گروههای ایرانی و جنسیت | داور LLM | ۲۰۰ |
code_with_persian_comments |
تکمیل تابع پایتون از توضیح فارسی | داور LLM | ۲۰۰ |
هر ۸ تسک در نسخهٔ 0.1.0 دقیقاً ۲۰۰ نمونهٔ فریزشده و checksumدار دارند (مجموعاً ۱۶۰۰ نمونه) — شمارش دقیق و منبع هر تسک در مستند دادهها آمده است.
شروع سریع
pip install persianeval
export OPENAI_API_KEY=sk-... # یا ANTHROPIC_API_KEY / مدل محلی با Ollama
persianeval tasks # فهرست ۸ تسک
persianeval run --task reasoning --provider openai --model gpt-4o-mini --rpm 60
persianeval leaderboard --results-dir results --out leaderboard # صفحهٔ استاتیک
هر اجرا تکرارپذیر است: seed ثابت (پیشفرض ۴۲)، دمای صفر، و کشِ پاسخ بهازای
provider+model+task+seed+prompt در .persianeval_cache/. هزینه با --max-tokens،
--max-requests-per-minute و --max-requests کنترل میشود.
خروجی نمونهٔ CLI
$ persianeval run --task reasoning --provider dummy --model demo --limit 5
task=reasoning provider=dummy model=demo seed=42 temperature=0.0 concurrency=4
--------------------------------------------------------
accuracy : 0.00% mean score: 0.000
items : 5 (0 served from cache)
results : results/reasoning__demo.json
results : results/reasoning__demo.parquet
نتایج با اسکیمای صریح pydantic (RunResult، نسخهٔ اسکیما ۱٫۰) در هر دو قالب JSON و
Parquet نوشته میشوند.
لیدربورد
لیدربورد صفحهای استاتیک و بدون وابستگی است
(جدول قابل مرتبسازی + نمودار رادار) که هر دوشنبه توسط
.github/workflows/leaderboard.yml بازتولید میشود؛
این Action نمونهای چرخشی و seedدار از مدلهای اپنسورس (Qwen 2.5، Llama 3.1، Gemma 2 و
Aya Expanse) را با Ollama ارزیابی و صفحه را با GitHub Pages منتشر میکند. نتایج خام بهصورت
data.json لینک شدهاند.
اضافهکردن تسک جدید در ۱۵ دقیقه
کافی است AbstractTask را پیاده کنید و یک فایل JSONL با اسکیمای
{"id","prompt","expected","metadata"} اضافه کنید؛ پکیجهای بیرونی هم بهصورت خودکار از
طریق گروه entry-point با نام persianeval.tasks شناسایی میشوند. راهنمای کامل:
docs/adding_a_task.md.
مشارکت
PR خوشآمدید — افزودههای داده باید منبع مستند و لایسنس آزاد داشته باشند؛ کد باید
ruff، mypy --strict و پوشش تست pytest ≥ ۸۰٪ را پاس کند (CI هر سه را اجباری میکند).
بیشتر بخوانید: CONTRIBUTING.md.
لایسنس و ارجاع
Apache-2.0 — آزاد برای پژوهش و استفادهٔ تجاری، شامل بازاستفادهٔ دادهها. اگر از PersianEval
استفاده میکنید، لطفاً ارجاع دهید (بخش بالا / CITATION.cff).
Metadata
Release files for persianeval 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| persianeval-0.1.1.tar.gz | 275.6 kB | With provenance | Details for persianeval-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| persianeval-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for persianeval-0.1.1-py3-none-any.whl |
Total release size: 407.6 kB
Release files / persianeval-0.1.1.tar.gz
| Download URL | persianeval-0.1.1.tar.gz |
|---|---|
| Size | 275.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbfe3481aaa39b5d6e214965e516a0be93a9646e01604b5a3a2ec5793006c87f
|
|
BLAKE2b-256 checksum How to use checksums |
ac438a9e27758a7f63de8523a39d05a89519055057d467ef584c84773c61c3ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / persianeval-0.1.1-py3-none-any.whl
| Download URL | persianeval-0.1.1-py3-none-any.whl |
|---|---|
| Size | 131.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c5d524f90bdc8d3b3c040c975f58ccf5e215559142d3844d30879649c4ff489
|
|
BLAKE2b-256 checksum How to use checksums |
00fd0071f1ca39c4b85c507cce90bc94fe6d41c9e34fc2c25d94e7a6ddd47935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for persianeval 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for persianeval-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.