
科学技术与工程

中国技术经济学会
Question Answering System Based on Large Language Model Integrating Knowledge Graph and Vector Retrieval
Shuai WANG , Wen-chun HE , Fu-di WANG , Xi-peng ZHAO , Yuan-yang ZHOU
Science Technology and Engineering ›› 2024, Vol. 24 ›› Issue (32) : 13902 -13910.
With the development of deep learning, large neural networks have been widely applied in the field of natural language processing. However, question answering systems based on large models are suffered from problems such as hallucination, failure, and expiration, and are unable to effectively capture complex relationships between entities, leading to biased results. In view of this, a question answering system that integrated knowledge graphs and vector retrieval with fine-tuned large language models was proposed. The system leveraged fine-tuned large models to achieve the construction and application of knowledge graphs, enabling multi-model hybrid calls; it also combined knowledge graph search and vector search to optimize retrieval results. The system comprised four modules: graph query model fine-tuning, knowledge graph extraction model fine-tuning, knowledge graph and vector database construction, and fusion retrieval and ranking. The graph query model and knowledge graph extraction model were used to generate graph query statements and extract triple knowledge, respectively. The knowledge graph was stored in Neo4j, while text vectors were stored in postgres vector(PGVector). The fusion retrieval comprehensively utilized knowledge graph and vector search results. The results show that on the stanford question answering dataset(SQuAD), the fusion retrieval method is achieved an F1 score of 0.77, outperforming the single knowledge graph retrieval (0.73) and vector retrieval (0.74) methods. Expert evaluation also indicates that the fusion method yields the best results. The proposed integrated question answering system can fully leverage the advantages of large models, knowledge graphs, and vector retrieval, improving the accuracy and comprehensiveness of question answering. Future research can be conducted in areas such as knowledge graph updates, model bias reduction, and system optimization.
knowledge graph / large language model / question-answering system / fine-tuning / vector retrieval
/
| 〈 |
|
〉 |