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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Leveraging LLM Techniques for Moroccan Agriculture: Performance Analysis of RAG and Fine-Tuning Approaches with Llama 3

  • Meriem El Brahimi,
  • Laila Machkour,
  • Rajae Ben Lahmar,
  • Bouchra Bouhamidi,
  • Omar Zahour,
  • El Habib Benlahmar,
  • Brahim Zahour

摘要

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.