Datasets:
The dataset viewer should be available soon. Please retry later.
YAML Metadata Warning:The task_categories "information-retrieval" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
GitBench (v2): Real-World GitHub Pull Request State & Security Benchmark for AI Coding Agents
GitBench (originally GitState-Bench) is an open evaluation benchmark developed by the Knot AI team (@Knot-Repo) to rigorously evaluate how AI coding assistants, code search systems, and Retrieval-Augmented Generation (RAG) engines handle temporal code evolution, obsolete baseline specifications, unmerged RFC proposals, and 12 families of production credentials.
Benchmark Motivation
Most coding benchmarks (e.g., HumanEval, MBPP, SWE-bench) evaluate whether a model can synthesize code from a static snapshot. However, in production engineering environments, developer context evolves continuously through Git commits and Pull Requests.
AI agents and vector retrieval layers regularly fail in three high-severity ways:
- Temporal Obsolescence (The "Verbose Legacy vs. Concise Update" Trap): Retrieving a verbose legacy architecture specification (
superseded_v1) instead of a concise newly merged PR (active_v2_gold) because both share $>85%$ of their domain vocabulary. - Brainstorm / Draft RFC Contamination: Treating unmerged draft RFCs or exploratory proposals (
brainstorm_unconfirmed) as authoritative production behavior. - High-Entropy Secret Leakage vs. False-Positive Over-Quarantine: Leaking unprefixed HMAC keys or authenticated database/Redis DSN URIs into prompts (
admin_secret_trap)—or conversely, falsely quarantining benign engineering notes that contain high-entropy Git commit SHAs and UUIDv4 trace IDs.
Dataset Scale & Repository Coverage
- Total Corpus Documents:
1,788(447merged active specifications,447superseded baseline specifications,447unmerged RFC/draft proposals,447multi-family runtime secret configurations) - Developer Queries:
447natural active implementation queries +447paired historical audit queries (historical_text) - Relevance Judgments (
qrels):1,788graded relevance pairs (4,023total records across splits) - 25 Sampled Repositories:
fastapi/fastapi,pydantic/pydantic,anthropics/anthropic-sdk-python,vercel/ai,encode/httpx,psf/requests,pallets/flask,tiangolo/sqlmodel,openai/openai-python,langchain-ai/langchain,run-llama/llama_index,astral-sh/uv,huggingface/transformers,vllm-project/vllm,pandas-dev/pandas,numpy/numpy,scikit-learn/scikit-learn,pytorch/pytorch,sqlalchemy/sqlalchemy,celery/celery,pytest-dev/pytest,Textualize/rich,streamlit/streamlit,gradio-app/gradio,BerriAI/litellm.
12-Family Credential & Benign High-Entropy Design
Unlike synthetic benchmarks that test only a single hardcoded token prefix (such as ghp_), GitBench v2 distributes 447 secret traps across 12 realistic credential families while embedding benign high-entropy Git commit SHAs and UUIDv4 trace identifiers into normal engineering documents:
- 50% Unprefixed High-Entropy Secrets (6 Families):
WEBHOOK_SIGNING_SECRET,JWT_HS256_PRIVATE_KEY,MASTER_ENCRYPTION_KEY,OAUTH_CLIENT_SECRET,INTERNAL_AUTH_TOKEN,SESSION_HMAC_SECRET($H \ge 3.85\text{ bits/char}$, no vendor prefix—missed completely by prefix regexes). - 25% Authenticated Service & Database DSN URIs (3 Families): PostgreSQL (
postgresql://...), Redis Cluster (redis://:...), and AMQP/Celery (amqp://...) connection strings with high-entropy embedded passwords ($H \ge 3.10\text{ bits/char}$). - 25% Vendor-Prefixed Tokens & Private Key Headers (3 Families): AWS (
AKIA...), Anthropic (sk-ant-...), andOPENSSH PRIVATE KEYblocks.
Empirical Baseline Results (all-MiniLM-L6-v2, 384D)
| Architecture | Scoped Active v2 (Invariant) |
Global Multi-PR Top-1 | Historical Audit Recall@1 | Credential Leak @ 5 | Benign Code False Quarantines | In-Memory Latency |
|---|---|---|---|---|---|---|
| Standard Vector RAG (HNSW Cosine) | 60.2% |
56.8% |
43.0% |
65.1% |
0 / 1,341 |
0.013 ms |
| Hybrid Lexical + Vendor-Prefix Regex Only | 63.5% |
61.5% |
43.0% |
49.7% (Misses unprefixed) |
0 / 1,341 |
0.070 ms |
| Hybrid Lexical + Unconditioned Shannon Entropy | 7.6% |
8.5% |
43.0% |
1.3% |
1,020 / 1,341 (SHAs/UUIDs) |
0.068 ms |
| Knot CARMA-16 Engine + UCS Protocol | 100.0% (0 Stale/Draft) |
89.5% |
86.4% |
0.0% (12/12 Families) |
0 / 1,341 (0.0% FPR) |
0.079 ms |
Quickstart
from datasets import load_dataset
# Load GitBench v2 directly from Hugging Face (4,023 records)
corpus = load_dataset("knot-ai/gitbench", split="corpus") # 1,788 PR state documents
queries = load_dataset("knot-ai/gitbench", split="queries") # 447 active + historical queries
qrels = load_dataset("knot-ai/gitbench", split="qrels") # 1,788 TREC/BEIR relevance judgments
Citation & Attribution
@misc{knot_ai_gitbench_2026,
author = {Knot AI Team},
title = {GitBench: Evaluating Temporal Causal Freshness and Secret Containment in AI Coding Agents},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/knot-ai/gitbench}}
}
- Downloads last month
- 25