Agriculture, as one of the key drivers for human civilization, demands efficient methods for managing the extensive domainspecific knowledge. While ontologies, structured sets of terms and relationships within a specific domain, have played a pivotal role in structuring agricultural data, existing models lack the precision and adaptability necessary for the dynamic agricultural environment. This paper proposes a novel framework that integrates the strengths of BERT (Bidirectional Encoder Representations from Transformers) GPT (Generative Pre-trained Transformer), and Graph Recurrent Q Learning Network (GRQLN) for developing a dynamic and efficient ontology tool. BERT-GPT, with its powerful natural language processing capabilities, allows for accurate feature extraction from diverse text data, including government and farming sources. Meanwhile, GRQLN leverages graph neural networks and reinforcement learning to convert these features into an ontology graph, optimizing the representation process. The integration of these advanced technologies not only addresses the limitations of existing models but also enhances the precision of ontological query retrieval by 8.5%, accuracy by 8.3%, recall by 10.4%, AUC by 9.5%, and specificity by 9.4%, while reducing delay by 4.5%. The proposed model is a significant contribution to the field, offering a robust tool that empowers stakeholders with actionable insights derived from a vast expanse of agricultural knowledge, ultimately facilitating informed decision-making in the ever-evolving landscape of agricultural operations.