## 1 Introduction  
OE is fundamental to the organization and structuring of semantic knowledge, which is increasingly essential in domains such as artificial intelligence, knowledge management, and digital information systems. Ontologies, by defining concepts and relations between them, serve as the backbone for systems that rely on contextual understanding and reasoning. As the volume and complexity of information grows, traditional manual approachesto OE are proving insufficient. This has led to the exploration of advanced methodologies for OE (especially concerning ontology learning) by leveraging machine learning methods and natural language processing (NLP). LLMs, such as GPT-4 and Mistral, represent a significant leap in NLP capabilities, enabling automation in tasks that previously required extensive human expertise. By processing vast datasets, LLMs can perform nuanced tasks such as text summarization, content generation, and knowledge extraction. However, their application in OE--a domain requiring deep understanding of structure, logic, and domain-specific knowledge--remains underexplored. Despite their general utility, pre-trained LLMs often fail to meet the precision and relevance required for tasks such as ontology generation, primarily due to a lack of domain-specific training. Fine-tuning involves a detailed procedure where the model's parameters are adjusted using a smaller, highly specialized dataset after the initial broad pre-training on extensive data. This targeted training approach helps in refining the model's predictions, making it adept at handling specific types of queries and generating outputs that adhere to the specialized knowledge structures typical in OE. The effectiveness of fine-tuning is evident in the model's enhanced ability to navigate the intricacies of domain-specific languages and terminologies, enabling it to produce outputs that are not only grammatically correct but also contextually aligned with the domain's requirements. By leveraging fine-tuned LLMs, professionals in OE can automate the generation of ontological structures, significantly reducing the time and effort involved in manual ontology construction and potentially increasing the scalability of knowledge management practices across various domains. Fine-tuning LLMs for OE tasks represents a confluence of advanced AI capabilities with the specialized needs of knowledge management. This process underpins significant improvements in how models understand and interact with complex, domain-specific datasets, marking a pivotal step towards more intelligent and automated systems in ontology management. The primary challenge addressed in this research lies in the limitations of pre-trained LLMs when applied to OE, creating a gap in their ability to generate outputs with low F1 scores, reflecting poor precision and recall in representing domain-specific concepts and properties (both object and data properties). This shortcoming underscores the importance of fine-tuning LLMs to enhance their understanding of OE principles and methodologies. The objective of this study is to bridge this gap by fine-tuning LLMs on carefully curated datasets derived from foundational texts in OE. These datasets, encompassing question-answer pairs, description logic, and translations of visual representations, are designed to align with the conceptual and structural needs of OE. The study evaluates the impact of fine-tuning on the models' ability to generate high-quality, domain-specific ontologies. This research is driven by two key research questions:  
1. Can fine-tuning LLMs for OE concepts significantly improve their performance, enabling them to generate outputs with higher accuracy and adherence to ontology syntax? 2. Is the incorporation of domain-specific datasets into the fine-tuning process able to enhance the practical utility of the generated ontologies, particularly in real-world applications? To answer these questions, comparative experiments were conducted on GPT-4 and Mistral 7b, two leading LLMs with distinct capabilities.