Vectors approximate.
The graph doesn't.
Most RAG systems treat nearest-neighbor search as the whole answer. MsgStack treats it as one of two layers: vectors for exploration and thematic search, deterministic graph traversal for anything governance-critical. The tier on each entry decides which path a query takes.
Vector layer
APPROXIMATE BY DESIGNTurbovec — a local, in-process quantized index. Embed, query, filter, rerank by keyword overlap. Ideal for exploratory and thematic queries. Zero external services; the whole index lives in a single file next to your database.
embed(query) → turbovec.query() <0.1ms, local → metadata filter → keyword rerank
Graph layer
DETERMINISTIC ✦A typed knowledge graph — domains, entries, pillars, personas, channels, objections — traversed by edge type, never by similarity. Locked claims and Tier 1 entries route here exclusively: exact retrieval, verbatim return.
traverse(entry_441B) -[:CONTAINS]-> pillar -[:TARGETS]-> persona: CISO -[:RESOLVES]-> objection 12 → verbatim ✦ no approximation
Part 2 — Retrieval Engine
How Hybrid Grounding Works
Most AI tools fail because they rely solely on Vector Approximation. When a query is made, they find "similar" text but don't understand the relationship between a root policy and a specific claim.
Deterministic Graph Traversal
For verbatim match requirements (taglines, legal disclaimers, pricing caps), MsgStack traverses the knowledge graph to retrieve version-locked nodes. Zero paraphrasing allowed.
Semantic Vector Search
For exploratory queries, embedding-based semantic search finds relevant context across the broader canon, filtered by departmental domain boundaries.
Retrieval Fusion
The final grounding set synthesizes locked claims and relevant context, ranked by the Grounding Contract so the most authoritative truth always takes precedence.
Every query declares its mode.
Agents pass retrieval_mode per query — and tier enforcement overrides it where it matters: a Tier 1 entry answers via the graph no matter what was asked. If the vector index is missing, retrieval falls back to keyword search; graph traversal works regardless.
hybridDEFAULTVector first, graph for related context — the defaultgraphPure traversal: governance queries, locked claims, exact taglinesvectorSemantic-only: exploration, thematic similaritykeywordFull-text fallback when no vector index existsEvery output traces back to its source.
Generated artifacts carry their grounded messages: which entries informed which sections, from which source documents. Alignment scoring closes the loop — anything that can't cite an entry gets flagged before it ships.
Source document
positioning_deck.pdf · ingested, extracted, conflict-checked
Canon entry
441-B · LOCKED ✦ · Tier 1 · DRI: Product Marketing
Generated artifact
sales_email_v3 · alignment 100 · cites 4 entries