--- license: cc-by-4.0 language: - en pretty_name: Cancer Knowledge Base tags: - medical - oncology - cancer - knowledge-base - clinical-education - rag - retrieval-augmented-generation - benchmark - evaluation - llm - ehr - multiple-choice - icd-10 - loinc - icd-o-3 - hgnc - localization - multilingual - seer - guidelines - nccn - esmo - asco - synthetic-data - text2sql size_categories: - n<1K task_categories: - question-answering - text-generation - text-retrieval task_ids: - open-domain-qa - closed-domain-qa - multiple-choice-qa - named-entity-recognition --- # Cancer Knowledge Base — the open, verified oncology KB for RAG & LLM evaluation The only open **CC-BY-4.0** oncology knowledge base that combines: - **110/110 trials cited** with PMID + NCT + PubMed/ClinicalTrials.gov URLs, and **32 prognosis rows linked to verified SEER 2016–2022 references** — no LLM-synthetic dataset has this. - **A provable 152-question MCQ benchmark** — every answer derives from this KB's own structured data and carries a citation + golden docs, so it is *open-book verifiable* (unlike exam-based medical benchmarks). - **An oncology RAG evaluation suite** — 1,239-chunk retrieval pool, 456 MedRGB-style sufficiency / noise / counterfactual-robustness variants, MIRAGE/MedRGB interchange exports, a dependency-free harness (`eval_mcq.py`), and a submission package. - **A ground-truth validation layer** that independently audits LLM-synthetic oncology datasets against the KB's cited statements — published scorecards for CancerGUIDE, OncoBench, and MedGUIDE-MCQA-8K. - **Universal TNM / staging + sub-stages** (65 staging rows) and **ICD-10 / ICD-O-3 / LOINC / HGNC interop codes** for joins into precision-oncology pipelines. - **Localization with provenance**: 9 locales, 4,728 glossary terms, ≥60% KB-wide translatable coverage for every language, and 20 reviewed-as-auto translation rows. Educational reference only — **not medical advice**. Fully de-identified by construction. ## Quick start ```python import pandas as pd documents = pd.read_parquet("hf://datasets/ranjithraj/cancer-knowledge-base/documents.parquet") guidelines = pd.read_parquet("hf://datasets/ranjithraj/cancer-knowledge-base/guidelines.parquet") trials = pd.read_parquet("hf://datasets/ranjithraj/cancer-knowledge-base/evidence_levels.parquet") # Full-text search any document (FTS is a first-class column) breast = documents[documents.path == "know/breast-ref.md"].body.iloc[0] # Every guideline statement, citation-linked print(guidelines[guidelines.source == "know/breast-ref.md"]) # 152 provable MCQs with difficulty / evidence / citation / golden docs mcq = pd.read_parquet("hf://datasets/ranjithraj/cancer-knowledge-base/mcq_questions.parquet") ``` Evaluate your own RAG/LLM on the oncology benchmark in one command: ```bash python3 scripts/eval_mcq.py --retriever bm25 --topk 3 # BM25 end-to-end python3 scripts/eval_mcq.py --predictions preds.jsonl # score your system ``` A 3-minute Colab walkthrough is at [`colab_quickstart.ipynb`](colab_quickstart.ipynb) — load the KB, run BM25 retrieval, and reproduce the benchmark baseline. ## Suggested uses - **RAG evaluation** — score your retriever+generator on `benchmark/` (MIRAGE/MedRGB interchangeable). - **Fine-tuning** — instruction-tune or domain-adapt small LLMs for oncology QA on the 58 de-identified documents. - **Benchmarking synthetic data** — screen LLM-generated oncology datasets against the KB's evidence index (`scripts/validate_synthetic.py`). - **Multilingual oncology content** — build localized Q&A or terminology tools from the code-anchored glossary (9 locales). - **Entity linking / coding** — ICD-10 / LOINC / ICD-O-3 / HGNC mappings in `codes.parquet`. ## Citation ```bibtex @misc{cancer-knowledge-base-2026, title = {{Cancer Knowledge Base}: an open, verified, provable oncology knowledge base for RAG and LLM evaluation}, author = {Ranjithraj, {R}}, year = {2026}, howpublished = {\url{https://huggingface.co/datasets/ranjithraj/cancer-knowledge-base}}, note = {CC-BY-4.0; 110/110 trials cited; 152-question provable MCQ benchmark; validation scorecards for CancerGUIDE/OncoBench/MedGUIDE} } ``` ## Contents (parquet files) | File | Rows | Description | |------|------|-------------| | `documents.parquet` | 59 | De-identified documents: metadata + body text | | `sections.parquet` | 436 | Markdown headings + verbatim section content | | `markdown_tables.parquet` | 225 | All markdown tables (header/rows as JSON) | | `markdown_links.parquet` | 168 | Internal links between documents | | `prognosis.parquet` | 168 | Lethality/survival tables by cancer type and stage (dated, educational) | | `biomarkers.parquet` | 72 | Mutations, receptors, genetic syndromes | | `guidelines.parquet` | 175 | Guideline-grade treatment statements per cancer (NCCN/ESMO/ASCO) | | `subtypes.parquet` | 110 | Histologic subtypes by cancer | | `drugs.parquet` | 141 | Drugs, class, mechanism, toxicity | | `staging.parquet` | 65 | Staging systems + universal TNM/Stage 0-IV + sub-stages | | `regimens.parquet` | 85 | Treatment regimens per case and phase | | `monitoring.parquet` | 109 | Factors to monitor during chemo/targeted/surgery/RT | | `diagnostics.parquet` | 96 | Recommended diagnostics per case | | `labs.parquet` | 72 | Baseline labs (synthetic, clearly flagged) | | `imaging_findings.parquet` | 59 | PET-CT / imaging findings (synthetic, clearly flagged) | | `consultations.parquet` | 59 | Consultation plan evolution (synthetic, clearly flagged) | | `case_facts.parquet` | 218 | Structured case fields (diagnosis, staging, prognosis) | | `evidence_levels.parquet` | 115 | Evidence grading (guidelines + trials) per entity — 110 trials with PMID/NCT/URL | | `codes.parquet` | 82 | Interop codes: ICD-10 sites/types, HGNC biomarkers, LOINC labs, ICD-O-3 breast subtypes | | `regimen_drugs.parquet` | 100 | Regimen-to-drug join table | | `mcq_questions.parquet` | 152 | 152 provable oncology MCQs with difficulty / evidence / citation / golden docs | | `prognosis_sources.parquet` | 32 | Prognosis rows linked to verified SEER references (vintage + value) | | `locales.parquet` | 9 | Registered target languages (BCP-47 codes, review requirement, priority) | | `glossary.parquet` | 4728 | Code-anchored terminology registry: concept -> code (ICD/LOINC/HGNC/ICD-O-3) -> local term per locale | | `translations.parquet` | 20 | Per-document localized bodies with master_hash/content_hash provenance and review status | ## RAG Benchmark `benchmark/` contains an oncology RAG evaluation suite built from this knowledge base: - `retrieval_pool.parquet` — 1,239 chunked retrieval units (sections, markdown tables, domain tables) - `mcq_benchmark.parquet` — 152 multiple-choice questions with golden docs, difficulty, evidence level, and citations - `mcq_robustness.parquet` — 456 MedRGB-style variants (sufficiency / noise / counterfactual-robustness) - `mirage_format.jsonl` / `medrgb_format.jsonl` — interchange exports for MIRAGE-family leaderboards and MedRGB harnesses (see `benchmark/MIRAGE_INTEGRATION.md`) - `leaderboard.json` + `releases/*.json` — recorded results with KB-commit / date / release snapshots for growth tracking - `baseline_preds.jsonl` + `SUBMISSION.md` — reproducible baseline and submission protocol Baseline (BM25@top3, no LLM): **sufficiency 31.6%** (random = 25%), **retrieval@3 61.8%**. Real headroom for embedding retrievers and strong generators — the pool is provably answerable, so gains are attributable to retrieval + reasoning, not answer leakage. ## Ground-truth validation scorecards `scorecards/` holds the results of screening LLM-synthetic oncology datasets against the KB's cited statements (`scripts/validate_synthetic.py`). Each claim is tiered **supported / partial / unsupported** by lexical coverage of site-gated evidence, and every item links to the matching evidence chunk. - `cancerguide.all.summary.md` — CancerGUIDE (316 synthetic patient notes): 238 scorable claims, **87.0% supported** / 12.6% partial / 0.4% unsupported. - `oncobench.all.summary.md` — OncoBench strong100 (100 adjudicated decision cases): 2,007 claims, **26.0% supported** — the scorecard doubles as a KB coverage-gap map. - `medguide.all.summary.md` — MedGUIDE-MCQA-8K (7,747 NCCN decision-tree MCQs): 6,952 claims, **21.2% supported**. ## Localization (l10n) The KB is localized *with provenance* — every translation keeps its citation (via the master document), a `master_hash` so a change in the English source flags the locale stale, and an explicit review status (`auto` → `reviewed` → `approved`). **All 9 registered locales are at ≥60% KB-wide translatable coverage** (de/es/hi/zh ~520-525 terms, ar/bn/pt-BR/sw/te 527 terms each; 4,728 glossary terms total), measured script-agnostically across all 58 documents. - `locales.parquet` — registered languages (de, zh, es, hi, ar, bn, pt-BR, sw, te) - `glossary.parquet` — **code-anchored terminology registry**: each concept is linked to its language-neutral code (ICD-10 / ICD-O-3 / LOINC / HGNC) and maps to the local clinical term, so structured rows localize for free while codes stay the join key across languages. - `translations.parquet` — localized document bodies (5 reference docs at 100% translatable coverage in de/zh/es/hi) with `master_hash`/`content_hash` and `status`. - `l10n/*/mcq.*.jsonl` — localized MCQ exports (de/es/hi/zh) with preserved answer indices. **Coverage is not clinical approval**: `status='auto'` rows are glossary-generated drafts that must be clinically reviewed (`reviewed`) before use. See `l10n-moat.md` and `scripts/localize_pilot.py --coverage`. ## Privacy This is the **de-identified public subset**. The real patient case (`cases/specific/` — PHI) and all content derived from it are excluded. Documents are filtered by `phi = 0`. Synthetic rows in `labs`, `imaging_findings`, and `consultations` are **clearly flagged** with `synthetic = 1` and are illustrative public-case data — they are not real patient values. ## Disclaimer Educational reference only — **not medical advice**. Survival figures are population averages and may be outdated (`prognosis.as_of` marks their review date); consult current guidelines and clinicians for patient decisions.