This research explores the integration of graphical databases and Retrieval-Augmented Generation (RAG) in enhancing the query accuracy of Large Language Models (LLMs) for academic advising. Conducted under the guidance of Dr. Wen Gu, the study focuses on leveraging graph-based knowledge representation to optimize course selection and academic decision-making processes for Emory University students.
The research employs Vector RAG and Graph RAG techniques to enhance query retrieval. Vector RAG converts textual queries into vector embeddings for semantic similarity searches, while Graph RAG structures academic relationships using a knowledge graph (KG). In a KG, nodes represent entities such as courses, prerequisites, and academic programs, while edges define their relationships. This structured approach facilitates a more comprehensive and contextually aware retrieval system, ensuring accurate and efficient responses to student inquiries.
The project integrates both a vector database and a knowledge graph database to enhance response generation. LangChain is employed
to interface the databases with LLMs, augmenting retrieval capabilities. To extract relevant information from the knowledge graph, the system
utilizes two key methods:
(1) Node Identification: Identifies key nodes within the graph and retrieves all immediately connected nodes relevant to the query.
(2) Cypher Query Generation: Translates natural language queries into Cypher queries, the query language used in Neo4j, to extract structured
academic data.
The comparative analysis demonstrates that the RAG system significantly outperforms conventional LLM-based retrieval models. While traditional LLMs often generate fragmented, inconsistent, or misleading responses, the graph-enhanced retrieval system ensures precise, structured, and contextually relevant outputs. This methodology effectively mitigates hallucinations in LLM-generated content by anchoring responses in a verified knowledge base.
Future research will explore further automation of knowledge graph construction and scalability for broader academic applications. The study underscores the potential of RAG-integrated LLMs in transforming AI-driven academic advising and structured information retrieval systems.