Welcome to Smart Agriculture 中文

Smart Agriculture

   

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: .

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

CLC Number: