Kaggle Benchmarks क्या है?
Kaggle Benchmarks Kaggle की Python लाइब्रेरी, जिससे model evaluations को डेकोरेटेड फ़ंक्शन के रूप में लिखा जाता है: model को प्रॉम्प्ट करें, उसके जवाब पर assert करें, और रन को Kaggle leaderboard पर प्रकाशित करें. यह Evaluation & Production Ops टूल्स की Benchmark Harnesses श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और Apache-2.0 लाइसेंस के तहत है।
सारांश
Kaggle Benchmarks एक Python लाइब्रेरी है, जिससे आप अपने खुद परिभाषित किए गए tasks पर AI models का मूल्यांकन कर सकते हैं। Benchmark एक सामान्य फ़ंक्शन होता है, जिस पर `@kbench.task` डेकोरेटर लगा होता है: यह एक `llm` हैंडल लेता है, उसे प्रॉम्प्ट करता है, और फिर लाइब्रेरी के assertion set से जवाब पर assert करता है। इस तरीके से evaluation कोड की तरह पढ़ने में आसान रहता है और डेटा की तरह दोहराने योग्य (reproducible) भी: हर रन में सटीक इनपुट, आउटपुट और model interactions सहेजे जाते हैं, ताकि बाद में उनकी समीक्षा की जा सके।
यह उन evaluations के लिए बना है जो सिर्फ़ string matching से आगे जाते हैं। Models को tools दिए जा सकते हैं, जिनमें एक built-in Python interpreter भी शामिल है जो code चलाता है; inputs images, audio या video हो सकते हैं; outputs free text की जगह `dataclass` या Pydantic objects के रूप में माँगे जा सकते हैं; और किसी task को पूरे dataset पर चलाया जा सकता है, जैसे pandas DataFrame पर, ताकि एक verdict की जगह aggregate metrics मिलें। Assertion set बढ़ाया जा सकता है, इसलिए task-specific check भी बस एक और फ़ंक्शन है।
इसका मुख्य ठिकाना Kaggle notebook है, जहाँ लाइब्रेरी और उसकी dependencies पहले से इंस्टॉल होती हैं, और हर task run एक task file और run files जारी करता है, जिनसे benchmark entity और उसका सार्वजनिक leaderboard बनता है। जून 2026 से वही authoring loop स्थानीय रूप से भी काम करता है: Kaggle CLI पर एक `benchmarks` subcommand, `kaggle-benchmarks` SDK और एक `write-kaggle-benchmarks` agent skill आपको VS Code, Cursor या Antigravity से evaluations लिखने, push करने और चलाने देते हैं। यह लाइब्रेरी Apache-2.0 लाइसेंस के तहत है।
यह क्या करता है
- `@kbench.task` डेकोरेटर से एक सामान्य Python फ़ंक्शन के रूप में evaluation परिभाषित करें
- Task-specific correctness checks के लिए अपने खुद के checks लिखने की क्षमता के साथ-साथ रिच built-in assertions
- Structured और multimodal I/O: dataclass या Pydantic outputs, और image, audio या video inputs
- Tool use, जिसमें एक built-in Python interpreter शामिल है, जिससे model code चला सकता है
- Dataset evaluation: किसी task को pandas DataFrame पर चलाएं, ताकि एक ही result की जगह aggregate performance मिले
- Kaggle notebook में चलने वाले runs task और run files जारी करते हैं, जिनसे सार्वजनिक Kaggle leaderboard बनता है
शुरू करें
सबसे आसान रास्ता Kaggle notebook है, जहाँ कुछ भी इंस्टॉल करने की ज़रूरत नहीं होती; अपने editor में tasks विकसित करने के लिए स्थानीय authoring भी समर्थित है।
Kaggle notebook में शुरू करें
कोई इंस्टॉलेशन ज़रूरी नहीं है। नया benchmark task बनाने पर एक notebook खुलता है, जिसमें लाइब्रेरी और उसकी dependencies पहले से इंस्टॉल होती हैं।
https://www.kaggle.com/benchmarks/tasks/newएक task लिखें
एक फ़ंक्शन को decorate करें, llm handle के ज़रिए model को प्रॉम्प्ट करें, फिर जवाब पर assert करें। Expectation string वही है जो assertion फ़ेल होने पर दिखती है।
import kaggle_benchmarks as kbench
@kbench.task(name="simple_riddle")
def solve_riddle(llm, riddle: str, answer: str):
"""Asks a riddle and checks for a keyword in the answer."""
response = llm.prompt(riddle)
kbench.assertions.assert_contains_regex(
f"(?i){answer}", response, expectation="LLM should give the right answer."
)इसे चलाएं
Decorated task पर model handle और task के arguments के साथ .run() कॉल करें।
solve_riddle.run(
llm=kbench.llm,
riddle="What gets wetter as it dries?",
answer="Towel",
)स्थानीय विकास सेटअप करें
Python 3.11+, git और uv चाहिए। Repository clone करें, virtualenv बनाएं और उसे editable मोड में इंस्टॉल करें। स्थानीय रन के लिए .env फ़ाइल में MODEL_PROXY_URL और MODEL_PROXY_API_KEY चाहिए; iterate करते समय लागत घटाने के लिए HTTP response caching चालू की जा सकती है।
git clone https://github.com/Kaggle/kaggle-benchmarks.git
cd kaggle-benchmarks
uv venv
source .venv/bin/activate
uv pip install -e .
export ENABLE_LOCAL_CACHING=trueकोई coding agent task लिखे
Kaggle इसी काम के लिए एक agent skill प्रकाशित करता है; README इसे task लिखने और उसे Kaggle पर चलाने का सबसे तेज़ तरीका बताता है।
https://github.com/Kaggle/kaggle-skills/blob/main/write-kaggle-benchmarks/SKILL.mdकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- अपने काम के लिए domain-specific evaluation बनाएं, बजाय इसके कि ऐसे public benchmark पर निर्भर रहें जो उससे मेल न खाता हो
- एक ही प्रॉम्प्ट, tools और assertions के साथ कई models की एक ही task पर तुलना करें
- Built-in Python interpreter देकर सिर्फ़ text output नहीं, बल्कि tool use और code execution भी परखें
- पूरे dataset पर किसी model का score निकालें और नतीजा Kaggle leaderboard के रूप में प्रकाशित करें
How Kaggle Benchmarks compares
Kaggle Benchmarks alongside other open-source benchmark harnesses tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| LM Evaluation Harness | ★ 14.6k | एक ही कमांड से 60+ अकादमिक benchmarks पर language models चलाएँ |
| OpenCompass | ★ 7.7k | 100+ datasets पर LLM बेंचमार्क करने का वन-स्टॉप प्लेटफ़ॉर्म |
| SWE-bench | ★ 6.3k | जाँचें कि भाषा मॉडल असली GitHub issues हल कर सकते हैं या नहीं |
| simple-evals | ★ 4.7k | OpenAI का हल्का हार्नेस, जिससे मानक zero-shot, chain-of-thought LLM benchmarks चलाए जा सकें |
| lmms-eval | ★ 4.5k | image, video और audio में बड़े मल्टीमोडल मॉडल्स के लिए reproducible evaluation suite |
| AgentBench | ★ 3.8k | ऑपरेटिंग सिस्टम, डेटाबेस, वेब और गेम्स में LLM को एजेंट के रूप में benchmark करें |
| EvalScope | ★ 3.8k | LLMs, VLMs, embeddings और AIGC models के लिए एक-कमांड वाला benchmark harness |
| Kaggle Benchmarks | ★ 209 | Kaggle की Python लाइब्रेरी, जिससे model evaluations को डेकोरेटेड फ़ंक्शन के रूप में लिखा जाता है: model को प्रॉम्प्ट करें, उसके जवाब पर assert करें, और रन को Kaggle leaderboard पर प्रकाशित करें |
