基于LangChain的张衡一号卫星RAG问答系统的研发

张元敬, 李忠, 黄建平, 泽仁志玛

电脑与电信 ›› 2025, Vol. 1 ›› Issue (8) : 61-66.

电脑与电信 ›› 2025, Vol. 1 ›› Issue (8) : 61-66.
应用技术与研究

基于LangChain的张衡一号卫星RAG问答系统的研发

  • 张元敬1, 李忠1, 黄建平2, 泽仁志玛2
作者信息 +

Research on the Zhangheng-1 Satellite RAG Question Answering System Based on LangChain

  • ZHANG Yuan-jing1, LI Zhong1, HUANG Jian-ping2, ZEREN Zhi-ma2
Author information +
文章历史 +

摘要

针对大语言模型在专业领域应用中存在的知识准确性不足、实时性欠缺和专业性局限等问题,提出了一种基于LangChain框架的张衡一号卫星电场数据RAG问答系统。通过融合RAG(Retrieval-Augmented Generation)技术与LLMs(Large Language Models)的推理能力,利用LangChain的模块化组件(包括LLMs接入、提示词模板和任务链编排)和Milvus向量数据库,实现了专业知识的动态检索与生成优化。实验数据来源于41篇张衡一号卫星电场领域的核心文献,涵盖电场异常检测、数据处理方法等研究方向。实验结果表明,相较于普通Qwen-Plus模型,RAG增强版本在科学参数描述和数据分析方法适用性方面展现出更优的专业性、实时性和准确性。这证实了RAG技术可有效解决LLMs在专业领域的知识局限性,为构建高可靠性的专业知识问答系统提供了可行的技术方案,具有重要的实践价值和理论意义。

Abstract

In view of the problems of insufficient knowledge accuracy, lack of real-time performance and professional limitations in the application of large language models (LLMs) in professional fields, this study proposes a retrieval-augmented generation (RAG) question-answering system based on the LangChain framework and the Zhangheng-1 satellite electric field knowledge graph. By integrating the reasoning ability of RAG technology and LLMs, and using LangChain's modular components (including LLMs access, prompt word templates and task chain orchestration) and Milvus vector database, dynamic retrieval and generation optimization of professional knowledge are achieved. The experimental data comes from 41 core papers in the field of Zhangheng-1 satellite electric field, covering research directions such as electric field anomaly detection and data processing methods. The test results show that compared with the ordinary Qwen-Plus model, the enhanced version of RAG shows better professionalism and accuracy in scientific parameter description and method applicability analysis. The study confirms that RAG technology can effectively solve the knowledge limitations of LLMs in professional fields and provide a feasible technical solution for building a highly reliable professional knowledge question-answering system, which has important theoretical value and practical significance.

关键词

LangChain / RAG / 张衡一号卫星 / 问答系统

Key words

LangChain / RAG / Zhangheng-1 satellite / question-answering system

引用本文

导出引用
张元敬, 李忠, 黄建平, 泽仁志玛. 基于LangChain的张衡一号卫星RAG问答系统的研发[J]. 电脑与电信. 2025, 1(8): 61-66
ZHANG Yuan-jing, LI Zhong, HUANG Jian-ping, ZEREN Zhi-ma. Research on the Zhangheng-1 Satellite RAG Question Answering System Based on LangChain[J]. Computer & Telecommunication. 2025, 1(8): 61-66
中图分类号: TP391.1   

参考文献

[1] Huang L,Yu W,Ma W,et al.A survey on hallucination in large language models: Principles,taxonomy, challenges,and open questions[J].ACM Transactions on Information Systems,2025,43(2):1-55.
[2] Peng B,Zhu Y,Liu Y,et al.Graph retrieval-augmented generation: A survey[J].arXiv preprint arXiv:2408. 08921,2024.
[3] Asai A,Wu Z,Wang Y,et al.Self-rag:Learning to retrieve,generate,and critique through self-reflection[C]//The Twelfth International Conference on Learning Representations.2023.
[4] Mei L,Mo S,Yang Z,et al.A survey of multimodal retrieval-augmented generation[J].arXiv preprint arXiv:2504.08748,2025.
[5] Fan W,Ding Y,Ning L,et al.A survey on rag meeting LLMss:Towards retrieval-augmented large language models[C]//Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining.2024:6491-6501.
[6] Zhao P,Zhang H,Yu Q,et al.Retrieval-augmented generation for ai-generated content:A survey[J].arXiv preprint arXiv:2402.19473,2024.
[7] Gao Y,Xiong Y,Gao X,et al.Retrieval-augmented generation for large language models:A survey[J].arXiv preprint arXiv:2312.10997,2023,2(1).
[8] Fan W,Ding Y,Ning L,et al.A survey on rag meeting llms:Towards retrieval-augmented large language models[C]//Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining.2024:6491-6501.
[9] 黄建平,张富志,李忠,等.张衡一号卫星观测的震前电场数据扰动识别研究[J].中国科学:地球科学,2023,53(8):1834-1843.
[10] Zhima Z,Dapeng L,Xiaoying S,et al.Current status and scientific progress of the Zhangheng-1 satellite mission[J].Reviews of Geophysics and Planetary Physics,2023,54(4):455-465.

基金

中央高校基本科研业务费研究生科技创新基金,项目编号:ZY20250333; 河北省地震灾害仪器与监测技术重点实验室开放基金,项目编号:FZ224104

Accesses

Citation

Detail

段落导航
相关文章

/