RAG Over Unstructured Wikis Fails at Scale: Building an Enterprise Knowledge Graph for Agents
Chunking 50,000 stale Confluence pages into a vector database gives you confident hallucinations. Grounding agents in a curated ontology and hybrid graph-vector layer solves structural reasoning.
Almost every enterprise starts its internal GenAI journey the same way: dump Confluence, SharePoint, and Jira into a chunking pipeline, embed everything into a vector store, wire up a chat UI, and declare victory. Two weeks later, engineers stop using it.
Vector similarity is great at finding paragraphs that sound semantically related. It is terrible at answering structural engineering questions like: "Which downstream payment services consume events from Account-Service v2, who owns them, and which ones run in regulated regions?"
When Confluence contains four outdated architecture pages from 2022 alongside one current spec from 2026, cosine similarity happily retrieves the obsolete version because its phrasing matches the user's prompt better.
Why an Explicit Ontology Changes Everything
An Enterprise Knowledge Graph replaces fuzzy document soup with typed entities and explicit relationships backed by authoritative sources of truth (Git repos, CI/CD metadata, cloud asset inventories, service registries, and curated specs):
(Domain: Payments)
|--[:OWNS]--> (Service: LedgerAPI)
|--[:PUBLISHES]--> (Topic: ledger.posted.v2)
|--[:DEPLOYED_IN]--> (Account: aws-prod-eu-01)
|--[:GOVERNED_BY]--> (Policy: PCI-Tier-1)
|--[:OWNED_BY]--> (Team: Core-Payments)
Now, when an AI-SDLC impact-analysis agent asks what breaks if ledger.posted.v2 changes schema, it traverses deterministic graph edges instead of praying the right wiki chunk landed in top-5 vector results.
Hybrid Retrieval: Graph for Structure, Vectors for Nuance
You do not throw vectors away. The cleanest production pattern combines both layers:
- Graph Layer (Truth & Topology): Answers exact multi-hop questions about ownership, lineage, dependencies, accounts, and compliance boundaries.
- Vector Layer (e.g., AWS S3 Vectors + Bedrock): Indexes curated, version-tagged ADRs, postmortems, and runbooks linked directly to graph node IDs.
- Curated Non-Sensitive Boundary: Enforce strict ingestion classification so PII, customer financial records, and secrets never enter the shared knowledge layer. Sensitive operational queries stay gated behind per-user OBO MCP tools.
Keeping the Graph Alive Without Manual Heroics
Manually maintained CMDBs always rot. A Knowledge Graph only survives if 90% of its edges are populated automatically from pipelines: Terraform state exports, Kubernetes manifests, OpenAPI/AsyncAPI specs in Git, and catalog files. Human architects only curate the high-level domain ontology and lifecycle states (active, deprecated, retired).
The Takeaway
If your agents keep giving plausible-sounding wrong answers about your own systems, stop tweaking prompts and embedding models. Fix the underlying knowledge representation.
Building production AI infrastructure or scaling distributed platforms?
Open to Principal / Distinguished Architect, VP of Engineering, and CTO conversations with high-bar engineering organizations.