KORA-Benchmark / README.md
anonymous-kgqa's picture
Upload README.md with huggingface_hub
b5725d6 verified
|
Raw
History Blame Contribute Delete
3.03 kB
---
license: cc-by-4.0
task_categories:
- question-answering
language:
- en
tags:
- knowledge-graph
- biomedical
- sparql
- compositional-qa
- multi-hop
pretty_name: KORA Benchmark
size_categories:
- 1K<n<10K
configs:
- config_name: default
data_files:
- split: full
path: benchmark/benchmark_clean.csv
- config_name: splits
data_files:
- split: train
path: benchmark/train.csv
- split: validation
path: benchmark/val.csv
- split: test
path: benchmark/test.csv
---
# KORA Benchmark
Resources for reproducing **KORA: Adaptive Multi-Agent Orchestrated Retrieval over Knowledge Graphs** — including the BioCQ benchmark dataset, entity resolution indexes, and the combined biomedical knowledge graph.
## Repository Contents
| Path | Description |
|------|-------------|
| `benchmark/` | BioCQ question splits (train / val / test / full) |
| `indexes/scispacy*/` | Pre-built SciSpaCy entity resolution indexes (~1 GB) |
| `indexes/ark_bm25/` | Pre-built ARK BM25 retrieval indexes (~406 MB) |
| `kg/kg.nt` | Combined RDF knowledge graph (PrimeKG + OptimusKG + AfrOMedKG) in N-Triples format |
| `kg/virtuoso_clean.ini` | Virtuoso SPARQL server config template |
## BioCQ Dataset
**8,578 compositional biomedical questions** across five reasoning types:
| Question Type | Questions |
|---|---:|
| Multi-hop Traversal | 2,094 |
| Aggregation & Counting | 1,991 |
| Constrained Retrieval | 1,784 |
| Differential Diagnosis | 1,437 |
| Knowledge Gap | 1,272 |
| **Total** | **8,578** |
Questions are grounded in three biomedical knowledge graphs: **PrimeKG**, **OptimusKG**, and **AfrOMedKG**.
## Usage
### Load the benchmark
```python
import pandas as pd
train = pd.read_csv("benchmark/train.csv")
val = pd.read_csv("benchmark/val.csv")
test = pd.read_csv("benchmark/test.csv")
```
Or via the HuggingFace datasets library:
```python
from datasets import load_dataset
# Full dataset (8,578 questions)
ds = load_dataset("anonymous-kgqa/KORA-Benchmark")["full"]
# Pre-defined train / val / test splits
splits = load_dataset("anonymous-kgqa/KORA-Benchmark", "splits")
train, val, test = splits["train"], splits["validation"], splits["test"]
```
### Download SciSpaCy entity resolution indexes
```bash
hf download anonymous-kgqa/KORA-Benchmark --repo-type=dataset \
--include "indexes/scispacy*" --local-dir kora/kg/index_data
```
### Download ARK BM25 indexes
```bash
hf download anonymous-kgqa/KORA-Benchmark --repo-type=dataset \
--include "indexes/ark_bm25/*" --local-dir baselines/ark/temp && \
mv baselines/ark/temp/indexes/ark_bm25/*.pkl baselines/ark/temp/ && \
rm -rf baselines/ark/temp/indexes
```
### Download the knowledge graph
```bash
hf download anonymous-kgqa/KORA-Benchmark --repo-type=dataset \
--include "kg/*" --local-dir data/kg
```
Load `kg/kg.nt` into Virtuoso using the provided `kg/virtuoso_clean.ini` template. See the KORA repository for full setup instructions.
## License
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)