Colorectal cancer (CRC) treatment planning requires highly personalized and to remain aligned with rapidly evolving clinical guidelines. However, general-purpose LLMs can struggle with clinical currency and safety in oncology. Here we introduce GatorOnco, an agentic LLM system that generates safety-first, guideline-grounded CRC treatment plans from heterogeneous clinical context. GatorOnco combines system-scale domain adaptation and model merging to preserve instruction-following while strengthening oncology competence, hierarchical reward–based reinforcement learning that prioritizes correct high-level modality decisions before regimen-level details, and agentic retrieval that dynamically incorporates up-to-date NCCN guidance during inference. In a blinded evaluation of 79 real-world CRC cases reviewed by five board-certified oncologists, GatorOnco outperformed open-source baselines and achieved expert-level parity on correctness, guideline adherence, and safety, while improving completeness.
- Preprocess raw notes.
- Construct training/evaluation datasets.
- Build guideline-derived knowledge artifacts.
- Run model inference and evaluation.
preprocess/: note de-duplication, keyword filtering, and temporal filtering.dataset_construction/: patient case rewriting, treatment plan rewriting, and reasoning trace generation.vector_database_construction/: guideline PDF parsing and metadata extraction for vector database building.evaluation/: inference scripts and automatic/human evaluation scripts.figs/: figures for system and results.flowchart.md: mermaid pipeline diagram.
- Python 3.10+ recommended.
- CUDA GPU recommended for
vllmand local large-model inference. - Sufficient RAM/VRAM based on chosen model size.
git clone <your-github-url>/GatorOnco.git
cd GatorOnco
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt# 1) preprocess
bash preprocess/run_all_preprocess.sh
# 2) dataset construction
python dataset_construction/pt_case_rewrite.py --input_csv <csv> --output_csv <csv>
python dataset_construction/plan_rewrite.py --input_csv <csv> --output_csv <csv>
python dataset_construction/reasoning_trace_generation.py --input_csv <csv> --output_csv <csv>
# 3) vector database construction
python vector_database_construction/pdf_to_markdown_jsonl.py \
--pdf <guideline.pdf> \
--md_out <guideline.md> \
--jsonl_out <guideline.jsonl>
python vector_database_construction/extract_metadata_from_jsonl.py
# 4) inference and evaluation
python evaluation/infer_treatment_from_evidence.py --input_csv <csv> --output_jsonl <jsonl>
python evaluation/evaluate_treatment_accuracy.py --gold <csv> --pred <jsonl>
python evaluation/evaluate_treatment_predictions.py <predictions.csv>- Replace all
<csv>,<jsonl>, and model paths with your local files. - Keep private or licensed clinical data outside this repository.
If you use this repository, please cite the accompanying paper.
@article{gatoronco2026,
title={GatorOnco: Agentic Pipeline for Oncology Treatment Plan Generation and Evaluation},
author={TBD},
journal={TBD},
year={2026}
}


