欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture

• •    

基于领域HyDE查询增强与LightRAG的水稻种植检索增强生成方法

裴丽娜1, 淦欣喆1(), 陈明1,2(), 郭钦鸿1   

  1. 1. 上海海洋大学信息学院,上海 201306,中国
    2. 农业农村部渔业信息重点实验室,上海 201306,中国
  • 收稿日期:2026-06-18 出版日期:2026-10-09
  • 基金项目:
    国家重点研发计划项目“大口黑鲈和罗非鱼种质资源挖掘、遗传鉴定和利用”(2022YFD2400801); 广东省重点领域研发计划项目“陆基池塘智慧养殖场关键技术研究与示范”(2021B0202070001)
  • 作者简介:

    裴丽娜,硕士,研究方向为质量评价、品质研究、数据库等。E-mail:。

  • 通信作者:
    陈明,博士,教授,研究方向为水产物联网、数据挖掘、大模型等。E-mail:。
    淦欣喆,硕士研究生,研究方向为大模型与知识图谱应用。E-mail:。

A Retrieval-Augmented Generation Method for Rice Cultivation Based on Domain-HyDE Query Enhancement and LightRAG

PEI Lina1, GAN Xinzhe1(), CHEN Ming1,2(), GUO Qinhong1   

  1. 1. College of Information Technology, Shanghai Ocean University, Shanghai 201306, China
    2. Key Laboratory of Fisheries Information, Ministry of Agriculture and Rural Affairs, Shanghai 201306, China
  • Received:2026-06-18 Online:2026-10-09
  • Foundation items:National Key Research and Development Program of China "Germplasm Resource Mining, Genetic Identification and Utilization of Largemouth Bass and Tilapia"(2022YFD2400801); Guangdong Provincial Key-Area R&D Program "Key Technologies and Demonstration of Smart Land-Based Pond Aquaculture Farms"(2021B0202070001)
  • About author:

    PEI Lina, E-mail: .

  • Corresponding author:
    CHEN Ming, E-mail: .
    GAN Xinzhe, E-mail: .

摘要:

【目的/意义】 针对水稻种植智能问答中短查询专业术语不足、用户表达与领域知识表述不一致以及复杂问题证据召回不充分等问题,研究领域假设性文档嵌入(Hypothetical Document Embeddings,HyDE)与简单高效的检索增强生成框架(Simple and Fast Retrieval-Augmented Generation,LightRAG)的融合方法,分析领域适配与关系检索的增量作用。 【方法】 以通义千问2.5系列70亿参数指令模型(Qwen2.5-7B-Instruct)为基座,采用低秩适应(Low-Rank Adaptation,LoRA)生成领域假设性文档,通过主题和实体关键词检索证据,并以排序融合与字符预算组织上下文。在100题水稻种植开放性问题测试集上比较五种方法,开展逐题统计分析、60题关系分层诊断及固定条件关系通道消融。 【结果和讨论】 领域HyDE+LightRAG与LightRAG的三维平均分分别为3.629和3.515,多重比较校正后差异不显著(p=0.903)。LightRAG较朴素检索方法提高0.893分(校正后p<0.001)。60题诊断中前8项召回率由0.829升至0.885;100题消融增量为0.022 5,95%置信区间为[0.000 0, 0.055 0]。 【结论】 领域HyDE能够补充专业术语和隐含条件,但在当前同域、小样本和稀疏图谱条件下,相对LightRAG尚未表现出稳定显著优势。系统主要增益来自LightRAG,关系通道仅提供有限排序辅助,不足以支持稳定的高层关系推理。少样本方法可作为资源受限时领域LoRA适配的低成本替代方案。

关键词: 检索增强生成, 假设性文档嵌入, 查询增强, LightRAG, 低秩适应微调, 水稻种植

Abstract:

[Objective] Rice cultivation question answering often starts from short, colloquial, or underspecified user queries. Such queries may omit agronomic terminology, growth-stage constraints, environmental conditions, or the management objectives that are needed to retrieve relevant evidence. This study develops and diagnoses a retrieval-augmented generation (RAG) workflow that combines hypothetical document embeddings (HyDE) with the Simple and Fast Retrieval-Augmented Generation framework (LightRAG), while deliberately positioning the main contribution on the query side rather than claiming new high-level graph reasoning. The study asks three questions: whether LightRAG accounts for most of the improvement over flat text retrieval; whether a domain low-rank adaptation (LoRA)-HyDE generator adds a measurable benefit over LightRAG, generic HyDE, or Few-shot HyDE with a fixed prompt; and whether relation information remains useful when the underlying rice knowledge graph is sparse. [Methods] Qwen2.5-7B-Instruct was used as the common base model. A LoRA adapter trained on rice-cultivation question–hypothetical-document pairs generated retrieval-oriented documents that supplemented the original query with domain terms, potential application conditions, and management intents. High-level topic keywords and low-level entity keywords were extracted from the original and hypothetical texts. They were used to query the relation, entity, and text-chunk indexes in LightRAG. Candidate evidence was organized using fixed limits on the top K ranked candidates (TopK), weighted ranking, reciprocal rank fusion (RRF), a character budget, deduplication, and source metadata. The audited Neo4j graph contained 11 682 nodes and 14 043 relationships. Its average undirected degree was 2.310, 14.732% of nodes were isolated, the average clustering coefficient was 0.032 5, and 2 284 connected components were present. These values were treated as structural limitations rather than evidence of graph quality. The main evaluation used the fixed 100-question Rice Cultivation Open Questions Test Set (RCOQ-H100). Answers from Naive RAG, LightRAG, generic HyDE plus LightRAG, fixed three-example Few-shot HyDE plus LightRAG, and domain LoRA-HyDE plus LightRAG were rated anonymously by two agronomy experts and three independent large language model (LLM) raters. Question-level bootstrap confidence intervals, two-sided Wilcoxon tests with Holm correction across all ten pairwise comparisons, and Cohen's dz were reported. A separate, expert-checked 60-question balanced diagnostic contained twenty 0-hop, twenty 1-hop, and twenty 2-hop-or-more questions. It was frozen before any system answers were generated and was used to compare an entity–text baseline with relation-augmented retrieval at Top-8. The longest-common-subsequence variant of Recall-Oriented Understudy for Gisting Evaluation (ROUGE-L) and the semantic matching metric BERTScore, based on Bidirectional Encoder Representations from Transformers (BERT), were additionally calculated as reference-keypoint overlap measures; they were not interpreted as agronomic correctness or evidence of faithfulness. [Results and Discussions] The mean three-dimensional score was 3.629/5 for domain LoRA-HyDE plus LightRAG, 3.515/5 for LightRAG, 3.489/5 for generic HyDE plus LightRAG, 3.437/5 for Few-shot HyDE plus LightRAG, and 2.622/5 for Naive RAG. LightRAG exceeded Naive RAG by 0.893 points, with a 95% confidence interval of [0.692, 1.101], a Holm-adjusted p value below 0.001, and Cohen's dz of 0.852. This comparison accounts for most of the observed performance gain and reflects the capability of the existing LightRAG framework rather than a new contribution of the present study. Domain LoRA-HyDE exceeded LightRAG by only 0.115 points; the 95% confidence interval was [-0.077, 0.305], the raw p value was 0.226, the Holm-adjusted p value was 0.903, and Cohen's dz was 0.118. Domain LoRA-HyDE differed from generic HyDE by 0.141 points, with a 95% confidence interval crossing zero, while it differed from Few-shot HyDE by 0.192 points, with a 95% confidence interval of [-0.010, 0.389] and a Holm-adjusted p value of 0.099. Generic HyDE scored 0.026 points below LightRAG; this small, non-significant direction suggests that generated query terms may introduce drift or noise, but it does not establish a stable negative effect. In the independent 60-question diagnostic, the predefined graph-path coverage was 100% for all three hop strata. Overall recall among the top eight retrieved chunks (Recall@8) increased from 0.829 for entity–text retrieval to 0.885 for relation-augmented retrieval, a paired increase of 0.056 with a 95% confidence interval of [0.012, 0.117]. The 2-hop-or-more point estimate was positive, but its interval included zero. ROUGE-L and BERTScore likewise did not support the superiority of domain HyDE over LightRAG. In the expert-validated and frozen RCOQ-H100, the distribution of 0-hop/1-hop/2-hop-or-more questions was 59/2/39. Under a fixed-condition relation-channel ablation, overall Recall@8 increased by 0.022 5, with a 95% bootstrap interval of [0.000 0, 0.055 0], supporting only limited ranking assistance. The validation covered questions, reference key points, gold chunks, relation paths, and hop labels, but not a new blind rating of the 100×5 system answers; existing subjective ratings and the new stratified retrieval results were therefore reported by the experimental batch. [Conclusions] Under the present same-domain, small-sample, and sparse-graph conditions, domain LoRA-HyDE shows only a weak positive trend in blinded ratings, and the incremental differences over LightRAG, generic HyDE, and Few-shot HyDE are not statistically significant after multiplicity correction. The defensible contribution is therefore an engineering implementation and a diagnostic evaluation of query-side semantic supplementation with HyDE. Relation information provides limited assistance in evidence ranking in the current graph, but the evidence does not support claims of activated high-level graph reasoning or significantly improved coordinated recall. Fixed Few-shot HyDE is a cost-effective alternative when training resources are limited. The potential of LoRA adaptation and relation retrieval should be reevaluated with larger training data, better-connected graphs, more sensitive external evaluations, and independent document sources.

Key words: retrieval-augmented generation, hypothetical document embeddings, query enhancement, LightRAG, low-rank adaptation fine-tuning, rice cultivation

中图分类号: