Prompt-guided LLM agent for end-to-end ontology learning
Вантажиться...
Файли
Дата
Автори
Науковий керівник
Редактор
Інші учасники
Відповідальний
Назва журналу
Номер ISSN
Назва тому
Альтернативна назва
Prompt-керований LLM-агент для комплексного вивчення онтологій
Анотація
Перетворення знань великих мовних моделей (LLM) на логічні, машинно-інтерпретовані онтології є складним завданням. Звичайні стратегії з простими запитами часто породжують неоднозначні або взаємно несумісні триплети, які не можна безпечно об’єднати з інснуючими базами знань. У цій роботі розроблено й емпірично перевірено повністю автоматизований робочий процес, що перетворює текст на RDF/OWL-твердження, узгоджені зі схемою, без участі людини. Створений агент об’єднує чотири етапи – виявлення схеми, виявлення екземплярів, самовалідацію з виправленнями та узгодження онтології – кожен реалізовано як структурований запит до LLM. Валідатор перевіряє кожне твердження на дотримання обмежень; будь-яке порушення запускає ітеративний цикл аналіз помилок / виправлення схеми / виправлення екземплярів до досягнення узгодженості. Робочий процес було протестовано з трьома родинами LLM – GPT-4.1-mini, LLaMA-3.3-70b та Grok-3-mini, які представляють висококласні пропрієтарні, відкриті та бюджетні компактні моделі. Якість оцінювалася на синтетичному бенчмарку MINE та на двох реальних наборах текстів: десяти англомовних виданнях CEUR-WS і десяти українських випусках журналу «Вісник Національного університету “Львівська політехніка” “Інформаційні системи та мережі”». На MINE агент із використанням LLaMA-3.3-70b досяг 67,5 % точності, перевершивши KGGen (66,07 %) і водночас забезпечивши узгодженість схеми; GPT-4.1-mini та Grok-3-mini набрали 59,8 % і 52,4 % відповідно. Під час обробки текстів двома мовами усі моделі відтворили відношення автор – публікація – журнал, запропонували до 39 нових класів і 29 нових відношень, а також створили понад 800 індивідів у кожному наборі з лише незначними неузгодженостями. Вилучена схема залишалися англійською навіть для українських ввідних даних. Хоча GPT-4.1-mini та LLaMA-3.3-70b генерували ширші та коректні схеми, проте більшість концептів залишилися без індивідів, а Grok-3-mini запропонувала компактну та повністю заповнену схему з індивідами. Практичним результатом є робочий процес, який можна застосовувати до цифрових бібліотек або галузевих порталів, для автоматизованого розширення наявні графи знань із мінімальними людськими витратами, що знижує вартість для підтримки та збагачення існуючих онтологій.
Turning the vast knowledge of large language models (LLMs) into logical, machine-interpretable ontologies poses a difficult task. Conventional single-prompt strategies often generated ambiguous or mutually inconsistent triples could not be merged safely with reference knowledge bases. The present work therefore aimed to design and empirically verify an entirely automated workflow that converts raw text into schema–compliant RDF/OWL statements without manual intervention. The resulting agent combined four stages – schema discovery, instance extraction, self-repair validation, and ontology alignment – each expressed as structured prompts executed by an LLM. A validator inspected every candidate assertion against the extracted domain-range constraints; any violation triggered an iterative analyseerrors / fix-schema / fix-instances loop until consistency was reached. The workflow was instantiated with three families of LLMs – GPT-4.1-mini, LLaMA-3.3-70b, and Grok-3-mini – chosen to represent high-end proprietary, open-weights, and cost-efficient small models. Quality was measured on the synthetic Measure of Information in Nodes and Edges (MINE) benchmark and on two real scholarly texts: ten English CEUR-WS workshop volumes and ten Ukrainian issues of the Journal of Lviv Polytechnic National University “Information Systems and Networks”. On MINE the agent paired with LLaMA-3.3-70b achieved 67.5% fact recall, surpassing the KGGen pipeline (66.07%) while still enforcing schema coherence; GPT-4.1-mini and Grok-3-mini reached 59.8% and 52.4%, respectively. When applied to the bilingual texts, all models reproduced the canonical author–paper–journal relation, proposed up to 39 new classes and 29 new relations, and instantiated more than 800 individuals per dataset with only minor post-repair inconsistencies. Extracted labels remained in English even for Ukrainian inputs. While GPT-4.1-mini and LLaMA-3.3-70b generated broader and valid schema yet most of the schema remained uninitiated, when Grok-3-mini produced concise and fully populated schema with instances. The practical outcome is a pipeline that can be used on digital libraries or domain portals to expand existing knowledge graphs continuously and with minimal human effort, thereby lowering the cost for ontology maintenance and enrichment.
Turning the vast knowledge of large language models (LLMs) into logical, machine-interpretable ontologies poses a difficult task. Conventional single-prompt strategies often generated ambiguous or mutually inconsistent triples could not be merged safely with reference knowledge bases. The present work therefore aimed to design and empirically verify an entirely automated workflow that converts raw text into schema–compliant RDF/OWL statements without manual intervention. The resulting agent combined four stages – schema discovery, instance extraction, self-repair validation, and ontology alignment – each expressed as structured prompts executed by an LLM. A validator inspected every candidate assertion against the extracted domain-range constraints; any violation triggered an iterative analyseerrors / fix-schema / fix-instances loop until consistency was reached. The workflow was instantiated with three families of LLMs – GPT-4.1-mini, LLaMA-3.3-70b, and Grok-3-mini – chosen to represent high-end proprietary, open-weights, and cost-efficient small models. Quality was measured on the synthetic Measure of Information in Nodes and Edges (MINE) benchmark and on two real scholarly texts: ten English CEUR-WS workshop volumes and ten Ukrainian issues of the Journal of Lviv Polytechnic National University “Information Systems and Networks”. On MINE the agent paired with LLaMA-3.3-70b achieved 67.5% fact recall, surpassing the KGGen pipeline (66.07%) while still enforcing schema coherence; GPT-4.1-mini and Grok-3-mini reached 59.8% and 52.4%, respectively. When applied to the bilingual texts, all models reproduced the canonical author–paper–journal relation, proposed up to 39 new classes and 29 new relations, and instantiated more than 800 individuals per dataset with only minor post-repair inconsistencies. Extracted labels remained in English even for Ukrainian inputs. While GPT-4.1-mini and LLaMA-3.3-70b generated broader and valid schema yet most of the schema remained uninitiated, when Grok-3-mini produced concise and fully populated schema with instances. The practical outcome is a pipeline that can be used on digital libraries or domain portals to expand existing knowledge graphs continuously and with minimal human effort, thereby lowering the cost for ontology maintenance and enrichment.
Опис
Тип документа
Мова
ISSN
Серія, номер
ISBN
ББК
Інші ідентифікатори
Пов’язані матеріали
Спонсорська підтримка
Правовласник
Бібліографічний опис
Teplyi Ya., Dosyn D. Prompt-guided LLM agent for end-to-end ontology learning // Information Technologies and Computer Engineering. 2025. № 2 (22). Р. 35-46. DOI: https://doi.org/10.31649/vitce/2.2025.35.
Схвалення
Рецензія
Доповнено
Цитується в
Список використаної літератури (23)
- Bakker, R.M., Di Scala, D.L., & de Boer, M.H. (2024). Ontology learning from text: An analysis on LLM performance. In Proceedings of the 3rd NLP4KGC international workshop on natural language processing for knowledge graph creation in conjunction with SEMANTiCS 2024 conference (paper 5). Amsterdam: CEUR-WS.
- Belhoucine, K., & Mourchid, M. (2018). A survey of ontology learning from text. In Proceedings of the twelfth international conference on advances in semantic processing (SEMAPRO 2018) (pp. 14-21). Athens: IARIA.
- Browarnik, O., & Maimon, O. (2015). Ontology learning from text: Why the ontology learning layer cake is not viable. International Journal of Signs and Semiotic Systems, 4. doi: 10.4018/IJSSS.2015070101.
- Caufield, J.H., Hegde, H., Emonet, V., Harris, N.L., Joachimiak, M.P., Matentzoglu, N., Kim, H., Moxon, S., Reese, J.T., & Haendel, M.A. (2024). Structured prompt interrogation and recursive extraction of semantics (SPIRES): A method for populating knowledge bases using zero-shot learning. Bioinformatics, 40, article number btae104. doi: 10.1093/ bioinformatics/btae104.
- Chen, B., Yi, F., & Varró, D. (2023). Prompting or fine-tuning? A comparative study of large language models for taxonomy construction. In 2023 ACM/IEEE international conference on model driven engineering languages and systems companion (MODELS-C) (pp. 588-596). Västerås: IEEE. doi: 10.1109/MODELS-C59198.2023.00097.
- Chen, K., Lin, K., & Klein, D. (2021). Constructing taxonomies from pretrained language models. In Proceedings of the 2021 conference of the North American chapter of the Association for Computational Linguistics: Human language technologies (pp. 4687-4700). Stroudsburg: ACL. doi: 10.18653/v1/2021.naacl-main.373.
- Dong, Z., Wang, M., Dai, L., Li, J., Liu, X., & Nong, R. (2025). Cross-document contextual coreference resolution in knowledge graphs. ArXiv. doi: 10.48550/arXiv.2504.05767.
- Funk, M., Hosemann, S., Jung, J.C., & Lutz, C. (2023). Towards ontology construction with language models. In Proceedings of the KBC-LM’23: Knowledge base construction from pre-trained language models workshop at ISWC 2023 (paper 16). Amsterdam: CEUR-WS.
- He, Y., Chen, J., Antonyrajah, D., & Horrocks, I. (2022). BERTMap: A BERT-Based ontology alignment system. Proceedings of the AAAI Conference on Artificial Intelligence, 36(5), 5684-5691. doi: 10.1609/aaai.v36i5.20510.
- Jain, L., & Espinosa Anke, L. (2022). Distilling hypernymy relations from language models: On the effectiveness of zero-shot taxonomy induction. In Proceedings of the 11th joint conference on lexical and computational semantics (pp. 151-156). Seattle: ACL. doi: 10.18653/v1/2022.starsem-1.13.