Generative AI

Vector Database vs. Graph Database: Lessons Learned from Marvel

Jaya Malhotra
Jaya Malhotra6 minutes read

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 Database vs Graph Database

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.

Vector RAG vs Graph RAG

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

Vector Database vs Graph Database for enterprises

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)

Vector RAG vs Graph RAG for banks

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?

What is Graph RAG?

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.

Like what you've read? Why not share it with a friend!
Jaya Malhotra
Jaya Malhotra
banner-dotsbanner-dots

Learn why businesses trust us to automate their pre-sales and post-sales customer journeys.

Schedule Demo

Recommended Reading: Check Out Our Favorite Blog Posts!

Recommended Reading: Check Out Our Favorite Blog Posts!

See more Blog Posts

Our achievements in numbers

plant icon

7+

years in the Enterprise Conversational AI space

crown icon

700+

global brands that we’ve worked with

message icon

50m+

customer conversations automated

public

10+

countries with deployed Chatbots