Vector Database vs. Graph Database: Lessons Learned from Marvel
![](https://www.hellotars.com/blog/wp-content/uploads/2024/07/1720417022367-1-1024x587.png)
This blog has been adapted from our weekly newsletter. For more updates click here.
Vector databases have become a hot topic in the tech world. The appeal lies in their ability to quickly find similar information in unstructured data.
However, just like you ignored the red flags in your high school crush, this hype overlooks its limitations in understanding complex data and connecting the dots in the given information.
As we became aware of this limitation, we set out on a journey to find a better solution.
Vector Database vs. Graph Database: Tars on the Journey of Truth Retrieval (Half-Pun)
We trained two chatbots, one with Vector RAG and the other with Graph RAG. We chose the subtitles and Wikipedia page of Guardians of the Galaxy Vol. 3 as our data set for testing both chatbots’ querying capabilities.
Here are the results:
Vector RAG produced an incorrect answer by relying on the first match for the phrase “leader of Ravagers” without fully understanding the storyline. Its answer refers to a character who died in the second movie and is only briefly mentioned in the current plot. In contrast, Graph RAG provided the correct answer about the current leader by understanding recent plot developments.
When asked a question that requires a deep dive into the context of all aspects of the information within the data set, Vector RAG fails to connect the dots. On the other hand, Graph RAG retrieved the correct answer based on the information about the filmography of the director on the Wikipedia page.
When asked for specific details, Vector RAG did a good job locating and responding with accurate and concise information about the movie. The movie shows Rocket at different ages, so various actors voice him at these different stages of his life.
A trick question can confuse a Vector RAG-based chatbot. Adam Warlock’s character doesn’t die in the movie, as stated in the response generated by Graph RAG-based AI Agent.
When asked a query that involves reading between the lines and running semantic research, Vector RAG hovers around the point. In the output generated by Vector RAG, the first bullet point makes no sense, and then the information is repetitive. In contrast, Graph RAG interprets subtitles and delivers a clear answer.
Based on these results, we compared the requirements to more complex ones, such as those in the banking sector. Here’s how Vector RAG and Graph RAG will significantly impact AI Agents for enterprises.
Customer Experience in Banking: Vector RAG vs. Graph RAG
Let’s explore how customers might experience the difference between chatbots powered by vector databases and graph databases in common banking scenarios.
Account Overview
Vector database chatbot struggles with relational information, potentially frustrating customers.
Product Recommendations
Graph database provides personalized recommendations based on a holistic view of the customer’s financial situation, including recent life events and cross-account insights.
Complex Agent-Based Financial Planning (Near Future)
Graph RAG-based chatbots go beyond offering surface-level information. It provides a proactive, comprehensive plan by understanding the customer’s current financial situation and the implications of moving abroad.
It coordinates across multiple services (banking, currency exchange, bill payments, investments, and taxes) to provide deeper, more proactive assistance than basic information-giving chatbots.
What is Graph RAG? Why is it better at understanding complex relationships?
Vector databases turn text into vector embeddings that capture their meanings. This allows for fast similarity searches. When you ask something, the system finds text chunks with vector embeddings closest to your query. These texts help a large language model (LLM) respond. However, this method struggles with complex relationships.
Graph databases use Large Language Models (LLMs) to find entities and their relationships, which are expensive to set up initially. This creates a structured map of nodes (entities) and edges (relationships). When you ask a question, the system looks through the graph to find the relevant parts. The LLM then uses this information and the question to give a detailed answer.
In the battle of vector databases vs. graph databases, vector DB excels at similarity searches and handling unstructured data. However, they’re slightly behind graph databases in the race for accuracy.
Even when things seem identical, their level of precision can be poles apart. This is the same reason that surgeons can’t replace a scalpel with a butter knife. For industries like banking, which rely heavily on complex relationships and require sophisticated querying capabilities, graph databases are a better choice.
Learn why businesses trust us to automate their pre-sales and post-sales customer journeys.
Recommended Reading: Check Out Our Favorite Blog Posts!
Recommended Reading: Check Out Our Favorite Blog Posts!
![](https://www.hellotars.com/blog/wp-content/uploads/2024/09/tarsstellar_A_Gen_Z_adult_crammed_in_the_corner_like_theyre_try_9838760a-bade-438c-9e2b-bcda9275009b-768x430.png)
From ‘Sus’ to Success: Our AI Agents Will Translate Gen Z for the Rest
![Sorting Hat](https://www.hellotars.com/blog/wp-content/uploads/2024/07/Untitled-design-2-768x432.png)
Manufacturing the Hogwarts Sorting Hat Experience: The Mechanics of a Magical Hat
![Types of Artificial General Intelligence](https://www.hellotars.com/blog/wp-content/uploads/2024/06/Group-40019-768x439.png)
Types of Artificial General Intelligence: Is Your Enterprise Ready to Adapt to the Age of Advanced AI?
Our achievements in numbers
7+
years in the Enterprise Conversational AI space
700+
global brands that we’ve worked with
50m+
customer conversations automated
10+
countries with deployed Chatbots