Evolution from Vector Search to Graph-Based RAG for Enterprise Knowledge Systems

writer · Tech · 2024 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: enterprise knowledge retrieval and graph RAG

Writer needed enterprise RAG that could retrieve accurate evidence from dense, specialized, massive corporate knowledge bases where simple keyword search and vector chunking confused similar facts and produced hallucinations.

Constraints:

Architecture

Writer evolved from keyword search to vector search and then to a graph-based RAG architecture. The team trained specialized models to map enterprise text into graph nodes and edges, stored graph structures as JSON in a Lucene-based search engine, applied context-aware splitting, and combined knowledge graphs with fusion-in-decoder ranking to improve evidence aggregation, response time, and hallucination rates.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  enterprise-document-corpus["Enterprise document corpus"] --> context-aware-splitting["Context-aware splitting"]
  context-aware-splitting --> text-to-graph-model["Text-to-graph model"]
  text-to-graph-model --> lucene-json-graph-store["Lucene JSON graph store"]
  lucene-json-graph-store --> fusion-decoder-retriever["Fusion decoder retriever"]
  fusion-decoder-retriever --> answer-generator["Answer generator"]
  answer-generator --> benchmark-suite["Benchmark suite"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Enterprise document corpus Dense specialized enterprise knowledge that must be queried by end users. Context-aware splitting
Context-aware splitting Preserves context and semantic relationships before graph conversion. Text-to-graph model
Text-to-graph model Maps text into nodes and edges using a specialized fine-tuned model. Lucene JSON graph store
Lucene JSON graph store Stores graph structures as JSON in a search engine to avoid graph database scaling limits. Fusion decoder retriever
Fusion decoder retriever Uses knowledge graph relationships and two-stage passage ranking for evidence aggregation. Answer generator
Answer generator Generates answers from retrieved and ranked evidence. Benchmark suite
Benchmark suite Compares Writer's retrieval system against vector search baselines. —

Data flow

Enterprise documents are split with context awareness, converted into graph structures by a specialized model, stored as JSON in a Lucene-based search engine, retrieved with graph-aware search, passed through fusion-in-decoder style ranking and generation, and benchmarked against vector search systems for accuracy and response time.

“the team built it themselves and fine-tuned a model that was trained to map this data into graph structures of nodes and edges”transcript, stated
“we stored the data points as JSON in a lucine based search engine.”transcript, stated

Why this architecture

Writer chose graph-based retrieval because vector chunks lost relationships in concentrated enterprise data. When graph databases created scale and cost problems, storing graph JSON in a Lucene search engine matched the team's expertise while preserving relationships for downstream fusion-in-decoder evidence aggregation.

“this really helped us with our accuracy because we were able to preserve the relationships with the text and provide more context to to the model.”transcript, stated
“this allowed us to easily handle the large amounts of data without any performance or speed degradation uh at scale”transcript, stated

Models used: Writer-built text-to-graph model · Vector embeddings · Knowledge graph retrieval · Fusion-in-decoder · Lucene-based search engine · Robust QA benchmark

Scale

Alternatives considered (roads not taken)

Keyword search over a knowledge base.

Rejected because: It was adequate for basic keyword search but insufficient for advanced similarity search.

“it was good for basic keyword searches but not really great for that advanced similarity search that we needed.”transcript, stated

Vector embeddings with chunking and nearest-neighbor search.

Rejected because: Naive chunks could include conflicting facts and confuse retrieval in concentrated enterprise documents.

“with vector retrieval chunking and nearest neighbors can give inaccurate answers.”transcript, stated

Operate a graph database directly.

Rejected because: Graph conversion, cost, scaling, Cypher matching, and team expertise became bottlenecks.

“the structured graph was getting really challenging and costly at scale.”transcript, stated

Patterns

rag-retrieval (graph RAG)

Writer used graph relationships rather than plain vector chunks to retrieve more accurate enterprise evidence.

“that's what took took us to graph-based rag where instead we would query a graph database and get back the relevant documents using keys”transcript, stated

retrieval-ranking (fusion decoder)

Writer combined knowledge graphs with fusion-in-decoder and two-stage ranking to aggregate evidence more effectively.

“it uses the graph and then does this kind of two-stage ranking of the passages”transcript, stated

fine-tuning-adaptation (graph conversion)

The team fine-tuned a specialized model to convert text into graph nodes and edges.

“So the team built it themselves and fine-tuned a model that was trained to map this data into graph structures of nodes and edges”transcript, stated

Tradeoffs

Use a search engine to store graph data.

Chose Graph structures as JSON in Lucene over Scaling a graph database directly.

Rationale: The search-engine route preserved graph relationships while avoiding graph database performance, cost, and expertise bottlenecks.

“we take the graph structure we converted into JSON and we put it in the search engine”transcript, stated

Build a specialized text-to-graph model.

Chose A team-owned fine-tuned conversion model over Waiting for general small models or manually engineering graph conversion.

Rationale: At the time, the team did not have suitable off-the-shelf fast small models and had model-building expertise.

“at the time we didn't really have any options like that. So the team built it themselves”transcript, stated

Follow customer problems rather than hype.

Chose Problem-led graph RAG design over Implementing fashionable retrieval techniques without customer fit.

Rationale: The team attributes progress to solving customer retrieval failures rather than chasing a specific solution label.

“we're really focused on solving the customer problems rather than implementing specific solutions.”transcript, stated

Gotchas (what bit them)

Chunking can corrupt fact retrieval.

Root cause: Nearest-neighbor search may retrieve a chunk containing multiple nearby facts and select the wrong one.

Resolution: Preserve relationships with graph structures instead of relying only on naive chunks.

“it can get confused and it thinks that it was actually in 1983 instead of 1984 because it's in the same chunk as the introduction of the Lisa.”transcript, stated

Graph databases introduced operational friction.

Root cause: Graph conversion, cost, database scaling, Cypher matching, and expertise limits collided with production needs.

Resolution: Store graph JSON in a Lucene-based search engine and keep the implementation aligned with team expertise.

“as the graph database scaled, we were hitting the limits of our team's expertise as well as hitting some cost issues.”transcript, stated

Enterprise corpora are too semantically concentrated for simple similarity.

Root cause: Documents in the same enterprise domain often share vocabulary and entities, making nearest matches ambiguous.

Resolution: Use graph relationships and full-text/similarity combinations to add structure around the retrieved evidence.

“if you have a mobile phone company for example and they have thousands and thousands of documents that all use megapixels and cameras and battery life”transcript, stated

Evaluation

Writer benchmarked the graph-plus-fusion-decoder retrieval system against seven vector-search systems using Amazon's robust QA dataset, checking accuracy, response time, and hallucination rate.

Metrics: Accuracy · Fastest response time · Hallucination rate · Performance at scale · Evidence aggregation quality

“We used Amazon's robust QA data set and compared our retrieval system with knowledge graph and fusion decoder”transcript, stated
“we found that we had the the best accuracy and the fastest response time.”transcript, stated

Outcomes

The system targets terabytes of dense enterprise data, benchmarked against seven vector search systems, with explicit attention to regulated enterprise domains.

“Uh, and this was really interesting because at the time there actually weren't that many people doing graph-based rag”transcript, stated
“it really helped our hallucination rate. really drove it down”transcript, stated