The adoption of generative AI is transforming industries. However, these systems often hallucinate, creating information that seems plausible but is factually incorrect. This issue arises as large language models (LLMs) are primarily trained on vast datasets without a deep understanding of contextual relationships within the data.
Graph databases and knowledge graphs offer a solution. Unlike traditional databases, which store data in structured tables with rows and columns, graph databases represent data as nodes and relationships, allowing for efficient retrieval of contextual information.
Accessing interconnected data in traditional databases often requires joining multiple tables, which becomes computationally expensive and impractical as datasets grow.
Neo4j’s director of technology solutions, Kris Payne, told iTnews Asia that knowledge graphs act as a factual repository that complements LLMs.
“By integrating a graph database with an LLM, enterprises can achieve a hybrid system where the graph database serves as the “left brain” - the factual, logical core - while the LLM provides the “right brain,” enabling natural language understanding and creative output.
Together, they deliver reliable, contextually accurate responses, improving upon standalone AI systems,” he said.
Enhancing AI accuracy with graph databases
Graph databases address the limitations of LLMs by grounding them in factual, structured data, explained Payne.
At the core of this approach are knowledge graphs, which store interconnected and factual information, ensuring AI models maintain an accurate understanding of complex datasets, he added.
When a question is posed to an AI model using a knowledge graph, a Retrieval-Augmented Generation (RAG) process is employed. The question is vectorised (converted into a machine-readable format) and sent to the knowledge graph.
Relevant nodes and relationships are identified to gather context, which is then returned to the application and integrated with the language model. This process enriches the AI's output with context.
According to Payne, the process begins with integrating live data into the knowledge graph, often uncovering overlooked or undocumented information.
This approach offers organisations a holistic view of their data landscape.
"Graph data science adds further value with advanced algorithms including PageRank, which evaluates the importance and connections of nodes within the graph,” he said.
Additionally, the continuous ingestion and expansion of the knowledge graph keep the system updated with the steady flow of new data generated by organisations.
This foundation enhances data reliability and equips LLMs with a factual, well-connected knowledge base. By combining these elements, graph databases not only reduce hallucinations but also empower AI models to deliver accurate and contextually relevant insights.
Key metrics for monitoring graph database performance
APAC IT leaders are turning to graph databases to address the challenge of minimising AI hallucinations, where systems generate plausible yet incorrect outputs. Ensuring these databases deliver reliable results requires tracking specific KPIs that combine technical precision with human validation.
According to Payne, the first step is establishing a foundational dataset of verified answers curated by domain experts.
This benchmark enables comparisons between AI-generated outputs and known truths, helping identify deviations.
Measuring the percentage of outputs aligning with this baseline, the truthfulness score indicates the database's reliability. A higher score reflects the system's ability to provide accurate, context-aware information.
Similarly, minimising variance between baseline and AI-generated responses ensures alignment with real-world knowledge.
According to Payne, the integrity of the knowledge graph itself is critical.
“Regular audits of relationships and data consistency within the graph underpin effective AI reasoning.”
Payne also highlights the importance of rapidly integrating user feedback to adapt the system and resolve errors.
He added that shorter error mitigation times demonstrate an organisation's agility and reinforce trust in its data ecosystem.
Future advancements
As AI systems evolve, graph databases are expected to play an important role in reducing hallucinations and improving accuracy, calling for future advancements.
This includes sophisticated data science capabilities integrated directly into graph databases.
Payne said algorithms including centrality analysis will allow organisations to identify critical data points and ensure accuracy.
This not only minimises errors but uncovers hidden insights across interconnected datasets.
These databases are evolving to support real-time adaptive learning, enabling AI systems to update their knowledge base as new data is ingested dynamically.
This reduces the lag in identifying and correcting inaccuracies, ensuring that the AI remains reliable as datasets grow.
Optimising graph database architecture enhances query speed and scalability, crucial for managing complex datasets while maintaining accuracy and performance, said Payne.
He added as explainability becomes a priority, graph databases will serve as a critical tool for tracing AI decision-making processes.
By mapping the relationships and data sources behind an AI's conclusions, organisations can validate outcomes and address inaccuracies, he added.
What future graph databases will look like
Future graph databases will include a range of algorithms tailored to specific industry needs.
For example, algorithms that detect anomalies in financial transactions or optimise supply chain operations will provide actionable insights while maintaining data accuracy.
Improved interoperability with other AI and database systems will enhance the role of graph databases.
Payne said integration with existing tech stacks will make it easier for organisations to leverage graph-based insights alongside their current tools.
“As the AI landscape evolves, one thing is clear: achieving accuracy and trustworthiness is no longer optional – it is a strategic imperative. Graph databases and knowledge graphs offer a path forward, addressing the limitations of generative AI,” he said.