Talking to Your Graph Database with LLMs Using GraphChat
In the latest Memgraph Community Call, Katarina from the Dev Experience team teamed up with Toni Lastre, Head of Platform at Memgraph, to dive into something super cool: GraphChat. It’s a feature in Memgraph Lab and a powerful tool that bridges natural language queries and graph databases using LLMs.
Wait what?
GraphChat lets you talk to your graph database in plain English—there is no need to mess with complex query languages.
Toni didn’t just explain how it works; he gave a live demo, showing off its capabilities and teasing some exciting new features. If you’ve ever wanted to make interacting with your graph database as easy as chatting with a friend, this session is a goldmine.
Watch the full webinar recording – From Questions to Queries: How to Talk to Your Graph Database With LLMs?
In the meantime, here are the key talking points from the webinar.
Talking Point 1: The Challenges of Large Language Models (LLMs)
Models like GPT handle vast general knowledge but struggle with proprietary datasets due to context window constraints and the risk of exposing sensitive information.
Retrieval-Augmented Generation (RAG) and fine-tuning are two approaches to bridging this gap. RAG is more scalable for dynamic and frequently updated data.
Talking Point 2: GraphChat, A Natural Language Gateway to Graph Databases
GraphChat uses natural language to generate Cypher queries, enabling users to interact with the Memgraph database without needing to know query language.
Two-Phase Process:
- Generate Cypher queries: Converts user questions into executable queries.
- Summarize results: Translates graph data into human-readable responses.
Talking Point 3: Demo
The new, recently released version of Graph Chat can handle follow-up queries by remembering conversation context, a significant upgrade from the current version.
Tony showcased how Graph Chat navigates datasets like the Pandora Papers and TED Talks, demonstrating its ability to uncover insights effortlessly.
A forthcoming feature allows Graph Chat to retry and refine queries automatically when initial attempts fail, enhancing reliability.
Talking Point 4: GraphChat as a GraphRAG
GraphChat is a GraphRAG system by definition. A GraphRAG combines the strengths of knowledge graphs (KG) and large language models (LLMs) to enhance data retrieval and reasoning. While many GraphRAG implementations focus on techniques like relevance expansion and pivot searches, GraphChat takes a slightly different approach by leveraging Cypher query generation. This makes it uniquely suited for interacting with graph databases, offering an intuitive way to query and navigate knowledge graphs while maintaining the core principles of GraphRAG.
Talking Point 5: Upcoming Enhancements
- Expanded context. The next version will integrate conversation history and error recovery.
- Fine-tuning and flexibility. Users can switch between multiple LLM configurations, fine-tune models, and apply LLM insights across other Memgraph Lab features like data modeling and visualization.
Talking Point 6: Integrating Memgraph with Vector DB RAG
Memgraph complements vector databases by leveraging its knowledge graph structure for multi-hop reasoning and relevance expansion. This hybrid workflow enriches AI-powered search systems.
Q&A
We’ve covered the Q&A session in the Community call and the side-bar chat, where our Memgraph team provided detailed responses to all questions.
Conclusion
This Community Call was a deep dive into how Graph Chat simplifies interaction with graph databases, blending the power of LLMs with Memgraph’s graph capabilities. Whether you’re managing complex datasets or just exploring conversational AI, GraphChat offers an intuitive way to use graph databases for actionable insights.
For a closer look at the demo, detailed use cases, and future advancements, watch the full webinar recording— From Questions to Queries: How to Talk to Your Graph Database With LLMs?
It’s a must-watch for anyone looking to improve their data workflows with graph-powered AI!
Further Reading
- Memgraph Lab 101: Simplify Graph Data Exploration with Visualization and Querying
- Memgraph AI Ecosystem
- How Precina Health Uses Memgraph and GraphRAG to Revolutionize Type 2 Diabetes Care with Real-Time Insights
- Using Memgraph for Knowledge-Driven AutoML in Alzheimer’s Research at Cedars-Sinai
- How Microchip Uses Memgraph’s Knowledge Graphs to Optimize LLM Chatbots
- Building GenAI Applications with Memgraph: Easy Integration with GPT and Llama
Memgraph Academy
If you are new to the GraphRAG scene, check out a few short and easy-to-follow lessons from our subject matter experts. For free. Start with: