aevionai's picture
Upload README.md with huggingface_hub
101f064 verified
---
license: apache-2.0
language:
- en
tags:
- rag
- code-retrieval
- verified-ai
- constitutional-halt
- bft-consensus
- aevion
size_categories:
- 10K<n<100K
task_categories:
- question-answering
- document-retrieval
---
# Aevion Codebase RAG Benchmark
**Verified structured-retrieval benchmark** extracted from a real Python codebase (968 source files, 21,149 chunks) with cryptographically signed partition proofs.
## What's in this dataset
| File | Description |
|------|-------------|
| `codebase_corpus.jsonl` | 21,149 Python code chunks with 6-field structural metadata |
| `codebase_queries.jsonl` | 300 enterprise query-decomposition pairs |
| `partition_proofs.jsonl` | XGML-signed proof bundles per query |
| `benchmark_results.csv` | Precision/recall/F1 per retrieval method (60 eval queries) |
| `benchmark_summary.json` | Aggregate metrics and auto-tuning parameters |
| `tuning_summary.json` | Grid-search results across 10K synthetic docs |
## Corpus Schema
Each chunk in `codebase_corpus.jsonl` has:
```json
{
"doc_id": "chunk_000000",
"text": "module.ClassName (path/to/file.py:20)",
"layer": "core",
"module": "verification",
"function_type": "class",
"keyword": "hash",
"complexity": "simple",
"has_docstring": "yes",
"source_path": "core/python/...",
"source_line": 20
}
```
## Benchmark Results (60 eval queries)
| Method | Precision | Recall | F1 | Exact Match |
|--------|-----------|--------|----|-------------|
| naive | 0.516 | 0.657 | 0.425 | 11.7% |
| instructed | 1.000 | 0.385 | 0.463 | 23.3% |
| verified_structural | 1.000 | 0.385 | 0.463 | 23.3% |
| verified_consensus | 1.000 | 0.437 | 0.503 | 31.7% |
| **verified_structural_ensemble** | **1.000** | **0.459** | **0.527** | **33.3%** |
Key finding: Structural + ensemble retrieval achieves **100% precision** (zero irrelevant chunks) vs. 51.6% for naive keyword search.
## Method
1. **AST extraction**: Python files parsed with `ast` module → class/function/method chunks
2. **6-field structural metadata**: layer, module, function_type, keyword, complexity, has_docstring
3. **Constitutional Halt labeling**: VarianceHaltMonitor (σ > 2.5x threshold) as automatic quality gate
4. **XGML proof bundles**: Ed25519-signed proof chain on every partition plan
## Related
- [Aevion Verifiable AI](https://github.com/aevionai/aevion-verifiable-ai) — source codebase
- Patent US 63/896,282 — Variance Halt + Constitutional AI halts
## License
Apache 2.0 — freely use for research and commercial applications.