--- license: apache-2.0 task_categories: - question-answering - information-retrieval language: - en tags: - code - github - git - benchmark - coding-agents - temporal-reasoning - rag - security size_categories: - 1K85\%$ of their domain vocabulary. 2. **Brainstorm / Draft RFC Contamination:** Treating unmerged draft RFCs or exploratory proposals (`brainstorm_unconfirmed`) as authoritative production behavior. 3. **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` (`447` merged active specifications, `447` superseded baseline specifications, `447` unmerged RFC/draft proposals, `447` multi-family runtime secret configurations) - **Developer Queries:** `447` natural active implementation queries + `447` paired historical audit queries (`historical_text`) - **Relevance Judgments (`qrels`):** `1,788` graded relevance pairs (`4,023` total 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-...`), and `OPENSSH PRIVATE KEY` blocks. --- ## 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 ```python 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 ```bibtex @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}} } ```