Abstract:
To meet the demand for efficiency and professionalism in intelligent question-answering systems for the diabetes domain, this paper designs and implements DiaRAG, an intelligent question-answering system that integrates knowledge graphs and retrieval-augmented generation (RAG). The system proposes an Auto Prompt Generation (APG) method, which can automatically generate diabetes-specific prompt templates to extract the diabetes knowledge graph and construct a retrieval knowledge base. Additionally, this paper designs a fine-tuned reranker model to perform secondary filtering of community summaries from the diabetes knowledge graph, ensuring a high alignment between retrieval results and the patient’s inquiry intent. By deeply integrating knowledge graph with large language models (LLMs), the DiaRAG makes full use of external knowledge bases, significantly enhancing the question-answering capabilities in the diabetes domain. Experimental results demonstrate that DiaRAG outperforms existing systems in terms of answer accuracy, community summary relevance, and user experience, offering an innovative solution for personalized knowledge services in diabetes care.