Leveraging LLM Techniques for Moroccan Agriculture: Performance Analysis of RAG and Fine-Tuning Approaches with Llama 3
摘要
Agriculture plays a crucial role in Morocco’s economy, significantly impacting national employment and export sectors. Moroccan farmers face challenges such as limited digital transformation, and insufficient pesticide knowledge. To address these issues, an agricultural chatbot was developed using the Llama 3 model, incorporating Retrieval-Augmented Generation (RAG) and fine-tuning techniques. A comprehensive dataset of 13,141 lines was created from diverse sources. The performance of the chatbot was evaluated through BLEU, ROUGE, METEOR, and Perplexity metrics. Results indicate that the RAG approach achieved slightly higher precision and response quality compared to the fine-tuned model, which demonstrated greater consistency and stability. These findings suggest that while RAG enhances response accuracy, fine-tuning contributes to more stable outputs.