A retrieval-augmented large language model for agricultural advisory on crop varieties and cultivation techniques
Main Article Content
Abstract
This study presents the design and implementation of an agricultural advisory chatbot to help farmers access reliable information on crop varieties and cultivation techniques, with a focus on rice and mango. The proposed system integrates a large language model (Gemini 2.5 Pro) with a Retrieval-Augmented Generation architecture to mitigate hallucination and improve factual accuracy in domain-specific responses. The knowledge base is constructed from authoritative agricultural technical documents, including crop variety descriptions, cultivation procedures, and pest and disease management guidelines. These materials are systematically preprocessed, segmented, and indexed in the Qdrant vector database to enable efficient semantic retrieval within the Retrieval-Augmented Generation pipeline. To enhance retrieval robustness, the system employs a hybrid search strategy that combines keyword-based retrieval and dense vector search, followed by a Cross-Encoder re-ranking module to optimize contextual relevance before response generation. System performance is evaluated using the Retrieval Augmented Generation Assessment framework. Experimental results demonstrate high reliability, with a Faithfulness score of 91.43% and an Answer Relevancy score of 95.52%. The findings indicate that the proposed approach can deliver accurate, context-aware, and practically applicable agricultural recommendations, highlighting its potential to support digital transformation and AI-driven solutions in smart and sustainable agriculture.
Article Details
Conflict of Interest

© 2026 The authors. This is an open access article distributed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License.
References
Alammar, J., & Grootendorst, M. (2024). Hands-On Large Language Models: Language Understanding and Generation. O’Reilly Media.
Cormack, G. V., Clarke, C. L. A., & Büttcher, S. (2009). Reciprocal rank fusion outperforms condorcet and individual rank learning methods. In J. Allan, J. A. Aslam, M. Sanderson, C. Zhai, & J. Zobel (Eds.), Proceedings of the 32nd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2009, Boston, MA, USA, July 19-23, 2009 (pp. 758–759). ACM. https://doi.org/10.1145/1571941.1572114
Cuu Long Delta Rice Research Institute. (2024). Cuu Long Delta Rice Research Institute (CLRRI) – Official Website. https://clrri.org/ (in Vietnamese).
Es, S., James, J., Anke, L. E., & Schockaert, S. (2024, March). Ragas: Automated evaluation of retrieval augmented generation. In Proceedings of the 18th conference of the european chapter of the association for computational linguistics: system demonstrations (pp. 150-158).
Field Crops Research Institute. (2024). Field Crops Research Institute (FCRI) – Official Website. Field Crops Research Institute. https://fcri.com.vn/ (in Vietnamese).
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y., Chen, D., Dai, W., Chan, H. S., Madotto, A., & Fung, P. (2023). Survey of Hallucination in Natural Language Generation. ACM Computing Surveys, 55(12), 1–38. https://doi.org/10.1145/3571730
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W., Rocktäschel, T., Riedel, S., & Kiela, D. (2020, December). Retrieval-augmented generation for knowledge-intensive nlp tasks. In Proceedings of the 34th International Conference on Neural Information Processing Systems (pp. 9459-9474)
Li, Y., Li, Z., Zhang, K., Dan, R., Jiang, S., & Zhang, Y. (2023). ChatDoctor: A Medical Chat Model Fine-Tuned on a Large Language Model Meta-AI (LLaMA) Using Medical Domain Knowledge (No. arXiv:2303.14070). arXiv. https://doi.org/10.48550/arXiv.2303.14070
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024). Lost in the middle: How language models use long contexts. Transactions of the association for computational linguistics, 12, 157-173.
Nogueira, R., & Cho, K. (2019). Passage Re-ranking with BERT. arXiv Preprint, abs/1901.04085. https://arxiv.org/abs/1901.04085
Reimers, N., & Gurevych, I. (2019). Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP–IJCNLP 2019) (pp. 3982–3992). https://doi.org/10.18653/v1/D19-1410
Thakur, N., Reimers, N., Rücklé, A., Srivastava, A., & Gurevych, I. (2021). BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Models. arXiv Preprint. https://arxiv.org/abs/2104.08663
VAAS. (2024). Lessons on Rice Cultivation. https://vaas.vn/kienthuc/Caylua/10/ (in Vietnamese).
Vietnam Academy of Agricultural Sciences, Institute of Plant Germplasm. (2024). Mango Seedlings and Varieties. https://giongcaytrongmoi.com/9/giong-cay-an-qua/giong-cay-xoai (in Vietnamese).
Vietnam Food Association. (2024). Vietnam Food Association (Vietfood) – Official Website. https://vietfood.org.vn/ (in Vietnamese).
Wang, L., Yang, N., Huang, X., Yang, L., Majumder, R., & Wei, F. (2024). Multilingual E5 Text Embeddings: A Technical Report (No. arXiv:2402.05672). arXiv. https://doi.org/10.48550/arXiv.2402.05672
Yang, X., Sun, K., Xin, H., Sun, Y., Bhalla, N., Chen, X., Choudhary, S., Gui, R. D., Jiang, Z. W., Jiang, Z., Kong, L., Moran, B., Wang, J., Xu, Y. E., Yan, A., Yang, C., Yuan, E., Zha, H., Tang, N., ... Dong, X. L. (2024). CRAG: Comprehensive RAG benchmark. Advances in Neural Information Processing Systems, 37, 10470-10490.