Integrating LLM for Cotton Soil Analysis in Smart Agriculture System

Abstract

Cotton is a critical crop for the agricultural economy, with its productivity closely tied to soil quality, particularly soil nutrient levels and pH. Monitoring and optimizing these properties is essential for sustainable cotton cultivation. This study proposes using finetuned Large Language Models (LLMs)—specifically GPT-2 and LLaMA-2—to automate soil analysis and produce detailed soil reports with actionable recommendations, addressing the limitations of traditional machine learning models in this context. A custom dataset was created by extracting key information from cotton-specific resources, focusing on soil nutrient interpretation and recommendations across different growth stages. Fine-tuning was applied to GPT-2 and LLaMA-2 models (specifically, the Nous Research version LLaMA2-7b-hf from Hugging Face), enabling them to generate data-driven reports on cotton soil health. The finetuned GPT-2 model achieved a training loss of 0.093 and an evaluation loss of 0.086, outperforming LLaMA-2, which had a training loss of 0.033 and an evaluation loss of 0.25. Evaluation with BERT Score showed that GPT-2 scored average Precision, Recall, and F1 scores of 0.9284, 0.9308, and 0.9296, respectively, highlighting its superior report accuracy and contextual relevance compared to LLaMA-2. The generated reports included soil properties and actionable nutrient management recommendations, effectively supporting optimized cotton growth. Implementing fine-tuned LLMs for soil report generation enhances nutrient management practices, contributing to higher yields and more sustainable cotton farming.

Authors and Affiliations

Syed Hassan Ali, Muhammad Farrukh Shahid, M. Hassan Tanveer, Abdul Rauf

Keywords

Related Articles

ML-Driven Lightweight Botnet Detection System for IoT-Networks

The integration of cloud computing with the Internet of Things (IoT) seeks to create seamless connections between humans and devices, enhancing applications in areas like smart healthcare and home automat...

https://journal.50sea.com/index.php/IJIST/article/view/645/1249

Ransomware has emerged as a prominent cyber threat in recent years, targeting numerous businesses. In response to the escalating frequency of attacks, organizations are increasingly seeking effective tools and strategi...

Elevating Group Recommendations and Collective Decisions Through Prioritized User Activities in Groups

Group modeling encompasses various areas of interest, including recommendations, movie watching, exercise performance, and the formation of social media groups with similar interests. Similarly, the GRS has numerous p...

Smart Power Management with Small Cells: A Path to Sustainable Data Connectivity

The rising demand for energy-efficient networks capable of supporting high-speed data traffic poses a critical challenge for network operators. This study addresses this issue by proposing a power control strategy that...

Exploring cGANsfor Urdu Alphabets and Numerical System Generation

Urdu ligatures play a crucial role in text representation and processing, especially in Urdu language applications. While extensive research has been conducted on handwritten characters in various languages, there is s...

Download PDF file
  • EP ID EP761769
  • DOI -
  • Views 25
  • Downloads 0

How To Cite

Syed Hassan Ali, Muhammad Farrukh Shahid, M. Hassan Tanveer, Abdul Rauf (2024). Integrating LLM for Cotton Soil Analysis in Smart Agriculture System. International Journal of Innovations in Science and Technology, 6(7), -. https://europub.co.uk./articles/-A-761769