双通道石油领域NL2Cypher方法OA
Dual-channel NL2Cypher Method for the Petroleum Domain
石油领域知识问答系统需要结合图数据库来确保模型输出回复的精确性和可解释性.将自然语言转换为Cypher图查询语言(Natural Language to Cypher,NL2Cypher)是保障问答系统精确性和高效性的关键环节.然而,现有方法在处理该领域自然语言查询时面临语义理解混淆和专业性缺失的挑战.为此,本文提出一种双通道方法,旨在提升查询转换的准确性和专业性.本文针对多节点关联的复杂语义查询,通过设计领域适配的指令来微调大语言模型,使其准确理解Cypher句法结构和语义信息;针对单节点精准查询,结合石油领域的专业知识构建图谱查询映射机制,对查询语句进行解析,约束生成的Cypher语句,提升石油领域专业性.此外,本文基于17800条油井现场数据构建一个面向石油领域的NL2Cypher数据集Oil2Cypher.实验结果表明,相比传统的单一模型或模板映射机制,该双通道方法在Cypher语句生成方面表现出色,显著提升了查询转换精度和效率.同时,多项实验分析验证了其在石油领域将自然语言查询转化为Cy-pher查询语句的有效性.
In the petroleum domain knowledge question-answering systems,the integration of graph databases is essential to en-sure the accuracy and interpretability of model outputs.Converting natural language into Cypher graph query language(Natural Language to Cypher,NL2Cypher)is critical for ensuring precision and efficiency in question-answering systems.However,ex-isting methods face challenges in semantic ambiguity and lack of domain expertise when processing natural language queries in this field.To address this,this paper proposes a dual-channel approach to enhance the accuracy and professionalism of query translation.For complex semantic queries involving multi-node associations,this method fine-tunes large language models(LLMs)via domain-adapted instructions to accurately understand Cypher syntax and semantic structures;for single-node pre-cise queries,it constructs a graph query mapping mechanism based on petroleum domain knowledge to parse query statements and constrain generated Cypher statements,thereby enhancing domain-specific professionalism.Additionally,this paper builds an NL2Cypher dataset for the petroleum domain,Oil2Cypher,based on 17800 records of oil well field data.Experimental results demonstrate that compared to traditional single-model or template-mapping methods,this dual-channel approach exhibits supe-rior performance in Cypher statement generation,significantly improving query conversion accuracy and efficiency.Multiple ex-perimental analyses further validate its effectiveness in transforming petroleum domain natural language queries into Cypher que-ries.
陈雪松;魏浩强;王浩畅;郑冠彧
东北石油大学电气信息工程学院,黑龙江 大庆 163318东北石油大学电气信息工程学院,黑龙江 大庆 163318东北石油大学计算机与信息技术学院,黑龙江 大庆 163318华南理工大学软件学院,广东 广州 510006
信息技术与安全科学
石油领域自然语言转换Cypher大语言模型参数高效微调双通道方法
petroleum domainnatural language to Cypher conversionlarge language modelparameter-efficient fine-tuningdual-channel method
《计算机与现代化》 2026 (9)
1-10,10
国家自然科学基金资助项目(61402099,61702093)
评论