## 1 Introduction
These experiments assessed the models' performance in generating ontologies, focusing on metrics such as precision, recall, and F1 score. The results provide valuable insights into the capabilities and limitations of LLMs in OE and offer practical recommendations for enhancing their utility in this specialized field. In this study, we opted to apply fine-tuning directly to the LLMs without first employing retrieval-augmented generation (RAG) to address domain-specific OE tasks. This decision was driven by the need for precision and tailored adaptation to the highly specialized domain requirements. Fine-tuning integrates the domain's specific characteristics into the model's internal parameters, which enhances its ability to produce contextually precise and terminologically consistent outputs. This is particularly critical for tasks such as OE, where maintaining strict adherence to predefined logical structures and workflows is paramount. Conversely, while RAG excels at dynamically retrieving and incorporating external knowledge, it introduces additional complexity and potential latency. Moreover, the reliance of RAG on external, often heterogeneous, data sources could lead to inconsistencies, inaccuracies, or even irrelevance in outputs, especially if the external knowledge is not meticulously curated. By prioritizing fine-tuning, we ensured greater control over the model's behavior and outputs, optimizing for performance in a domain characterized by stable knowledge frameworks rather than dynamic informational updates. This approach aligns with established evidence that fine-tuning is more effective than retrieval-based methods for domains requiring precision, efficiency, and consistent adherence to structured frameworks, making it the logical choice for our objectives in OE. In addition to contributing to the understanding of LLMs' application in OE, this study highlights the broader implications of integrating machine learning with NLP for domain-specific tasks. By addressing the challenges of domain knowledge representation, this research sets the stage for future advancements in automating complex knowledge-driven processes, offering a pathway towards more intelligent, context-aware systems in diverse fields. Overall, the goals of the presented work are as follows:  
* Enhance OE with Fine-Tuned LLMs: To demonstrate how fine-tuning LLMs can improve their performance in generating and understanding ontologies aligned with formal principles and domain-specific requirements. * Develop Domain-Specific OE Training Datasets: To create and utilize a structured methodology for curating datasets based on foundational OE-related handbooks, including question-answer pairs and translated visual elements, ensuring alignment with OE standards. * Provide a Comparative Analysis of LLMs: To evaluate and contrast the performance of GPT-4 and Mistral 7B in terms of accuracy, efficiency, cost, and their ability to handle domain-specific OE tasks, providing insights into their practical applicability. * Apply Fine-Tuned Models to Real-World Scenarios: To explore the use of fine-tuned LLMs in practical applications, such as Search and Rescue (SAR) missions during wildfires, showcasing the potential utility of these models in critical, specialized fields. * Identifying Limitations and Future Directions: To critically assess the strengths and weaknesses of the models, emphasizing the need for hybrid solutions and domain-specific training data to enhance their contextual understanding and emulate human expertise effectively. * Pave the Way for AI-Enhanced OE Tools: To advocate advancements in OE by integrating LLMs with domain-specific insights, aiming to bridge the gap between theoretical principles and practical utility. The approach demonstrates how fine-tuned LLMs can automate key ontology development tasks, including concept extraction, relationship identification, and hierarchical structuring. By leveraging pre-trained models, we reduce the reliance on manual curation, allowing for a more scalable and efficient OE process.