计算机与现代化 ›› 2024, Vol. 0 ›› Issue (11): 54-63.doi: 10.3969/j.issn.1006-2475.2024.11.009

• 人工智能 • 上一篇    下一篇

基于ChatGLM2-6B的电力企业财务知识问答方法




  

  1. (国家电网有限公司华东分部,上海 200120)
  • 出版日期:2024-11-29 发布日期:2024-12-09
  • 基金资助:
    国家自然科学基金青年基金资助项目(62106180); 国网华东分部应用范式研究项目(SGHD0000CWQT2310144)

A Financial Knowledge Q&A Model for Power Enterprise Based on ChatGLM2-6B

  1. (East China Branch of State Grid Corporation of China, Shanghai 200120, China)
  • Online:2024-11-29 Published:2024-12-09

摘要: 随着电力系统规模的不断增长,在日常财务处理中产生了大量重复和复杂的工作内容,传统的财务知识组织和管理方式已经无法满足当前电力系统的需要。基于此,本文提出一种基于大规模语言模型ChatGLM2-6B构建财务事理图谱的方法,用于规范化财务管理和项目管理流程,辅助财务决策。首先,通过指令微调和提示学习等方式优化ChatGLM2-6B模型,使其分别从合同和票据数据中抽取出事件和事件关系对;其次,通过FAISS向量数据库将事件关系对保存为本地知识库,并训练一个FAISS-ERNIE相似度评估模型提升模型的知识检索能力,实现财务数据的智能问答;最后,利用层次聚类算法泛化事件关系对,分别得到合同事理图谱和票据事理图谱,用于对实时的财务操作进行规范化指引和监督,实现财务执行的透明化。实验结果表明,本文提出的方法在事件抽取、事件关系对抽取以及相似度检索等方面均展现出优异的性能,所构建的合同和票据事理图谱对于电力企业的财务管理具有重要意义,有助于提升企业管理水平。

关键词: ChatGLM2-6B, ERNIE, FAISS向量数据库, 指令微调, 提示学习

Abstract: With the continuous expansion of the scale of the power system, a significant amount of repetitive and complex tasks emerge in daily financial operations. Traditional methods of organizing and managing financial knowledge are no longer sufficient to satisfy the requirements of the current power system. With the consideration of this, the paper constructs a financial knowledge graph using the large-scale language model called ChatGLM2-6B. This method aims to standardize financial and project management processes and assist in financial decision-making. Firstly, the ChatGLM2-6B model should be optimized through instruction fine-tuning and prompt learning in order to extract event and event relationship pairs from financial contracts and invoice data, respectively. Then, the event relationship pairs are then stored as a local knowledge base using the FAISS vector database, additionally, a FAISS-ERNIE similarity evaluation model is trained to enhance the capability of knowledge retrieval, which could improve the question-answering ability of ChatGLM2-6B. Finally, hierarchical clustering algorithm is employed to generalize event relationship pairs, aiming to obtain contract knowledge graph and invoice knowledge evolutionary graph. These two graphs could be utilized to provide standardized guidance and supervision for real-time financial operations, achieving transparency in financial execution. The experimental results demonstrate that the method proposed in this paper exhibits excellent performance in event extraction, event relationship pair extraction, and similarity retrieval. The constructed contract and invoice knowledge evolutionary graphs hold significant implications for financial management in power enterprises, contributing to enhance the level of corporate management. 

Key words:  , ChatGLM2-6B, ERNIE, FAISS vector database, instruction fine-tuning, prompt learning

中图分类号: