融合知识图谱与检索增强生成的地方文化智能问答系统——以嘉兴为例
A Local Culture Intelligent Q&A System Integrating Knowledge Graph and Retrieval-Augmented Generation—A Case Study of Jiaxing
摘要: 嘉兴地方文化资源丰富,但智能化传播服务相对不足,传统问答方式在跨资源关联查询能力和回答事实可信度方面存在明显短板。针对上述问题,本文设计并实现了融合知识图谱与检索增强生成(Retrieval-Augmented Generation, RAG)技术的“嘉言善行”地方文化智能问答系统。系统基于Neo4j图数据库构建覆盖名人、非遗、地方史志三大主题的知识图谱,基于Chroma向量数据库构建向量语义知识库,采用“图谱精确查询 + 向量语义召回”的双引擎混合检索策略,由大模型借助RAG技术生成自然语言答案,并辅以检索约束、答案清洗、来源标注三层防幻觉机制。系统采用Spring Boot 3与Vue 3的前后端分离架构,已建成MySQL结构化数据800余条、向量知识库文档532条、知识图谱实体135个与关系85条,设计测试问题30个与推荐专题问题20个,后端单元测试10个用例全部通过,前后端联调验证正常。实验结果表明,系统能够针对地方文化问题提供事实可靠、来源可溯的问答结果,为地方文化数字化传播提供了一套可复用的轻量化技术方案。
Abstract: Aiming at the abundant local cultural resources of Jiaxing but the lack of intelligent dissemination services, this paper designs and implements “Jiayan Shanxing”, an intelligent Q&A system integrating knowledge graph and retrieval-augmented generation (RAG) for local culture. The system builds a knowledge graph covering celebrities, intangible cultural heritage (ICH) and red culture over the Neo4j graph database, and constructs a vector semantic knowledge base over the Chroma vector database. Through a dual-engine hybrid retrieval of “precise graph query plus vector semantic recall”, answers are generated by a large language model with RAG, supported by a three-layer anti-hallucination mechanism of retrieval constraint, answer cleaning and source annotation. Built with Spring Boot 3 and Vue 3, the system has established more than 800 structured records in MySQL, 532 documents in the vector base, and 135 entities with 85 relations in the knowledge graph; 30 typical test questions and 20 recommended questions are designed, and all 10 unit test cases pass with front-end and back-end integration verified. Experimental results show that the system can provide fact-reliable and source-traceable answers to local culture questions, offering a reusable lightweight technical solution for local cultural digital dissemination.
文章引用:胡力豪, 梅传榆, 杨铭熙, 陆贝妮. 融合知识图谱与检索增强生成的地方文化智能问答系统——以嘉兴为例[J]. 计算机科学与应用, 2026, 16(11): 184-192. https://doi.org/10.12677/csa.2026.1611335

参考文献

[1] 王晓光, 谭旭, 夏生平. 敦煌智慧数据研究与实践[J]. 数字人文, 2020(4): 11-23.
[2] 王晓光, 侯西龙, 程航航, 等. 敦煌壁画叙词表构建与关联数据发布[J]. 中国图书馆学报, 2020, 46(4): 69-84.
[3] 中国历代人物传记资料库(CBDB) [EB/OL].
https://cbdb.hsites.harvard.edu/, 2026-09-20.
[4] Europeana Foundation: Europeana Collections.
https://www.europeana.eu/, 2026-09-20.
[5] 李永卉, 周树斌, 周宇婷, 等. 基于图数据库Neo4j的宋代镇江诗词知识图谱构建研究[J]. 大学图书馆学报, 2021, 39(2): 52-61.
[6] 彭博. 数字人文视角下的网络文物信息资源知识图谱构建[J]. 图书馆论坛, 2023, 43(2): 57-66.
[7] Lewis, P., Perez, E., Piktus, A., et al. (2020) Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Proceedings of the 34th International Conference on Neural Information Processing Systems, Vancouver, 6-12 December 2020, 9459-9474.
[8] 王守会, 覃飙. 知识库问答系统研究进展[J]. 小型微型计算机系统, 2021, 42(9): 1793-1801.
[9] 闫悦, 郭晓然, 王铁君, 等. 问答系统研究综述[J]. 计算机系统应用, 2023, 32(8): 1-18.
[10] 王帅, 何文春, 王甫棣, 等. 大语言模型融合知识图谱与向量检索的问答系统[J]. 科学技术与工程, 2024, 24(32): 13902-13910.
[11] 冯拓宇, 李伟平, 郭庆浪, 等. 大语言模型增强的知识图谱问答研究进展综述[J]. 计算机科学与探索, 2024, 18(11): 2887-2900.
[12] 叶蕾, 张宇迪, 杨旭华. 利用知识图谱的多跳可解释问答[J]. 小型微型计算机系统, 2024, 45(8): 1869-1877.
[13] Edge, D., Trinh, H., Cheng, N., et al. (2024) From Local to Global: A Graph RAG Approach to Query-Focused Summarization. arXiv: 2404.16130.
https://arxiv.org/abs/2404.16130
[14] 李倩, 黄斌. 多智能体协作框架下图检索增强生成式问答系统构建研究——以图书馆领域为例[J]. 图书情报工作, 2026, 70(16): 181-199.