4.Engineering Research Center of Intelligent Technology for Agriculture,Ministry of Education,Huazhong Agricultural University,Wuhan 430070,Hubei,China
5.Key Laboratory of Smart Breeding for Ministry of Agriculture and Rural Affairs,College of Informatics,Huazhong Agricultural University,Wuhan 430070,Hubei,China
As user queries grow increasingly complex, existing Retrieval-Augmented Generation (RAG) models tend to treat questions as flattened token sequences during query processing, overlooking critical syntactic structure information and consequently degrading their ability to handle complex queries. To address this issue, this paper proposes a syntax-aware GraphRAG framework. The core innovation lies in incorporating dependency-based syntactic structures into the GraphRAG framework while employing Low-Rank Adaptation (LoRA) for efficient parameter adaptation. Specifically, prior linguistic features derived from dependency syntax trees are injected into both the retrieval and generation phases of the framework; meanwhile, LoRA is employed to achieve efficient parameter adaptation and fine-tuning of the LLaMA-3.1-8B-Instruct model. Experiments are conducted on two widely-used datasets, QALD-h and DBpedia QA, and the results demonstrate that our proposed framework outperforms baseline models across all key metrics. Ablation studies further confirm the performance gains brought by the incorporation of syntactic structures and parameter-efficient fine-tuning.
输入向量 x 的维度为d,如图4所示 x 同时流经上下两个分支:上路分支为冻结的预训练路径, x 与被冻结的“Pretrained weights”矩阵相乘,保留模型的通用知识且参数在微调过程中不发生改变;下路分为可训练的LoRA旁路通过矩阵 A (投影至低维隐空间)和矩阵 B (投影回原始空间)实现低秩变换。空间的维度r是LoRA的“秩”,决定了旁路的信息瓶颈宽度。最后,两条路径的输出在线性层后直接相加,得到最终的输出h。在反向传播时,梯度仅流经旁路中的 A 和 B 矩阵,而主路的 W 则保持不变。
案例1 多重约束查询。对于复杂查询“Which river that flows through Paris is longer than 500 kilometers ”,基线模型受到“longer”一词的强干扰,召回的文档是 “The Loire is France's longest river”,因此错误输出“Loire”。本文框架则通过依存句法分析精准锁定了包含“The Seine flows through Paris…”的关键语料,给出了正确答案“Seine”。该案例表明,当面对包含多重逻辑约束的查询时,句法信息能够更高效地穿透表层语义的迷惑,提升检索与生成的双重准确性。
案例2 布尔型查询。对于查询“Are the capital of Germany and Paris in the same time zone”,基础模型仅检索到关于柏林和巴黎的通用文本,无法给出明确结论。本文的框架通过“located”和"time zone”之间的依存关系引导检索器与解码器,获取更具时间针对性的地理事实,最终生成正确答案“Yes”。
案例4 并列结构查询。对于问题“List two European cities that are both capitals and have large international airports”,基础模型因注意力稀释仅正确生成一个城市,而本文框架通过句法分组对每个并列成分保持独立注意力聚焦,最终以高置信度输出“Paris and Berlin”。生成结果严格遵循依存树的结构约束,显著提升了列举答案的连贯性与完整性。
案例5 介词依附查询。对于“Which museum in New York was founded in 1870 ”,无语法引导的模型会检索纽约所有博物馆信息,最终无法生成有效答案,而本文框架通过“museum”与“founded”的依存对齐,将检索范围精准限定至大都会艺术博物馆的相关事实,并正确输出答案。
XIONGH Y, BIANJ, LIY C, et al. When search engine services meet large language models: Visions and challenges[J]. IEEE Transactions on Services Computing, 2024, 17(6): 4558-4577. DOI:10.1109/TSC.2024.3451185 .
[2]
SUW H, TANGY C, AIQ Y, et al. Parametric retrieval augmented generation[EB/OL]. 2025: arXiv: 2501.15915. DOI: 10.1145/3726302.3729957 .
[3]
POLIAKOVM, SHVAIN. Multi-meta-RAG: Improving RAG for Multi-hop queries using database filtering with LLM-extracted metadata[C]//Information and Communication Technologies in Education, Research, and Industrial Applications. Cham: Springer, 2025: 334-342. DOI:10.1007/978-3-031-81372-6_25 .
RENH Y, LIUJ P, WANGJ, et al. Research on intelligent question answering system based on large language model[J]. Computer Engineering and Applications, 2025, 61(7): 1-24. DOI:10.3778/j.issn.1002-8331.2409-0300 (Ch ).
CHENGZ Y, CHENX L, WANGJ, et al. Retrieval-augmented generative intelligence question answering technology based on knowledge graph[J]. Computer Science, 2025, 52(1): 87-93. DOI:10.11896/jsjkx.240900064 (Ch ).
[8]
BARRONR C, GRANTCHAROVV, WANNAS, et al. Domain-specific retrieval-augmented generation using vector stores, knowledge graphs, and tensor factorization[C]//2024 International Conference on Machine Learning and Applications (ICMLA). New York: IEEE Press, 2025: 1669-1676. DOI:10.1109/ICMLA61862.2024.00258 .
[9]
ZHAOX J, LIUS Y, YANGS Y, et al. MedRAG: Enhancing retrieval-augmented generation with knowledge graph-elicited reasoning for healthcare copilot[DB/OL].[2025-10-10]. DOI: 10.1145/3696410.3714782 .
[10]
JIANGX K, FANGY, QIUR H, et al. TC-RAG: Turing-complete RAG’s case study on medical LLM systems[EB/OL]. 2024: arXiv: 2408.09199. DOI: 10.18653/v1/2025.acl-long.558 .
[11]
PIYAF L, BEHESHTIR. Advancing feature extraction in healthcare through the integration of knowledge graphs and large language models[DB/OL].[2025-10-10]. DOI: 10.1609/aaai.v39i28.35224 .
[12]
YANGH, LIJ X, ZHANGC, et al. Large language model‒driven knowledge graph construction in sepsis care using multicenter clinical databases: Development and usability study[J]. Journal of Medical Internet Research, 2025, 27: e65537. DOI:10.2196/65537 .
[13]
FANH L, LIUC S, JANVISLOON E, et al. MaViLa: Unlocking new potentials in smart manufacturing through vision language models[J]. Journal of Manufacturing Systems, 2025, 80: 258-271. DOI:10.1016/j.jmsy.2025.02.017 .
[14]
WEIC Y, SHIY T, MUW B, et al. Large language models assisted materials development: Case of predictive analytics for oxygen evolution reaction catalysts of (oxy)hydroxides[J]. ACS Sustainable Chemistry & Engineering, 2025, 13(14): 5368-5380. DOI:10.1021/acssuschemeng.5c00798 .
[15]
WUC K, DINGW J, JINQ S, et al. Retrieval augmented generation-driven information retrieval and question answering in construction management[J]. Advanced Engineering Informatics, 2025, 65: 103158. DOI:10.1016/j.aei.2025.103158 .
[16]
YINJ Q, HINESJ, HERRONE, et al. ChatHPC: Empowering HPC users with large language models[J]. The Journal of Supercomputing, 2024, 81(1): 194. DOI:10.1007/s11227-024-06637-1 .
[17]
HINDIM, MOHAMMEDL, MAAZO, et al. Enhancing the precision and interpretability of retrieval-augmented generation (RAG) in legal technology: A survey[J]. IEEE Access, 2025, 13: 46171-46189. DOI:10.1109/ACCESS.2025.3550145 .
[18]
DONGH M, WANGW B, SUNZ J, et al. Knowledge graph construction for intelligent cockpits based on large language models[J]. Scientific Reports, 2025, 15: 7635. DOI:10.1038/s41598-025-92002-y .
[19]
ZHENGQ X, CHENM R, SHARMAP, et al. EvAlignUX: Advancing UX evaluation through LLM-supported metrics exploration[DB/OL].[2025-10-10]. DOI: 10.1145/3706598.3714045 .
PENGB C, ZHUY, LIUY C, et al. Graph retrieval-augmented generation: A survey[EB/OL]. 2024: arXiv: 2408.08921.
[22]
PROCKOT T, OCHOAO. Graph retrieval-augmented generation for large language models: A survey[C]//2024 Conference on AI, Science, Engineering, and Technology (AIxSET). New York: IEEE Press, 2024: 166-169. DOI:10.1109/AIxSET62544.2024.00030 .
[23]
EDGED, TRINHH, CHENGN, et al. From local to global: A graph RAG approach to query-focused summarization[EB/OL]. 2024: arXiv: 2404.16130.
[24]
HEX X, TIANY J, SUNY F, et al. G-Retriever: Retrieval-augmented generation for textual graph understanding and question answering[J]. Advances in Neural Information Processing Systems, 2024, 37: 132876-132907. DOI: 10.52202/079017-4224 .
[25]
GUY, GUTIÉRREZB, SHUY H, et al. HippoRAG: Neurobiologically inspired long-term memory for large language models[DB/OL].[2025-10-10]. DOI: 10.52202/079017-1902 .
[26]
ZENGZ F, CHENGQ, HUX C, et al. KoSEL: Knowledge subgraph enhanced large language model for medical question answering[J]. Knowledge-Based Systems, 2025, 309: 112837. DOI:10.1016/j.knosys.2024.112837 .
[27]
DE GIORGISS, GANGEMIA, RUSSOA. Neurosymbolic graph enrichment for grounded world models[J]. Information Processing & Management, 2025, 62(4): 104127. DOI:10.1016/j.ipm.2025.104127 .
[28]
HOC T, RENH X, KHAILANYB. VerilogCoder: Autonomous verilog coding agents with graph-based planning and abstract syntax tree (AST)-based waveform tracing tool[J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2025, 39(1): 300-307. DOI:10.1609/aaai.v39i1.32007 .
[29]
ZHANGY Y, YANGR Z, XUX Q, et al. TELEClass: Taxonomy enrichment and LLM-enhanced hierarchical text classification with minimal supervision[C]//Proceedings of the ACM on Web Conference 2025. New York:ACM, 2025: 2032-2042. DOI:10.1145/3696410.3714940 .
LUOM Q, ZHANGC X, PENGC, et al. Knowledge graph completion based on parsing graph embedding and a weighted graph convolutional network[J]. Scientia Sinica (Informationis), 2022, 52(11): 2037-2057 (Ch). DOI: 10.1360/ssi-2021-0217 .
[32]
XIANY T, LIP, PENGH, et al. Community detection in large-scale complex networks via structural entropy game[C]//Proceedings of the ACM on Web Conference 2025. New York: ACM, 2025: 3930-3941. DOI:10.1145/3696410.3714837 .
[33]
HUE J, SHENY L, WALLISP, et al. LoRA: Low-rank adaptation of large language models[EB/OL]. 2021: arXiv: 2106.09685.
[34]
ZHENGY, CHENY H, QIANB, et al. A review on edge large language models: Design, execution, and applications[J]. ACM Computing Surveys, 2025, 57(8): 1-35. DOI:10.1145/3719664 .
[35]
CHEND H, LIUY H, ZHOUM Y, et al. LLM for mobile: An initial roadmap[J]. ACM Transactions on Software Engineering and Methodology, 2025, 34(5): 1-29. DOI:10.1145/3708528 .
[36]
SARMAHB, MEHTAD, HALLB, et al. HybridRAG: Integrating knowledge graphs and vector retrieval augmented generation for efficient information extraction[C]//Proceedings of the 5th ACM International Conference on AI in Finance. New York:ACM, 2024: 608-616. DOI:10.1145/3677052.3698671 .
[37]
WANY W, CHENZ Y, LIUY, et al. Empowering LLMs by hybrid retrieval-augmented generation for domain-centric Q&A in smart manufacturing[J]. Advanced Engineering Informatics, 2025, 65: 103212. DOI:10.1016/j.aei.2025.103212 .