Blueprints BP-04

Hybrid retrieval with a knowledge graph

Vector search alone returns plausible but wrong context.

Data pipelinesLogisticsSupply chainEnterprise opsLast reviewed · November 2026

01 / Fit

Use it when

  • Questions mix meaning with exact identifiers such as part numbers or clause IDs.
  • The right answer depends on relationships between entities, not on one passage.
  • A wrong answer costs more than no answer.
  • The corpus has owners who can fix gaps when the system abstains.

Avoid it when

  • The corpus is small and uniform. A single index with a reranker is enough.
  • Nobody will maintain the graph. A stale graph is worse than none.
  • Users need an answer every time and will not accept an abstention.

02 / The diagram

Run it. Then run the failure path.

Select a node to see what it does, how it fails and what we measure.

Idle
not groundedQUERYQuestionREWRITESub-queriesVECTOR SEARCHBy meaningKEYWORD SEARCHExact termsGRAPH LOOKUPRelationshipsFUSE AND RERANKMerge, reorderGROUNDING CHECKClaim by claimANSWERCitationsABSTAINAsk, do not guess
  1. Query (Question). The user’s question, with their identity and permissions attached. Fails when: The question is ambiguous or outside the corpus. Safeguard: Permissions travel with the query. Out-of-scope questions are declined.
  2. Rewrite (Sub-queries). Expands and splits the question into search queries and entity lookups. Fails when: The rewrite drifts from what was asked. Safeguard: The original question is always searched alongside the rewrites.
  3. Vector search (By meaning). Finds passages that mean the same thing as the question. Fails when: It returns text that sounds right and is about something else. Safeguard: Never used alone. Results are fused with keyword and graph hits.
  4. Keyword search (Exact terms). Matches exact terms: part numbers, clause IDs, names. Fails when: The user’s words differ from the document’s. Safeguard: Synonyms and IDs are normalised at index time.
  5. Graph lookup (Relationships). Follows known relationships, such as which contract covers which lane. Fails when: The graph is missing an edge or holds a stale one. Safeguard: Every edge carries a source and a date. Stale edges are down-weighted.
  6. Fuse and rerank (Merge, reorder). Merges the three result lists and reorders them with a cross-encoder. Fails when: A strong but irrelevant passage outranks the right one. Safeguard: Results under a score floor are dropped, even if that leaves nothing.
  7. Grounding check (Claim by claim). Confirms every claim in the draft answer is supported by a retrieved passage. Fails when: The draft cites a passage that does not say what it claims. Safeguard: Unsupported claims are removed. If little remains, the system abstains.
  8. Answer (Citations). Returns the answer with citations the user can open. Fails when: A citation points at the wrong version of a document. Safeguard: Citations pin the document version and page.
  9. Abstain (Ask, do not guess). Says what is missing and asks a clarifying question instead of guessing. Fails when: It abstains so often that people stop asking. Safeguard: Abstentions are reviewed weekly and turned into corpus or graph fixes.
Tuned for · Retrieval precision, answer groundednessReference design
DataModelGuardActive pathFallback path
Read the diagram as text
  1. Query (Question). The user’s question, with their identity and permissions attached. Fails when: The question is ambiguous or outside the corpus. Safeguard: Permissions travel with the query. Out-of-scope questions are declined.
  2. Rewrite (Sub-queries). Expands and splits the question into search queries and entity lookups. Fails when: The rewrite drifts from what was asked. Safeguard: The original question is always searched alongside the rewrites.
  3. Vector search (By meaning). Finds passages that mean the same thing as the question. Fails when: It returns text that sounds right and is about something else. Safeguard: Never used alone. Results are fused with keyword and graph hits.
  4. Keyword search (Exact terms). Matches exact terms: part numbers, clause IDs, names. Fails when: The user’s words differ from the document’s. Safeguard: Synonyms and IDs are normalised at index time.
  5. Graph lookup (Relationships). Follows known relationships, such as which contract covers which lane. Fails when: The graph is missing an edge or holds a stale one. Safeguard: Every edge carries a source and a date. Stale edges are down-weighted.
  6. Fuse and rerank (Merge, reorder). Merges the three result lists and reorders them with a cross-encoder. Fails when: A strong but irrelevant passage outranks the right one. Safeguard: Results under a score floor are dropped, even if that leaves nothing.
  7. Grounding check (Claim by claim). Confirms every claim in the draft answer is supported by a retrieved passage. Fails when: The draft cites a passage that does not say what it claims. Safeguard: Unsupported claims are removed. If little remains, the system abstains.
  8. Answer (Citations). Returns the answer with citations the user can open. Fails when: A citation points at the wrong version of a document. Safeguard: Citations pin the document version and page.
  9. Abstain (Ask, do not guess). Says what is missing and asks a clarifying question instead of guessing. Fails when: It abstains so often that people stop asking. Safeguard: Abstentions are reviewed weekly and turned into corpus or graph fixes.

03 / Components

Every component, and how it fails.

ComponentJobTypical choicesFails whenSafeguard
QueryThe user’s question, with their identity and permissions attached.API gateway that attaches identity and document permissionsThe question is ambiguous or outside the corpus.Permissions travel with the query. Out-of-scope questions are declined.
RewriteExpands and splits the question into search queries and entity lookups.Small language model for query expansion and entity recognitionThe rewrite drifts from what was asked.The original question is always searched alongside the rewrites.
Vector searchFinds passages that mean the same thing as the question.Embedding model and a vector index with permission filtersIt returns text that sounds right and is about something else.Never used alone. Results are fused with keyword and graph hits.
Keyword searchMatches exact terms: part numbers, clause IDs, names.Inverted index with identifier normalisation and synonymsThe user’s words differ from the document’s.Synonyms and IDs are normalised at index time.
Graph lookupFollows known relationships, such as which contract covers which lane.Graph database with a source and a date on every edgeThe graph is missing an edge or holds a stale one.Every edge carries a source and a date. Stale edges are down-weighted.
Fuse and rerankMerges the three result lists and reorders them with a cross-encoder.Rank fusion followed by a cross-encoder rerankerA strong but irrelevant passage outranks the right one.Results under a score floor are dropped, even if that leaves nothing.
Grounding checkConfirms every claim in the draft answer is supported by a retrieved passage.Claim-level entailment check against the retrieved passagesThe draft cites a passage that does not say what it claims.Unsupported claims are removed. If little remains, the system abstains.
AnswerReturns the answer with citations the user can open.Language model with citation-constrained outputA citation points at the wrong version of a document.Citations pin the document version and page.
AbstainSays what is missing and asks a clarifying question instead of guessing.Templated reply that states what is missing, with a clarifying questionIt abstains so often that people stop asking.Abstentions are reviewed weekly and turned into corpus or graph fixes.

04 / Budgets and evals

What the design is tuned for.

Retrieval precision, answer groundedness. These are design targets, not results.

StageDesign target
RetrievalThe three searches run in parallel, so the slowest one sets the latency.
Fuse and rerankA small candidate set, so the cross-encoder stays within the latency budget.
Grounding checkPrecision over coverage. An unsupported claim is removed, not softened.
AbstainA clear statement of what is missing, so the gap can be fixed at the source.

Eval plan 01

Golden set

Questions with the passages that answer them and a reference answer. It includes exact-identifier questions, relationship questions and questions the corpus cannot answer.

Eval plan 02

Release gates

Retrieval precision and recall per retriever and after fusion, answer groundedness, and abstention on the unanswerable questions.

Eval plan 03

Catching regressions

Retrieval and answering are scored separately, so a drop can be traced to one stage. Thumbs-down answers and abstentions are reviewed and added to the set.

05 / Design notes

Where the whiteboard and production differ.

  1. Most wrong answers trace back to retrieval, not to the model that writes the answer.
  2. Chunking and identifier normalisation at index time affect precision more than the choice of embedding model.
  3. A knowledge graph is rarely complete. It earns its place on the few relationship types that questions depend on.
  4. Permissions have to be enforced inside each retriever. Filtering after fusion leaks through the reranker and the cache.
  5. Abstention is only acceptable to users when it says what is missing and what to ask instead.

06 / Deploy

Deploy this with us.

A pod can take BP-04 from this page to your stack. Tell us the workflow and we will tell you what changes for your systems.

You will talk to an engineer

Book a scoping call

Start with one workflow.

Tell us where the work piles up. You will talk to an engineer, not a salesperson.

What do you need?

After the call you get a one-page scoping note: what we would build first, how we would measure it, and what it takes.