Study on the application of knowledge graph and large language model in question answering on water conservancy knowledge field
摘要
Accurate question answering (QA) services are essential for effective data organization, semantic understanding, and relational reasoning in smart water conservancy. While knowledge graphs offer a powerful foundation for such services, their application in the water conservancy domain faces significant challenges, including complex data structures, high annotation costs for training data, and the inherent limitations of systems built solely on pre-defined rules or graph structures. The primary methodological novelties of this work are a cost‑effective template‑based dataset construction method and a popularity‑enhanced entity linking algorithm. To address these issues, this paper focuses on the exploration and research of an extensible water conservancy knowledge QA system. We design a scalable system that integrates knowledge graphs, a document-based knowledge base, and large language models (LLM). The system employs a routing mechanism: for queries targeting structured knowledge within the knowledge graph, it uses template-based retrieval and inference to return subgraph answers; for queries answerable from provided documents, it combines an LLM with a similarity ranking algorithm to generate summarized answers with citations; for all other queries, it relies on the LLM’s intrinsic knowledge to provide direct text answers. Quantitative evaluations demonstrate the effectiveness of our proposed components: the NER model achieves an F1-score of 91.5% on a held-out test set; the entity linking module with popularity reranking shows a 7.2% improvement in top-1 accuracy over the embedding-only baseline; and the overall QA system achieves an end-to-end accuracy of 86.4% on a curated set of 500 diverse questions. Ablation studies validate the contribution of each key component. This approach ensures comprehensive answer coverage, significantly enhancing the user experience and practical utility of the water conservancy knowledge QA system.