- This is the code of the paper OntoTune: Ontology-Driven Self-training for Aligning Large Language Models (WWW2025).
In this work, we propose an ontology-driven self-training framework called OntoTune, which aims to align LLMs with ontology through in-context learning, enabling the generation of responses guided by the ontology.
๐arXiv โข ๐ค Huggingface
2025-01
OntoTune is accepted by WWW 2025 !2025-02
Our paper is released on arxiv !2025-06
Our model is released on huggingface !
git clone https://github.com/zjukg/OntoTune.git
The code of fine-tuning is constructed based on open-sourced repo LLaMA-Factory.
cd LLaMA-Factory
pip install -e ".[torch,metrics]"
- The supervised instruction-tuned data generated by LLaMA3 8B for the LLM itself is placed in the link.
- Put the downloaded
OntoTune_sft.json
file underLLaMA-Factory/data/
directory. - Evaluation datasets for hypernym discovery and medical question answering are in
LLaMA-Factory/data/evaluation_HD
andLLaMA-Factory/data/evaluation_QA
, respectively.
You need to add model_name_or_path
parameter to yaml fileใ
cd LLaMA-Factory
llamafactory-cli train script/OntoTune_sft.yaml
Please consider citing this paper if you find our work useful.
@inproceedings{liu2025ontotune,
title={Ontotune: Ontology-driven self-training for aligning large language models},
author={Liu, Zhiqiang and Gan, Chengtao and Wang, Junjie and Zhang, Yichi and Bo, Zhongpu and Sun, Mengshu and Chen, Huajun and Zhang, Wen},
booktitle={Proceedings of the ACM on Web Conference 2025},
pages={119--133},
year={2025}
}