YANG Jun1, YANG Wanxia1(
), YANG Sen1, HE Liang2,3, ZHANG Di1
Received:2025-06-13
Online:2025-10-09
Foundation items:The National Key R&D Program of China(2022ZD0115801)
About author:YANG Jun, E-mail: 2412399856@qq.com
corresponding author:
CLC Number:
YANG Jun, YANG Wanxia, YANG Sen, HE Liang, ZHANG Di. Intelligent Q&A Method for Crop Pests and Diseases Using LLM Augmented by Adaptive Hybrid Retrieval[J]. Smart Agriculture, doi: 10.12133/j.smartag.SA202506026.
Add to citation manager EndNote|Ris|BibTeX
URL: https://www.smartag.net.cn/EN/10.12133/j.smartag.SA202506026
Table 3
Answer generation prompt for crop diseases and pests
| 环节 | 步骤 | 内容 |
|---|---|---|
| 上下文组织(为模型推理提供背景等信息) | P1 | 你是一名农业病虫害防治专家,需基于知识库检索到的内容,依据解读的用户问题生成专业、可信的答案。请严格遵循以下步骤生成回答:用户查询{query} **上下文组织** 读取定位相关片段并排序: - 文档1:{检索片段1} - 文档2:{检索片段2} - ……(最多保留Top-K个相关片段) 根据这些片段与{query}的相关性,从高到低对文档片段重新排序,结果存入数组中如[文档2编号,文档1编号……] |
| P2 | **关键信息提炼** - 从上述文档中提取与问题直接相关的信息;(如症状描述、病原特征、防治方案等) | |
| 模型多步推理与答案生成 | P3 | **模型多步推理** 根据以下链式模板分步分析问题,确保答案逻辑严谨: 1. *症状匹配*: - 用户描述:“{用户输入症状}” - 匹配知识库症状:“{检索片段中的症状描述}” - 关联病害:“{病害名称}”(引用文档) - 关联特征:{斑点/断裂/疱状病斑/表皮破裂}(引用文档) - 关联部位:{叶片/茎/穗}(引用文档) 2. *病因推断*: - 病原类型:{真菌/细菌/病毒/害虫}(引用文档) - 诱发因素:{环境条件/种植习惯}(引用文档) - 传播途径:{昆虫/真菌/风雨}(引用文档) 3. *防治建议*: - 农业防治:{轮作/土壤处理}(引用文档) - 化学防治:{农药}推荐2-3种农药,注明用量(引用文档) - 生物防治:{天敌/微生物制剂}(引用文档) |
| P4 | **答案生成** 请从病虫害名称、病原、病原特征、危害部位、危害症状、发病条件、传播方式、防治方法这些方面对{query}全面分析,结果控制在200字左右;逻辑清晰,确保内容简练、无冗余。 |
Table 5
The intelligent Q&A of crop diseases and pests: Recall and Precision vary with Top k
| Topk | 准确率 | 召回率 | ||||||
|---|---|---|---|---|---|---|---|---|
| AHR | DVR | SQL | BM25 | AHR | SQL | DVR | BM25 | |
| 1 | 0.607 | 0.554 | 0.452 | 0.407 | 0.523 | 0.487 | 0.412 | 0.376 |
| 2 | 0.705 | 0.654 | 0.559 | 0.501 | 0.634 | 0.598 | 0.521 | 0.463 |
| 3 | 0.756 | 0.703 | 0.608 | 0.554 | 0.692 | 0.649 | 0.584 | 0.531 |
| 4 | 0.782 | 0.758 | 0.659 | 0.626 | 0.745 | 0.708 | 0.642 | 0.604 |
| 5 | 0.822 | 0.774 | 0.706 | 0.679 | 0.791 | 0.743 | 0.726 | 0.657 |
| 6 | 0.785 | 0.743 | 0.653 | 0.627 | 0.762 | 0.721 | 0.668 | 0.613 |
| 7 | 0.764 | 0.698 | 0.621 | 0.582 | 0.733 | 0.683 | 0.637 | 0.561 |
| 8 | 0.735 | 0.662 | 0.578 | 0.547 | 0.705 | 0.647 | 0.602 | 0.535 |
Table 6
Comparison of baseline models for Intelligent Q&A research on crop diseases and pests
| RAG | Model | Recall | Precision | F 1 | Time/s |
|---|---|---|---|---|---|
| No RAG | Qwen1.5-7B-Chat | 0.725 | 0.703 | 0.714 | 1.02 |
| Naive RAG | Qwen1.5-7B-Chat | 0.751 | 0.735 | 0.743 | 1.13 |
| Self-RAG | Qwen1.5-7B-Chat | 0.823 | 0.845 | 0.834 | 3.42 |
| Adaptive-RAG | Qwen1.5-7B-Chat | 0.848 | 0.878 | 0.863 | 2.63 |
| AHR-RAG | Qwen1.5-7B-Chat | 0.872 | 0.896 | 0.884 | 2.43 |
| AHR-RAG | GLM | 0.865 | 0.868 | 0.866 | 2.71 |
| AHR-RAG | Baichuan | 0.867 | 0.857 | 0.862 | 2.68 |
Table 9
Accuracy test of single-hop and multi-hop queries of intelligent Q&A research on crop pests and diseases
| 模型 | 单跳查询 | 多跳查询 | ||||
|---|---|---|---|---|---|---|
| Recall | Precision | F 1 | Recall | Precision | F 1 | |
| Qwen | 0.681 | 0.722 | 0.701 | 0.469 | 0.461 | 0.465 |
| Naive-RAG | 0.750 | 0.797 | 0.773 | 0.603 | 0.593 | 0.598 |
| Self-RAG | 0.843 | 0.882 | 0.862 | 0.678 | 0.666 | 0.672 |
| Adaptive-RAG | 0.861 | 0.892 | 0.876 | 0.701 | 0.689 | 0.695 |
| AHR-RAG | 0.895 | 0.921 | 0.908 | 0.723 | 0.748 | 0.735 |
| [1] |
韦一金, 樊景超. 基于ChatGLM2-6B的农业政策问答系统[J]. 数据与计算发展前沿(中英文), 2024, 6(4): 116-127.
|
|
|
|
| [2] |
赵泽行, 吴晓鹏, 王怡馨, 等. 基于知识图谱的农作物病虫害问答系统研究[J]. 智能化农业装备学报(中英文), 2024(4): 39-50.
|
|
|
|
| [3] |
|
| [4] |
|
| [5] |
|
| [6] |
|
| [7] |
|
| [8] |
|
| [9] |
|
| [10] |
|
| [11] |
|
| [12] |
|
| [13] |
|
| [14] |
|
| [15] |
|
| [16] |
|
| [17] |
|
| [18] |
于平. 基于大数据的深度学习网络爬虫算法在信息搜集与处理中的应用[J]. 科技资讯, 2024, 22(16): 55-57.
|
|
|
|
| [19] |
|
| [20] |
张朵朵, 张雪茹, 王永杰, 等. 基于C/S架构和MySQL数据库的肉类加工信息管理系统的设计与构建[J]. 食品与生物技术学报, 2024, 43(9): 99-106.
|
|
|
|
| [21] |
范晓磊, 陈钊, 高金萍. Elasticsearch在林业数据领域的应用[J]. 世界林业研究, 2025, 38(1): 60-66.
|
|
|
|
| [22] |
郑少帅, 翁境鸿, 蒋小洋. 基于BM25、文本Embeddings与交叉编码器的民航客服知识库检索研究[J]. 无线互联科技, 2023, 20(24): 122-125.
|
|
|
|
| [23] |
王苑铮, 范意兴, 陈薇, 等. 稠密向量实体检索模型的二值化提速压缩[J]. 模式识别与人工智能, 2023, 36(1): 60-69.
|
|
|
|
| [24] |
赵征宇, 罗景, 涂新辉. 基于多粒度语义融合的信息检索方法[J]. 计算机应用, 2024, 44(6): 1775-1780.
|
|
|
|
| [25] |
|
| [1] | YANG Feng, YAO Xiaotong. Lightweighted Wheat Leaf Diseases and Pests Detection Model Based on Improved YOLOv8 [J]. Smart Agriculture, 2024, 6(1): 147-157. |
| [2] | Huang Wenjiang, Shi Yue, Dong Yingying, Ye Huichun, Wu Mingquan, Cui Bei, Liu Linyi. Progress and prospects of crop diseases and pests monitoring by remote sensing [J]. Smart Agriculture, 2019, 1(4): 1-11. |
| Viewed | ||||||
|
Full text |
|
|||||
|
Abstract |
|
|||||