EconPapers    
Economics at your fingertips  
 

Integrating LLM for Cotton Soil Analysis in Smart Agriculture System

Syed Hassan Ali ()
Additional contact information
Syed Hassan Ali: Department of AI & Data Science (FAST-NUCES, Karachi, Pakistan)

International Journal of Innovations in Science & Technology, 2024, vol. 6 Special Issue: 7, issue 7, 283-294

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 fine-tuned 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 fine-tuned 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.

Keywords: Large Language Models (LLMs); Soil Health; Cotton Soil Reports; Cotton Farming; Soil Analysis (search for similar items in EconPapers)
Date: 2024
References: Add references at CitEc
Citations:

Downloads: (external link)
https://journal.50sea.com/index.php/IJIST/article/view/1111/1652 (application/pdf)
https://journal.50sea.com/index.php/IJIST/article/view/1111 (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:abq:ijist1:v:6:y:2024:i:7:p:283-294

Access Statistics for this article

International Journal of Innovations in Science & Technology is currently edited by Prof. Dr. Syed Amer Mahmood

More articles in International Journal of Innovations in Science & Technology from 50sea
Bibliographic data for series maintained by Iqra Nazeer ().

 
Page updated 2025-09-19
Handle: RePEc:abq:ijist1:v:6:y:2024:i:7:p:283-294