Zero Labs
Industry News / AI

Stop Picking Between Vector and Graph. Real Production AI Needs Three Databases.

Source · Towards AI By Sudip P.

From the publisher’s feed, collected in the ZeroLabs newsroom.

Quick note: the numbers in this post (latencies, drift percentages, timelines) are realistic composites from multiple projects, not from a single client engagement.You will not avoid this forever. At some point, a compliance officer, a CFO, or someone from customer success will ask your RAG system a question it simply cannot answer. The system will not admit that. It will answer anyway, with full confidence, and it will cite three documents that never existed.The first reaction is almost always the same. Someone says, “The vector store must be missing context.” So you embed more. You chunk smaller. You add a reranker. Six weeks go by, your accuracy graph refuses to move, and then someone finally says the quiet part out loud: “Why are we treating a similarity index as our source of truth?”The real trap is not vector vs graph. The real trap is trying to force one database to act as the system of record for everything.This post is a follow‑up to VectorDB vs GraphDB: The Architectural Trap That Breaks Production AI Systems. That one lays out the quiet failure mode that creeps in after week three in production, the seven questions to diagnose it, and why embedding ownership chains as plain text doesn’t work (even with aggressive reranking).Read that first, or you’ll design the wrong thingIf you’re running vector‑only RAG in production right now, go read the original. Three things I won’t re‑derive here:The three early signs that your retrieval has drifted away from ground truth.Why stuffing relationships into text fails, even with rerankers stacked on top.The seven‑question test to see if you’re misusing a vector DB as a system of record.Seriously. Read it, then come back.Why “one DB to rule them all” never worksThree different jobs. Three completely different shapes of data. Trying to make a single store do all three is how you end up paged on a Sunday night.Vector databases are amazing at semantic search. But in most stacks, they are not systems of record. Their metadata layers often have weak transactional guarantees, and they don’t have a native concept of identity beyond a chunk ID. Update the source document, and the old chunk stays stale until a reindex happens. And reindexing is rarely as fast as your business needs.Graph databases are great at capturing structure. But they’re slow and expensive at bulk text retrieval. That’s not a flaw; it’s just how their indexes work.Relational databases are the boring workhorse you can actually trust. ACID, constraints, decades of maturity. But they’re useless on their own for “what is semantically near this question” or “find entities within three hops.”Each one does exactly one job well. Pretending otherwise is what creates production failures.War story one: the driftThe first time drift hit us, it was late on a Sunday. A customer‑success rep asked the assistant which enterprise vendors had been deactivated that week. The assistant replied with six names. Two of those vendors were still active.The relational database had the correct status. The operations dashboard had the correct status. But a vector chunk created eleven days earlier still contained the phrase “pending deactivation as of [date].” The reranker loved the lexical match and pushed it to the top. The only reason we caught the mistake was because the rep double‑checked the dashboard. There was no alert. There was no metric for “the answer contradicts the system of record.” The system was wrong, and it stayed wrong without telling anyone.For a deeper look at why this pattern repeats, see retrieval drift causes.The reference architecture that finally workedAfter we pulled the system of record out of the vector store and stopped the bleeding, this is what we landed on.Three storage layers, one job each.Relational DB: System of record. If it has to be true, it lives here.Vector DB: Semantic retrieval. Embeddings of the unstructured content the LLM reasons over.Graph DB: Relationships, lineage, permissions, multi‑hop. Who owns what, what touches what, who can see what.Two flows.Query time. The orchestrator parses the question. Resolves entities against the relational DB first. Runs a graph traversal to expand structural context. Embeds the enriched query. Retrieves chunks from the vector store. Then hands the fused context to the LLM.Ingestion. Source changes hit an event bus. A processor extracts entities and edges into the graph, chunks and embeds text into the vector store, and writes authoritative records into the relational DB. One write, three coordinated updates.The messy implementation details that matterThis is the part where teams get the architecture perfect on a whiteboard and then break it in code.The event bus is the contract. The three stores never write to each other directly. All source changes go to the bus, and each store has one consumer that listens to it. We learned this lesson the painful way. The old design wrote to all three stores synchronously, and partial failures quietly dropped data. For months, nobody realized the graph was missing about twelve percent of the edges that existed in the relational database.Every consumer needs to be idempotent. Each ingestion message should include a stable content hash and a logical timestamp. If you replay the queue twice, the end state should be identical. You should test this. Replay a full day of events into a staging cluster and compare the results to production.Entity resolution comes first. At query time, the orchestrator resolves the entity in the relational database before doing any retrieval. The relational database tells you who the user meant. The graph tells you what surrounds that entity. The vector store tells you what has been written about it. Skip that first step, and you will get confident answers about the wrong company.Cap graph traversal. Most real queries need one or two hops. Not five. A bounded BFS with a hop limit and a result cap is essential for predictable performance.For a deeper look at why these patterns repeat, see hybrid retrieval design.War story two: the traversal blowupThe traversal blowup arrived the same morning a new corporate‑actions feed went live. A holding company had restructured, and the graph suddenly showed about 9,400 inbound edges pointing to a single node. The orchestrator’s three‑hop traversal, which normally sat around 80 milliseconds at p99, jumped to more than 7 seconds. PagerDuty fired on the synthesis timeout instead of the graph query, because nobody had wired the graph’s slow‑query log into the alerting system.We fixed the immediate issue by capping traversal at two hops and limiting results to 500 nodes. The deeper lesson was the missing alert, not the missing cap.Think of the LLM context window as a strict budget. The graph subgraph, the retrieved chunks, and the system prompt all have to fit. When someone says “the model hallucinated,” it often did not. The orchestrator simply stuffed too much into the context, and the model dropped the key entity.Version your embeddings. Each chunk should include the model name and version. When you upgrade models, backfill in batches. Avoid dual‑writes. Avoid recall loss during the transition. If you want to revisit the underlying retrieval logic, see hybrid retrieval design.What I got wrong the first timeThe cost of getting this architecture wrong is mostly invisible, until it isn’t. Here’s what I’d do differently:I put authoritative state in vector metadata and treated reindex as a soft consistency mechanism. It’s not. It’s a job that runs sometimes.I picked a graph DB before I had a single multi‑hop query that mattered. My team spent two months learning Cypher to model a domain that genuinely needed one join table.I let two teams build ingestion separately. The doc team owned the vector pipeline. The data team owned the graph. They computed different content hashes. We re‑embedded around 400k chunks twice before catching it.I measured RAG quality with top‑1 accuracy on a held‑out set. The hardest 8% of real questions dropped 30 points, but the headline number barely moved.I skipped the event bus and wrote synchronously to three stores. Partial failures produced partial state. Reconciliation took three weeks.I accepted “the model is hallucinating” as a sufficient explanation. Most of the time it was actually orchestrator overfill or wrong‑entity retrieval. The model was fine.I added a reranker every time retrieval looked weak. Reranking is not a substitute for missing structure. It’s a band‑aid on a structural problem.A simple decision framework: when NOT to add eachDefault to relational. The other two are additive, not foundational.Add a vector DB when:You have meaningful volumes of unstructured text that users need to search semantically.Keyword search is visibly failing (synonym misses, paraphrase misses).You’re building RAG and the corpus is too large to prompt‑stuff.Do NOT add a vector DB when:Your data is mostly structured rows. A WHERE clause beats embeddings every time.Your corpus fits inside the context window. Just stuff it.You haven’t tried hybrid keyword and metadata filtering yet. Most “we need vectors” problems are actually “we need better filters.”Add a graph DB when:Your domain has explicit, typed relationships that matter (ownership, lineage, access, supply chain).Multi‑hop queries (two or more) are common and slow in SQL.Explainability matters. You need to show the path between two entities to a regulator.Do NOT add a graph DB when:Your relationships are mostly one hop. A join table is fine.You haven’t modeled the schema carefully. Bad graph schemas are worse than no graph.Your team has no graph experience and the use case is borderline. The operational cost is real.Failure modes and how to spot themThere are three failure patterns that show up again and again. Each one has a clear signature if you know where to look. None of them appear in your usual latency or error‑rate dashboards, which is why teams miss them.Drift between sources of truth. The relational database says the vendor is closed. The vector store still has a chunk that says active. The graph still shows the relationship. Symptom: the system gives confident answers that disagree with your own internal tools. Detection: run a daily reconciliation job that samples entities and checks that all three stores agree on the canonical fact. Alert if drift exceeds half a percent. Start strict and relax only if needed.Retrieval regression that hides in plain sight. Someone updates the embedding model. The overall accuracy looks fine. But a specific slice of questions, usually the ones that matter most, drops sharply. Detection: segment your eval set. Tag questions by category. Track accuracy per category. The aggregate number lies.Graph schema rot. New entity types get added as generic Thing nodes because nobody is maintaining the schema. Over time, half your edges become RELATED_TO and your traversals lose meaning. Detection: produce a weekly histogram of node and edge types. Any spike in generic types is a warning sign. Investigate before the orchestrator starts returning nonsense.The original post explains why these issues slip past standard observability and highlights the three metrics that surface them early. For more context, see hybrid retrieval diagnostics.A mini case study (illustrative)This is a composite, not from one specific engagement. But the pattern repeats.A mid‑stage fintech I’ll call NorthLedger built a “compliance copilot” on a vector‑only stack. Six months in, accuracy was strong on policy lookups (“what is our threshold for SAR filing?”) and miserable on relationship questions (“which transactions involve entities connected to the flagged Cayman shell?”).The team tried to fix it inside the vector store. They embedded entity relationships as text (“Vendor A is owned by Holdco B which is owned by…”), reranked harder, expanded chunk size. Nothing worked. They were trying to make a similarity engine do graph traversal.The fix took about six weeks:Stand up a graph DB. One‑time ETL from existing entity tables into nodes and edges.Add a graph‑traversal step before the vector retrieval. Extract entities. Expand N‑hop neighbors. Enrich the embedding query with that structural context.Move authoritative entity records back into the relational DB. Vector‑store metadata had been drifting for months.Accuracy on relationship questions improved substantially after the rebuild. The model didn’t change. The architecture did. (For the deeper explanation of why this hybrid pattern works, and why text‑embedded relationships fail even with rerankers, see the original post.)What to do this weekAudit your stack. For each storage system, write down the one job it does. If you can’t, you have an architecture problem before you have a code problem.Find the question your system fails on. Not the demo question. The one your hardest user actually asks. Semantic? Relational? Both? That tells you what’s missing.Build a segmented evals harness before adding a database. Per‑category accuracy catches what aggregate accuracy hides.Decouple ingestion from query. Put an event bus between source changes and stores. You’ll thank yourself when you swap a vector provider.Pick the smallest possible next step. Managed graph DB. A hundred entities. Not the whole domain.ClosingThe trap isn’t vector vs. graph. The trap is believing one database can be the system of record for everything an AI application needs to know.Teams shipping reliable AI in production don’t have a favorite database. They have three. Each doing one job.A compliance officer is going to ask the question that breaks your system. The only question is whether you’ve already built the architecture that survives it.If this was useful, the foundation for all of it is in VectorDB vs GraphDB: The Architectural Trap That Breaks Production AI Systems.Stop Picking Between Vector and Graph. Real Production AI Needs Three Databases. was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.