Showcase site · Recorded runs from a staged demoWatch recorded runs ↗Built byPravin Gadekar ↗

DesignKnowledge and memory

04 of 05 · 2 min read

How do agents find the right past incident?

Agents search reviewed runbooks, past incidents and postmortems by exact words and by meaning, then cite the passage they used. Reviewed postmortems feed back into the index. Tests must justify two searches and a step that combines rankings.

ILLUSTRATIVE SEQUENCE01 / 06
How do agents find the right past incident?
1 · Screen2 · Review3 · Index4 · Retrieve5 · Cite6 · Learna reviewed report joins a new index versionthe Ask screen searches the same indexloaderunsafe → excludedreviewdraftstable · untaintedAlloyDB indexnew index versionhistory_agentwords + meaningrun_evidencecited passagepostmortemreviewed → reindexed
1 · Screen2 · Review3 · Index4 · Retrieve5 · Cite6 · Learnloaderunsafe → excludedreviewdraftstable · untaintedAlloyDB indexnew index versionhistory_agentwords + meaningrun_evidencecited passagepostmortemreviewed → reindexed
DOCUMENT LOADER · CODE CHECKS

Check a troubleshooting guide before agents can use it.

How this step works

The loader checks the document’s format and metadata, screens for secrets and instructions aimed at manipulating agents, and keeps unreviewed or tainted content out of search. Passing a format check does not make advice trustworthy.

EXAMPLE · CONNECTION EXHAUSTION RUNBOOK

A runbook explains symptoms and recovery steps

Required metadata, sources and content fingerprint

Invalid documents are quarantined; unsafe content is excluded

ENGINEER · HUMAN KNOWLEDGE REVIEW

An engineer verifies the advice and its source.

How this step works

Seed runbooks are reviewed in Git, through normal code review. Postmortems drafted by investigations are reviewed on an audited endpoint restricted to approvers; that review is bound to a digest, or content fingerprint, so an agent cannot approve its own report or reuse an approval after an edit. Search returns only stable, untainted documents.

WHAT MAKES THE GUIDE SEARCHABLE

Source: reviewed Git troubleshooting guide

Status: stable · untainted

Changing the content requires a new review

DOCUMENT LOADER · ALLOYDB

Make the reviewed guide searchable by words and meaning.

How this step works

The loader splits the runbook at headings and keeps the title and section context. Embeddings represent a passage’s meaning as numeric vectors. They come from a committed cache produced earlier by Vertex AI, so loading makes no model calls. AlloyDB stores the vectors alongside full-text search data. Each load creates a new index version, activated in one step. The application calls Vertex AI using its service identity, without a database service-account key.

ALLOYDB · DOCUMENTS AND SEARCH PASSAGES

kb_documents: full text, source and review status

kb_chunks: passages, meaning vectors and word tokens

knowledge_loads: index version, model and content hashes

history_agent · search_knowledge

Find advice for checkout connection timeouts.

How this step works

Both searches include only stable, untainted documents from the run’s pinned index version (or the active one). Filters also limit the service and corpus, or document collection. The Ask screen searches the active index the same way, without a run. One search ranks word matches; the other ranks meaning matches. Reciprocal rank fusion (RRF) combines rank positions because the raw scores are not comparable.

TWO CLUES FROM THE CHECKOUT OUTAGE

Exact error text: QueuePool limit … connection timed out

Symptom: checkout waits for free database connections

Exact vector + full-text rankings → reciprocal rank fusion

EVIDENCE STORE · CODE VALIDATION

Save the exact advice supporting the proposed response.

How this step works

The passage is treated as evidence data, not instructions to the agent. Code stores it with its source and search metadata in run_evidence for this investigation. Proposal checks reject citations not issued to that investigation. Later index edits cannot alter the saved excerpt.

ILLUSTRATIVE CITATION · CONNECTION EXHAUSTION

kb:runbooks/db-pool-exhaustion#0

“Raising capacity buys time; inspect connection release.” (illustrative excerpt)

Git runbook · human reviewed · current (illustrative)

Matched by error name and symptom · index version recorded

INCIDENT REPORT AGENT · ENGINEER REVIEW

Turn the checkout outcome into reviewed advice for next time.

How this step works

A postmortem records what caused the outage, what was attempted and what happened. Its draft stays out of search. After screening and a digest-bound human review, it becomes stable and joins a new index version; runs pinned to an older version do not see it. Past advice supports the next investigation without overriding fresh evidence.

POSTMORTEM · A REPORT OF CAUSE AND OUTCOME

AI drafts a report from saved investigation results

Code adds observed recovery and failed remedies

An engineer reviews it before search can return it

Steps appear in order. Evidence, review and outcomes remain visible.

Evidence / agent workWaiting for a personFailingRecovered

THE TRADEOFF

What we gained

An exact error text and a vague symptom both find the right runbook, and every citation is saved with the run, so an engineer can check it.

What it costs

Two indexes and a ranking-combination step need maintenance, justified only by search evaluations. A postmortem must be reviewed before it appears in search.

The alternative: meaning-only search. Simpler, but it can miss an exact error name.

ONE RESULT

In a small test, the right runbook was in the top three every time.

limit12 documents is tiny. ScaNN recall with real embeddings stays unmeasured; v1 uses exact search because filtered ScaNN recall was 0.43 against a 0.95 bar. v1 does not use ScaNN. The record gives no date.

WHAT THIS DOES NOT CLAIM

  • That search is benchmarked at scale; the evaluations are small and local.
  • That every document is searchable; unreviewed and tainted ones are excluded.

The claims ledger →

MORE DETAIL

From a runbook to cited evidence

EXAMPLE · CHECKOUT CANNOT GET DATABASE CONNECTIONS

How does a troubleshooting guide help diagnose an outage?

Follow a runbook: an engineer-written guide to diagnosing and recovering when database connections run out. This is an illustrative example, not a recorded investigation or measured result.

The knowledge agent compares past incidents with the checkout outage, including remedies that failed. It can ask for more evidence, but cannot mark advice as trusted, change search eligibility or approve production changes.

Updating the searchable knowledge

UPDATING THE SEARCHABLE KNOWLEDGE

Keep knowledge available during updates.

A newly reviewed incident report joins a new index version, activated immediately. Runs pinned to the previous version keep using it. Reloading the full collection of runbooks builds a candidate index version first. It carries forward reports created by investigations unless replaced, and removes guides no longer in the collection.

Each load records document hashes, the source Git commit, the passage-splitting version and the embedding model. Changing the model requires recalculating meaning vectors for the whole collection.

What happens if a knowledge update fails?
  1. 01 / SERVINGExisting knowledge stays searchable

    AI investigators continue using the current index of reviewed guides and reports.

  2. 02 / BUILDINGBuild and check the replacement index

    Check document metadata, safety screening, passage boundaries and meaning vectors before switching.

  3. 03 / COMMITSuccess → switch to the checked version

    Failure → keep the previous version active and raise an alert. Only after validation does the active-version pointer change in one indivisible step.

Why two search methods?

WHY COMBINE TWO SEARCH METHODS?

Find an exact error name
or a description of the symptom.

Documented v1 choice
KEYWORD PATH

Match a specific error name.

QueuePool limit … connection timed out

An exception name can identify the right guide even when its wording differs from the agent’s question. PostgreSQL full-text search uses simple and english tokens; code extracts error and configuration identifiers and OR-joins them with the search text.

SEMANTIC PATH

Match a similar failure description.

“Checkout requests wait for free connections”

A guide about connection exhaustion may help even if it uses different words. Exact nearest-neighbour search ranks eligible meaning vectors; it can return matches when keyword search finds none. A query vector is reused only for the same query and model within one investigation.

REVIEWED, UNTAINTED CONTENT ONLYWord matches + meaning matches
↓
Reciprocal rank fusion (RRF)

Combine ranking positions.
Keep the best passage from each document.

Alternative: one search method

Using only word matching or meaning matching is simpler to operate. Word matching can miss rephrased symptoms; meaning matching can give too little weight to an exact exception name or configuration key.

Why combine them?

RRF combines positions from the two rankings without comparing incompatible scores. Both searches filter for approved content first. Older advice ranks lower by a limited amount and remains marked for re-review.

What this costs

The application must maintain two searches, passage and embedding versions, and the query that combines rankings. These are documented design reasons, not evidence that hybrid search outperforms either method.

When to reconsider

Simplify if retrieval tests on cases kept separate from development show one method adds little. Test a reranker, which reorders results, if useful guides rank too low. Revisit approximate vector search if exact search costs too much at the actual scale and filters.

V1: exact search. No ScaNN index. No reranker.

Approximate vector search can miss useful passages after trust and service filters are applied. V1 uses exact search as the baseline. Any later optimisation must preserve error-name cases and filtered recall: the share of relevant eligible documents found. No Omni benchmark results are published here.

Testing retrieval

TEST WHETHER SEARCH FINDS THE RIGHT ADVICE

Test the retrieved guides before judging the AI’s answer.

Hold the knowledge Git commit and embedding model fixed. Compare word-only, meaning-only and hybrid search. Measure relevant documents found in the top five (recall@5), the share of those results that are relevant (precision@5), and how highly the first useful match ranks (mean reciprocal rank). Test incidents must be held out from their generated reports.

Database tests can use query vectors calculated in advance, without calling a model. Replaying an AI investigation over recorded evidence tests reasoning, but does not prove the index or eligibility filters work.

What retrieval tests need to catch

  • Exact exception names and paraphrased symptoms
  • Unreviewed drafts, deprecated advice and tainted content must be excluded
  • Older eligible advice must show “needs re-review”
  • Return advice for the correct service, including passages beyond a guide’s first section
  • Distinguish misleading near-matches and remedies that previously failed
  • Reject invented citations and preserve the exact saved excerpt
Inspect recorded evaluation evidence →
Retrieval evals

15 cases test the real knowledge bundle in a local database using three modes: keyword only, meaning only and hybrid. Each mode reports recall, precision and mean reciprocal rank. Only hybrid recall and reciprocal rank must exceed a minimum. No benchmark figure is published here.