Chartered Vectorial

AI Practitioner Certificate · M02.1

Production-Grade RAG

90 minutes · 39 planned slides · assembled 90.0 minutes · Stage 3 content master

Production RAG is seven owned decisions in a chain; reliable answers come from knowing where each decision starts, when its default stops working, and which component failed.

T1 · 11 minutes · slides 1–5

Why RAG, and the Pipeline Anatomy

Slide 1question1.5 min

If every answer cites a source, which failure could still make it unsafe?

Visual brief: Full-bleed show-of-hands risk vote with four equal response cards. Keep all cards visually neutral so the screen does not disclose that more than one answer can be unsafe.

Designer constraint: Do not reveal the answer through colour or emphasis before the room votes.
Slide 2diagram3.5 min

The seven-stage pipeline separates what teams build once from what every question reruns.

Seven-stage RAG teaching spineCV-branded instructional diagram for M02.1 Production-Grade RAG.THE SEVEN-STAGE RAG TEACHING SPINEBuild the evidence system once; run the answer path for every question.BUILD ONCERUN PER QUESTIONRebuild when a left-side decision changesPay latency and service cost on every queryOFFLINE / ONLINE BOUNDARYIngestLoad corpusChunkEvidence unitsEmbedVectorise unitsIndexStore + metadataRetrieveSemantic + lexicalRe-rankOptional shortlistGenerateAnswer + citationsSEARCHABLE EVIDENCEQuestion arrivesembedded inside RetrieveTeaching decomposition, not a complete production architecture
Preserve the build-once versus run-per-question split, the lexical leg inside Retrieve, and the dashed optional Re-rank stage; never flatten V01 into one undifferentiated chain.
Slide 3comparison2.5 min

RAG provides grounding and attribution; hallucination remains a generation risk.

What RAG provides and what it does notCV-branded instructional diagram for M02.1 Production-Grade RAG.GROUNDING IS A CONTROL SURFACE, NOT A GUARANTEEEvidence can be inspected; the generated claim still has to be checked.RAG PROVIDESRAG DOES NOT PROVIDEGroundingRetrieved evidence can be updated outside the model.AttributionThe source used for an answer can be retained.Enforcement pointPermissions can be applied during retrievalonly when the team builds the control.No factual guaranteeGeneration can still hallucinate.No automatic access controlDocument permissions do not transfer themselves.No proof from a citationA source can be real while the claim is unsupported.CHECKThe source path is inspectable; answer quality remains an evaluated property.
Keep the capability and the limit visible together; grounding must never be drawn as a guarantee of factuality or access control.
Slide 4concept2 min

Each role owns a different failure surface, so production readiness cannot sit with the model team alone.

Production RAG ownership by roleCV-branded instructional diagram for M02.1 Production-Grade RAG.PRODUCTION READINESS REQUIRES THREE OWNERSHIP LENSESOne answer crosses build, run and control responsibilities.DEVELOPERBuild the evidence pathRetrieval behaviourContext assemblyFailure visibilityRetrieve · Re-rank · GenerateINFRASTRUCTUREOperate the stateful systemRefresh cadenceRebuild pathAvailabilityIngest · Embed · IndexRISK / OPERATIONSSet the control evidenceAccess rulesSource traceQuality acceptanceCorpus · permissions · reviewNAMED OWNERS ACROSS THE CHAINProduction readiness is a shared operating decision
Keep the three roles at equal visual weight and connect each to a concrete operating responsibility rather than a generic stakeholder label.
Slide 5transition1.5 min

Chunking fixes the evidence units until teams re-index, making it the first costly component decision.

Seven-stage RAG teaching spineCV-branded instructional diagram for M02.1 Production-Grade RAG.THE SEVEN-STAGE RAG TEACHING SPINEBuild the evidence system once; run the answer path for every question.BUILD ONCERUN PER QUESTIONRebuild when a left-side decision changesPay latency and service cost on every queryOFFLINE / ONLINE BOUNDARYIngestLoad corpusChunkEvidence unitsEmbedVectorise unitsIndexStore + metadataRetrieveSemantic + lexicalRe-rankOptional shortlistGenerateAnswer + citationsSEARCHABLE EVIDENCEQuestion arrivesembedded inside RetrieveTeaching decomposition, not a complete production architectureChanging the cut rebuilds derived evidencechunks · embeddings · index entries
Keep Chunk on the build-once side and show its downstream rebuild path; the handover must make the reversal cost visible.

T2 · 15 minutes · slides 6–13

Chunking Strategies

Slide 6question1 min

Where would this policy lose its exception if it were cut every 512 tokens?

MARK THE BREAKA regular cut can separate the rule from its exceptionILLUSTRATIVE POLICY 4.2Role-change access reviews must becompleted within 10 business days.FIXED CUTException: where privileged access issuspended, approval is required beforeaccess is restored.Where should the evidence unit end?Illustrative synthetic policy — the resulting demo answer is intentionally not shown.
Keep the rule and exception verbatim and keep the generated demo answer hidden.
Slide 7concept1.5 min

Whole documents retrieve too broadly, while smaller units expose the passage a question needs.

WHY CUTWhole-document vectors average away precise passagesWHOLE DOCUMENTone representationmany unrelated sectionsGovernanceAccessExceptionsReportingRetentionAVGCHUNKED DOCUMENTseparate representationsone retrievable passageGovernanceAccessExceptionsReportingRetentionRetrieval precision, not a token-limit claim, is the durable reason to chunk.
The durable argument is retrieval precision and semantic over-compression, not a model input limit.
Slide 8diagram3 min

Fixed, semantic and hierarchical cuts give the same policy document three different retrieval futures.

V02 · SAME DOCUMENTOne policy acquires three retrieval futuresFIXED-SIZEregular boundarySEMANTICmeaning boundaryHIERARCHICALretrieve child · return parentILLUSTRATIVE POLICY 4.2Role-change access reviews must becompleted within 10 business days.FIXED CUTException: where privileged access issuspended, approval is required beforeaccess is restored.ILLUSTRATIVE POLICY 4.2Role-change access reviews must becompleted within 10 business days.INFERRED BOUNDARYException: where privileged access issuspended, approval is required beforeaccess is restored.ILLUSTRATIVE POLICY 4.2Role-change access reviews must becompleted within 10 business days.Exception: where privileged access issuspended, approval is required beforeaccess is restored.RETURN VERBATIM PARENTCHEAP BASELINEMEASURE BEFORE ADOPTINGPRESERVES VERBATIM CONTEXTDoes the answer fit in one chunk?
Use the same synthetic clause in all three panels and in D01 Act 1; show the severed clause but never the demo answer.
Slide 9comparison1.5 min

No alternative reliably beats fixed-size for its cost, so measurement must justify moving from it.

COMPARE STRATEGIESEvery alternative must earn its cost against fixed-sizeFIXED-SIZELow build costPredictable recordsBoundary riskSEMANTICHigher build costIrregular recordsGain is unprovenHIERARCHICALMore moving partsFine match · broad returnUse when answers span unitsMeasurement on your corpus decides whether to move
The comparison must preserve fixed-size as the low-cost baseline without presenting it as universally best.
Slide 10diagram2 min

The right chunk size is a corpus-specific window between precise matching and preserved context.

CORPUS-SPECIFIC WINDOWChunk size must sit between precise matching and preserved contextSMALLERLARGERWORKABLE WINDOWPRECISE MATCHPRESERVED CONTEXTFRAGMENTEDDILUTEDDoes the typical answer still fit?
Keep the curves schematic: the figure shows a moving window, not a measured universal optimum.
Slide 11concept1.5 min

Chunk-time schema must preserve provenance; only some metadata values can be back-filled without rebuilding.

METADATAProvenance and schema determine what can change laterSOURCE DOCUMENTdocument IDversioneffective datejurisdictionaccess classCHUNK RECORDtextverbatim source passagesource_idjoin back to documentschemafilterable fields and typesvaluesdates, classes, jurisdictionValues may be patchable; provenance and schema determine whether rebuilding is avoidable.
Distinguish patchable values from provenance and schema decisions that determine whether rebuilding is avoidable.
Slide 12workshop3 min

Which of your documents would break under fixed-size chunking?

E01 · 3-MINUTE TABLE TALKWhich of your documents would break under fixed-size chunking?Name a document type you own — do not solve the chunking design yetDEVELOPERWhere does structure carry meaning?What boundary would be invisible in text?INFRASTRUCTUREWhat would a rebuild touch?Which provenance must survive?RISK / OPERATIONSWhich source carries an audit duty?What omission would change the decision?2 minutes at table · 1 minute report-out · 2 tables onlyOutput: one document type and the boundary that would make its evidence incomplete.
Keep the required prompt verbatim, show all three role lenses, and do not add trainer-supplied examples.
Slide 13transition1.5 min

Start fixed-size with overlap; move only when typical answers do not fit inside one chunk.

DEFAULT AND SWITCHMove only when measurement identifies the failureDoes the answer to a typical question fit inside one chunk?YESNOFIXED-SIZE + OVERLAPcheapest defensible baselinemeasure retrieval on your corpusHIERARCHICALretrieve the precise childreturn the verbatim parentSEPARATE EVIDENCE GATESEMANTIC ONLY AFTER A MEASURED GAINmeaning boundaries ignore formatting · published results remain inconsistent
The routing question decides when to leave the baseline; the next component decides similarity.

Framework 2 · E01

Built activity

IdE01
Typetable talk
OwnerPradeep Menon
Ready By5 October 2026
PurposeMake chunking concrete for a greenfield cohort by having participants identify a failure boundary in documents they already own.
PromptWhich of your documents would break under fixed-size chunking?
Role Lenses
DeveloperIdentify where headings, tables, clauses or layout carry meaning that a regular token boundary would not see.
InfrastructureIdentify what records, embeddings, index state and validation work a re-chunk would force the team to rebuild.
Risk OperationsIdentify which document carries an audit obligation and where losing a condition, exception or effective version would change the accountable decision.
Timing
Total3 min
Table Discussion2 min
Report Out1 min
Instructions
  • Read the required prompt verbatim from the slide.
  • Ask each table to name one document type and one boundary that would make its evidence incomplete.
  • Use the three role lenses to stop the discussion defaulting to developers.
  • After two minutes, hear one concise response from exactly two tables and move on.
OutputOne document type per reporting table and the specific structural boundary that would make a retrieved chunk incomplete.
Report OutTwo tables only; each gives the document type and break boundary in one sentence, with no plenary solution design.
Ground Rules
  • No printed material and no participant tool use.
  • The trainer does not supply examples, even if the room is initially quiet.
  • Participants may describe document structure without sharing confidential document content.
  • Do not debate chunk sizes or products; this exercise identifies failure shapes only.
Acceptance Criteria
  • The prompt appears verbatim on its own workshop slide.
  • Developer, infrastructure and risk / operations lenses appear on the slide.
  • The speaker note states two minutes at table, one minute report-out and a two-table cap.
  • The speaker note explicitly instructs the trainer not to provide examples.
  • At least one reported answer names both a document type and the boundary that could make its evidence incomplete.

T3 · 9 minutes · slides 14–18

Embedding Models

Slide 14question1 min

Which would retrieve Japanese financial text better: the larger general model or the smaller specialist?

A larger general model or a smaller specialist?Predict before the evidence is shownLARGERGeneral modelBroad language coverageMore parameters · wider vectorsJapanese financial textSMALLERSpecialist modelJapanese-trainedFewer parameters · narrower vectorsJapanese financial textPREDICTthe winnerThe model's size does not settle the retrieval result.
Keep both choices at equal visual weight and do not reveal a winner before the benchmark slide.
Slide 15diagram1.5 min

An embedding model defines which passages count as similar; the corpus itself does not.

The embedding model defines the neighbourhoodThe documents stay fixed; the learned judgement changesSAME CORPUS為替リスクFX exposure担保閾値credit limitsproduct PX-204EMBEDDINGMODELdefines similarityMODEL AFXCREDITMODEL BFXCREDITSimilarity is a model decision, not a property stored in the text.
The documents must stay fixed while the model changes the neighbourhood; do not turn this into a formula.
Slide 16data2.5 min

General Japanese benchmarks favour specialised models, while Japanese financial retrieval nearly closes the gap.

Two Japanese benchmarks give two different selection signalsFigures as published; refresh by 5 October 2026GENERAL JAPANESE RETRIEVALGENERAL66.4text-embedding-3-smallSPECIALIST78.1Ruri-v3-30mJMTEB retrievalRuri model card · April 2025Author-reported table on an independent benchmarkJAPANESE FINANCIAL QA RETRIEVALGENERAL84.3OpenAI-largeSPECIALIST86.3SarashinaJFinTEB · JaFIn taskSuzuki & Sakaji · SIGIR 2026Peer-reviewed Japanese financial benchmarkYOUR CORPUS DECIDESScores are within-benchmark only; the two panels do not share a scale.
Keep the two benchmarks in separate equal-width panels, print both publication dates, and never encode the cross-benchmark comparison as one shared scale.
Slide 17framework2.5 min

Six gates should decide an embedding model before a leaderboard rank does.

The 6 Gates Before You IndexA reusable selection framework: eliminate poor fits before comparing ranksLANGUAGEDoes the model cardlist your languages?1DOMAINDoes it retrieveyour vocabulary?2LENGTHDoes its limit exceedyour chunk length?3WIDTHWill the vector fityour store and budget?4HOSTINGCan it run whereyour controls require?5COSTCan you sustain indexand query demand?6Only your corpus evidence opens the final decision.
Retain the name The 6 Gates Before You Index, the exact anchor order Language · Domain · Length · Width · Hosting · Cost, and the rule that evidence—not rank—opens the decision.
Slide 18transition1.5 min

Assume an embedding change forces a corpus rebuild; budget the migration before choosing the index that stores it.

A model change is an index migrationBudget the default rebuild path before selecting the operational storeSOURCE TEXTRetained and versionedMODEL VERSIONA → BNEW VECTOR SPACEEvery document re-encodedNEW INDEXRebuilt, validated, cut overOLD INDEXCoordinates from model A do not share a space with model B.Assume rebuild; treat adapter methods as a research exception.Embeddings need an operational home with a named migration owner.
Show model replacement as re-encode → rebuild → validate → cut over; never present the old and new vector spaces as directly compatible.

T4 · 12 minutes · slides 19–25

Vector Databases

Slide 19question1 min

If restricted content appears in retrieval, which component was supposed to stop it?

Assign the control before the architecture is revealedA restricted chunk crossed the retrieval boundaryWHO SHOULD HAVE STOPPED IT?IDENTITY SYSTEMKnows the callerand group membershipOWNER: __________RAG APPLICATIONBuilds the queryand retrieval requestOWNER: __________VECTOR STORERanks candidatesinside a chosen scopeOWNER: __________RESTRICTED CHUNKappeared in retrievalChoose one owner now; the next slides separate responsibility from capability.
Keep all three possible owners visually equal and leave the control owner unresolved until the room commits.
Slide 20concept1.5 min

A production vector store must filter and isolate results around approximate search, not merely rank neighbours.

Production retrieval is a contract around approximate rankingThe ranking engine does not know the bank's business rulesOPERATING CONTRACTQUERY + CONTEXTidentity · tenantdate · classificationFILTEReligible candidatesbefore · during · afterAPPROXIMATE SEARCHrank likely neighboursISOLATION SETS SCOPEREFRESH SETS STATELOGGING SETS EVIDENCEFiltering decides eligibility; isolation limits scope; refresh decides whether the result is current.
Keep approximate ranking in the centre and show filtering, isolation and refresh as the operating contract around it.
Slide 21comparison2.5 min

The store you already operate is the default until residency, scale or filtering proves it inadequate.

Four operating shapes, not four scoresAll product claims current as of 3 August 2026; refresh before deliveryPineconeMANAGEDProvider operates the databaseYou own ingestion · authorization · residencyWeaviateCLOUD / SELF-MANAGEDDeployment decides the operatorSelf-managed means your platform team owns itChromaLOCAL → DISTRIBUTED / CLOUDLocal · single-node · distributed · CloudThe deployment mode changes the operating modelpgvectorPOSTGRES EXTENSIONThe existing database team operates itPostgreSQL policy and monitoring remain in pathDEFAULT: THE STORE YOU CAN ALREADY OPERATEExit only on measured residency, scale or filtering evidence — never on a vendor scorecard.
Render all four stores at identical visual weight; position them only by operating shape and never imply a rank or score.
Slide 22diagram2 min

Filter placement changes both recall and confidentiality, so post-filtering is not harmless.

One predicate can enter the search in three placesPlacement changes the search failure; it does not create one universal winnerPRE-FILTERFILTERANN SEARCHPermitted candidateset, if fillableGraph blocking can disconnect the route through candidates.DURING SCANANN + FILTERFill while thescan can continueSelective predicates can force more backtracking and work.POST-FILTERANN SEARCHFILTERResult set canbe silently shortDisallowed candidates may consume the approximate shortlist.CONFIDENTIALITY FAILS ONLY IF RESTRICTED CANDIDATES OR SCORES CROSS THE CONTROL BOUNDARY
Keep the recall failure and confidentiality failure separate; never show unsourced full-result counts for pre-filter or in-scan filtering.
Slide 23diagram2 min

The corpus changes while the index stays still, so every deployment needs a named refresh owner.

A changing corpus needs a controlled path to searchable stateNo universal reindex duration is assertedSOURCE STATEEDITDELETENEW SOURCENEW MODELINDEX STATELAST VALIDATED SNAPSHOTGAPNAMED REFRESH OWNER1CHANGE LOGsource versiondeletion ledger2INGESTchunk · encodewrite or rebuild3VALIDATEcoverage · freshnessgolden set4CUT OVERversioned releaserollback ready5MONITORwatermark · lagowner alertedOrdinary updates may be incremental; structural changes can require a controlled rebuild.
The named owner must close the visible gap between changing source state and searchable index state; do not imply every metadata update requires a rebuild.
Slide 24concept2 min

Among these four operating shapes, PostgreSQL is the database-enforced row-policy path; the others require application authorization.

Authorization needs an enforcement point on every retrievalIsolation scopes the search; entitlement decides whether a chunk may be returnedCALLER IDENTITYAUTHORIZATION DECISIONwhich chunks may this caller retrieve?PER-CHUNK POLICYMOST STORE DEPLOYMENTSApplication converts the decisioninto a permitted-candidate filterPinecone · Weaviate · ChromaPOSTGRESQL + pgvectorApplication sets the database role/contextRow Level Security filters rowsinside the data layerNot automatic: the application must carry and apply policy context.Not automatic: enable RLS and control owner/BYPASSRLS roles.FULL AUTHORIZATION DESIGN + ASSURANCE → M07Permissions become enforceable at retrieval time — if you build the enforcement.
Keep the shared authorization decision upstream, then distinguish application-enforced filtering from PostgreSQL row-policy enforcement without implying either is automatic.
Slide 25transition1 min

A store can return results quickly without returning the right evidence, making retrieval quality the next design problem.

Fast retrieval passes only the first gateThe operating store cannot prove that the evidence is relevant1FAST?latencyavailabilityPASSED GATE2ELIGIBLE + CURRENT?permissions · scoperefresh statePASSED GATE3RELEVANT?right passageearly enoughUNRESOLVEDA fast, authorized, current result can still be the wrong evidence.T5 owns the unresolved gate: retrieval quality.
Show speed, eligibility and freshness as passed gates, then leave relevance as the unresolved gate handed to T5.

T5 · 13 minutes · slides 26–32

Retrieval Quality

Slide 26question1 min

Which retriever would find product code AC-417: one that understands meaning or one that matches characters?

Which retriever finds AC-417?Choose the mechanism before the answer is shownPRODUCT CODE AC-417MEANINGDense retrieverFinds semantic neighbourseven when wording changesCHARACTERSSparse retrieverFinds literal tokenseven when meaning is opaqueThe two choices fail differently; hold the reveal until the room commits.
Keep Meaning and Characters at equal visual weight so the room must choose before sparse retrieval is revealed.
Slide 27case1.5 min

Dense-only retrieval can miss exact identifiers; sparse matching covers that failure mode when literal strings matter.

Dense similarity can lose the exact identifierIllustrative product-document neighbourhood — not a disclosed bank incidentQUERYWhat is the approvalroute for AC-417?Dense signalapproval routeproduct policyexception handlingDENSE NEIGHBOURHOODTS-990Product approval guideTS-900Product exception policyAC-417Exact product-code procedureMISSEDTS-991Product review workflowMeaning groups the documents.The literal token distinguishes the target.Illustrative mechanism: the red mark denotes the retrieval failure, not a measured rate.
Retain the ILLUSTRATIVE label and use muted red only for the missed exact identifier; never present this as a real bank incident.
Slide 28framework2.5 min

The 3-Rung Retrieval Ladder adds sparse search before paying the recurring cost of re-ranking.

The 3-Rung Retrieval LadderAdd recall before paying a model on every query1DENSEMeaning firstOne semantic routeExact strings can fall outside2FUSEDense + sparseTwo complementary listsFirst low-cost improvement3RE-RANKShortlist second passImproves orderingRecurring model costDense → Fuse → Re-rankHybrid is the first low-cost improvement, not a claim about the largest raw gain.Dashed means optional layer; spacing is schematic, not a measured quality scale.
Retain the name The 3-Rung Retrieval Ladder, the anchor order Dense · Fuse · Re-rank, and the dashed optional treatment on Re-rank.
Slide 29concept1.5 min

Re-ranking can improve the shortlist but cannot recover a relevant chunk that was never retrieved.

A re-ranker only sees the candidate setIt can change order, never candidate membershipCORPUSChunk AChunk BChunk CChunk DChunk EChunk FRETRIEVERCandidate CCandidate ACandidate FCandidate membershipRE-RANK1. Candidate A2. Candidate F3. Candidate CCandidate orderChunk Dnot retrievedstill unavailableThe first stage owns recall; the second stage owns order within its shortlist.
Keep corpus membership outside the dashed Re-rank boundary; the re-ranker may reorder candidates but never add a missed chunk.
Slide 30framework2.5 min

The three retrieval metrics answer different questions, so no single score proves quality.

The 3 Retrieval QuestionsOne ranked list; three different decisions1FOUND?Recall@kDid the evidence enter the top k?2CLEAN?Precision@kHow much returned text was relevant?3EARLY?MRRHow high was the first relevant result?Run all three against the same Golden set to compare pipeline versions.
Retain the name The 3 Retrieval Questions and the anchor mapping Found? · Clean? · Early? to Recall@k · Precision@k · MRR.
Slide 31diagram2 min

Retrieve the chunk manually. Was the answer in it? If yes, generation failed. If no, retrieval failed.

Manual retrieval is the first diagnosticA first cut, not a final attributionWRONG ANSWER OBSERVEDWas the answer in the retrieved chunk?NORetrieval failedYESGeneration failedThen check context assembly and retrieval noise.
Preserve the locked binary as the main path and the dashed context-assembly/noise caveat as a subordinate third case.
Slide 32transition2 min

Measure one change at a time; reach beyond the fixed pipeline only after the failure stays measurable.

One change keeps the result attributableThe measured unresolved failure is the gate to advanced patterns1BASELINEFreeze questionsFreeze expected answers2CHANGEOne retrievalvariable only3RE-MEASURERun the sameGolden set4DECIDEKeep, revertor escalateAdvanced pattern only after the failure persistsThe dashed gate is optional escalation, not a maturity destination.
Keep the optional escalation gate after baseline, one change and re-measure; advanced patterns must not appear as a maturity destination.

T6 · 2 minutes · slides 33–34

Beyond Naive RAG

Slide 33question1 min

Should a greenfield team start with agentic RAG because it can search again?

Three advanced patterns change three different surfacesEqual columns and no connectors: no sequence or maturity order is impliedAGENTIC RAGCONTROL FLOWMODEL DECIDESThe model chooses whetherto retrieve, repeat or stop.GRAPH RAGRETRIEVAL STRUCTURERelationships becomeretrievable across documents.RAFTMODELMODELfine-tunedfor evidence useFine-tuning changes howretrieved evidence is used.Different failure surfaces; no upgrade ladder.
Keep the three patterns at equal visual weight, with no arrows, steps or ordering between them; they change control flow, retrieval structure and the model respectively.
Slide 34transition1 min

Advanced patterns change different failure surfaces; measurement must identify the unresolved failure before escalation.

Escalation starts with a measured unresolved failureThe demo now practises the diagnosis gate before any mitigation is chosenTUNED FIXEDPIPELINEDIAGNOSEWhich componentfailed?MEASURE ONEFAILURECONSIDERone boundedchangeCHARTERED VECTORIAL RECOMMENDATIONThe T7 demo starts at the diagnosis gate.Escalate one measured failure surface, then re-measure.
The diagnosis gate must be the only jade element; the advanced-pattern box stays dashed and downstream, and the figure must point into T7 rather than imply an upgrade path.

T7 · 28 minutes · slides 35–39

The Demo: Break It Four Ways, plus Closing

Slide 35question1 min

One pipeline will fail four ways; can you locate each broken component before the reveal?

One pipeline with four diagnosis actsNo component answer is revealed on this opening challenge surface.LIVE DIAGNOSIS CHALLENGEOne visible system, four hidden breaks.SYNTHETIC CORPUSone invented policy setRAG PIPELINEone versioned instancePROJECTED INTERFACEsame panes and controlsACT 1BREAK SWITCH LOCKEDComponent hiddenACT 2BREAK SWITCH LOCKEDComponent hiddenACT 3BREAK SWITCH LOCKEDComponent hiddenACT 4BREAK SWITCH LOCKEDComponent hiddenWHICH COMPONENT FAILED?Diagnose before the revealIllustrative interface · capture-and-replay default · live proof path available
Keep the four component answers hidden on this surface; the room must diagnose each act before any stage is highlighted.
Slide 36workshop20 min

Each act earns its diagnosis only when the bad answer and retrieved evidence are shown side by side.

Five-beat diagnosis loopThe bad answer and retrieved evidence are shown side by side before the component reveal.THE FIVE-BEAT ACTCompare the bad answer with the retrieved evidence.1BREAKChange one thing2RUNShow bad answer3DIAGNOSEHold the pause4INSPECTRetrieve manually5REVEALPlace + mitigateBAD ANSWERcaptured answer · citation · visible symptomDo not explain it yetLet the room locate the breakRETRIEVED EVIDENCEchunk received by Generateagreed evidence or known absencethe baseline the room can inspectCOMPAREWAS THE AGREED EVIDENCE IN IT?The room answers before the trainerIllustrative demo surface · reveal one act at a time
Preserve the five beats and the side-by-side answer/evidence panes; trainer commentary is expendable, but the diagnosis pause and manual evidence check are not.
Slide 37diagram3 min

Four failures map to four components, but they are a diagnosable subset rather than a complete taxonomy.

Four diagnosable failure modesFour selected failure modes map to four component origins without claiming a complete taxonomy.DIAGNOSABLE SUBSETFour selected failures map to four component origins.ACT 1ClauseseveredORIGINCHUNKpreserve rule + exceptionACT 2Exactcode missedORIGINRETRIEVEadd sparse + fuseACT 3Supersededpolicy servedORIGININDEXfilter validity + refreshACT 4Unsupportedanswer inventedORIGINGENERATEabstain + enforce citationsAct 4: the corpus gap begins at Ingest; the failure to say so occurs at Generate.FOUR FAILURE MODES, NOT THE FOUR.Selected for diagnosis, not prevalence
Keep the four modes inside a dashed subset boundary and retain the two-stage Act 4 label; do not turn this into a complete or frequency-ranked taxonomy.
Slide 38diagram2 min

The same fluent wrong answer can originate at Chunk, Retrieve, Index or Generate; the manual check separates them.

V04 RAG failure-mode mapThe failure overlay keeps the exact V01 stage positions and build-once versus run-per-question geometry.V04 · FAILURE-MODE MAPA fluent wrong answer can begin upstream of Generate.BUILD ONCERUN PER QUESTIONIngestLoad corpusChunkEvidence unitsACT 1clause severedEmbedVectorise unitsIndexStore + metadataACT 3stale policyRetrieveSemantic + lexicalACT 2exact code missedRe-rankOptional shortlistGenerateAnswer + citationsACT 4did not abstainSEARCHABLE EVIDENCEQuestion enters RetrieveAct 4 gap begins at IngestWAS THE AGREED EVIDENCE IN THE RETRIEVED CHUNK?First-cut triage before final attributionNO · inspect Chunk / Retrieve / IndexYES · inspect Generate and context assembly
V04 must retain V01's stage positions, build-once/run-per-question split, optional Re-rank treatment and Act 4's Ingest-gap/Generate-abstention distinction.
Slide 39transition2 min

When retrieval is measured and still short, the next decision is whether to change the model rather than the pipeline.

Visual brief: A quiet two-line bridge: one jade arrow to M02.2 labelled 'retrieval measured, still short' and one smaller grey signpost to M02.3 labelled 'model selection on explicit axes'. Do not add a recap graphic or another pipeline redraw.

Designer constraint: Keep M02.2 as the primary bridge and M02.3 as a signpost; neither line may imply that M02.1 left a component choice unresolved.

Framework 2 · D01

The Staged RAG Diagnosis Demo

IdD01
TitleThe Staged RAG Diagnosis Demo
Typeinstructor-projected troubleshooting and diagnosis asset
Accountable OwnerPradeep Menon
Engineering Builder[VERIFY — TO ASSIGN]
Builder GapAssign one engineering builder who owns the corpus-to-trace implementation, replay/live interface, acceptance suite, offline package and one-page runbook. Pradeep Menon remains accountable for content, rehearsal sign-off and delivery.
Content Gate StatusThe delivery-asset specification is complete for content approval. Implementation remains blocked until an engineering builder is assigned; content approval must not be represented as demo readiness.
Build StatusNOT BUILT — owner assignment, implementation, trace acceptance, offline packaging and rehearsal remain delivery-stage work.
Ready By5 October 2026
PurposeLet the room diagnose four upstream or generation failures from visible answer and evidence traces before the trainer reveals the originating component.
Delivery
ModeInstructor-projected; no participant access
Default PathCapture-and-replay through the same interface used by the live system
Proof PathLive execution can be selected from the runbook if the room asks whether the pipeline is real
Opening RuleDo not run a correct end-to-end example before Act 1
Reveal RuleReveal one act at a time; preserve the completed four-row board through consolidation
Shared System
CorpusOne versioned illustrative corpus of 24 invented source documents for a generic regulated institution. It contains no real institution policy text and no MUFG material. The builder may vary chunk count as required, but the 24 source documents, their versions and every locked baseline below remain fixed after owner sign-off.
Corpus MethodDerive a schema from realistic policy structure, generate varied invented documents from configurations, and derive the fixed questions and agreed answers from those configurations so ground truth is known by construction.
Required Corpus Features
  • The exact T2 illustrative rule: Role-change access reviews must be completed within 10 business days.
  • The exact T2 illustrative exception: Exception: where privileged access is suspended, approval is required before access is restored.
  • Rare, lexically similar exact identifiers including TS-999, which is reserved for D01 and never appears in the teaching sequence before slide 35.
  • A superseded policy and replacement with effective-from plus effective-to or superseded-by metadata.
  • An unanswerable gap surrounded by a densely covered neighbouring policy that shares vocabulary, entities and register.
  • Document type, stable source/version/location, effective date, jurisdiction and access-class metadata.
PipelineOne seven-stage teaching pipeline — Ingest, Chunk, Embed, Index, Retrieve, optional Re-rank, Generate — with query embedding inside Retrieve and intermediate output exposed at every stage. Break switches select versioned configurations or snapshots on this one visible instance; they do not create four separate applications.
InterfaceOne projected interface with V01 stage highlight, break control, fixed query ID, answer and citation pane, retrieved-chunk pane, agreed-evidence pane, and replay/live indicator. Captured traces and live traces render through the same components so replay is not visibly a video.
Invariants
  • Same synthetic corpus, pipeline implementation and projected interface across all four acts.
  • A different fixed query/baseline pair is locked for each act; do not claim that one literal query runs across all four.
  • The broken prompt carries no abstention instruction in any act because that is Act 4's revealed mitigation.
  • Only the named switch or input condition changes within an act; the trainer says a change was made without naming its component.
Query Baseline Pairs
  • ActAct 1
    Pair IdD01-A1
    QueryWhat must happen after a role change, including when privileged access has been suspended?
    BaselineThe agreed evidence and answer must preserve both exact T2 clauses: the review is completed within 10 business days, and where privileged access is suspended, approval is required before access is restored.
    Manual EvidenceShow the retrieved rule chunk beside the separately located exception that should govern it.
    StatusLOCKED FOR BUILD — the corpus writer must preserve both exact clauses and place the exception outside the broken fixed-size chunk.
  • ActAct 2
    Pair IdD01-A2
    QueryWhat is the approval route for TS-999?
    BaselineIn the illustrative corpus, TS-999 requires the product owner to submit the release request to the Product Governance Committee and obtain recorded approval before release.
    Manual EvidenceShow the TS-999 procedure that hybrid retrieval should return beside the topically related, wrong product-family chunks returned by dense-only retrieval.
    StatusLOCKED FOR BUILD — TS-999 and its baseline are reserved for D01; the T5 teaching case uses AC-417.
  • ActAct 3
    Pair IdD01-A3
    QueryHow often must high-risk customer files be reviewed under the policy currently in force?
    BaselineEvery 12 months under the illustrative Customer Risk Review Policy v2, effective 1 July 2026; v1's superseded interval was 24 months.
    Manual EvidenceShow the superseded and replacement policy passages side by side with both effective dates visible.
    StatusLOCKED FOR BUILD — the corpus must include both policy versions and explicit effective-from, effective-to and superseded-by metadata.
  • ActAct 4
    Pair IdD01-A4
    QueryWhat retention period applies to biometric voiceprints used for branch queue analytics?
    BaselineThe agreed answer is that the corpus does not contain enough evidence to answer. The gap originates at Ingest; the demonstrated failure is Generate not saying so.
    Manual EvidenceShow every retrieved near-miss chunk and the recorded absence of an agreed supporting chunk; do not fabricate a should-have-been-retrieved passage.
    StatusLOCKED FOR BUILD — no source document may answer this question; neighbouring policies may share retention, analytics and branch vocabulary but must not mention biometric voiceprints. Re-test if the delivery model changes.
Break Switches
  • Commandbreak=chunking
    ActAct 1
    ChangeSelect the fixed-size chunk configuration whose boundary severs the T2 rule from its exception; lock overlap so it cannot silently repair the break.
    Intended Bad SignatureThe answer states the review rule while omitting the separately located restoration-approval condition.
    OriginChunk
    MitigationUse the cheapest defensible fixed-size-with-overlap baseline, then move to hierarchical retrieval when the typical answer spans a child chunk.
  • Commandbreak=dense_only
    ActAct 2
    ChangeDisable sparse retrieval and fusion while leaving the same index, pipeline and interface visible.
    Intended Bad SignatureThe system returns topically related product-family material but misses the exact TS-999 procedure.
    OriginRetrieve
    MitigationRestore sparse retrieval and fuse it with dense results; re-ranking cannot recover a candidate that was never retrieved.
  • Commandbreak=stale_index
    ActAct 3
    ChangePoint the same pipeline at the pre-supersession index snapshot or disable the validity filter so the superseded policy remains answerable.
    Intended Bad SignatureThe answer is fluent, cited and out of date, and its citation resolves visibly to the superseded policy.
    OriginIndex
    MitigationApply effective-date metadata at chunk time, filter validity at retrieval, propagate supersession and assign a refresh owner.
  • Commandbreak=out_of_corpus
    ActAct 4
    ChangeSelect the fixed gap query while leaving the pipeline configuration unchanged; retrieval must return near-miss neighbours and the broken prompt must contain no abstention instruction.
    Intended Bad SignatureGenerate invents a plausible unsupported answer from near-miss evidence instead of stating that the corpus cannot answer.
    OriginThe gap originates at Ingest; the failure to say so originates at Generate.
    MitigationAdd an abstention clause to the prompt contract and enforce citation support, while stating that neither control guarantees correctness.
Five Beats
  • Beat1
    NameBreak
    Timingabout 20 sec
    InstructionTrigger the act's named switch and say that one thing changed, without naming where.
  • Beat2
    NameRun
    Timingabout 40 sec
    InstructionRun the act's fixed query through the same visible interface and show the captured bad answer and citation.
  • Beat3
    NameDiagnose
    Timingabout 60 sec
    InstructionAsk which component failed and hold the silence; accept a concise hypothesis but do not answer it.
  • Beat4
    NameInspect
    Timingabout 2 min
    InstructionRetrieve the evidence manually and show actual versus agreed evidence side by side. For Act 4, show near-miss chunks and the known absence of support rather than inventing a missing chunk.
  • Beat5
    NameReveal
    Timingabout 1 min
    InstructionName the origin, pin it to V01, state one mitigation and reset to the next locked pair.
Timing
Topic Total24 min
Setup1 min; name the synthetic corpus, shared system, replay default and subset framing; do not show a correct run
Acts20 min; four acts at roughly 5 min each, each protecting about 60 sec of diagnosis and the manual evidence check
Consolidation3 min; completed four-row board plus subset qualification
Closing4 min; 2 min V04/manual diagnostic and 2 min M02.2 bridge plus M02.3 signpost
Combined T7 And Closing28 min
Execution Paths
Replay Default
  • Run every act live during build until the intended signature is produced and the accountable owner accepts the evidence pair.
  • Capture the complete trace: configuration and index version, query ID, retrieved chunks and scores, prompt, answer, citations, stage events and timing.
  • Replay those trace events locally through the same interface and stage-highlighting components used by live execution.
  • Record seed and sampling settings as build metadata only; fixed seeds do not guarantee hosted-model determinism.
Live Proof Path
  • Expose one runbook control that switches the same interface from replay to live without changing query IDs or stage labels.
  • Use live only on request or during rehearsal proof, state that output may vary, and return to the accepted replay trace for teaching.
  • Re-capture and re-accept affected traces after any model, embedding, vector-store, prompt or corpus change.
Acceptance Tests
  • Replay mode produces byte-identical trace output for each act in 20 consecutive runs, including chunks, prompt, answer, citations and stage events.
  • The same visible corpus, pipeline and interface are used across all four acts; each act has a distinct locked query/baseline pair and exactly one named break condition.
  • Act 1 returns the rule without the separately located exception, and its evidence pane reuses the exact illustrative clause shown in T2.
  • Act 2 returns topically related wrong material while the signed-off TS-999 evidence is recoverable through the baseline hybrid path.
  • Act 3 returns a fluent, cited, out-of-date answer whose citation opens the superseded policy with its effective date visible; the replacement policy is available in the agreed-evidence pane.
  • Act 4's corpus has no supporting answer, retrieval returns near-miss neighbours, and Generate fails to abstain; the test record states separately that the gap began at Ingest.
  • Run Act 4 live more than 20 times during build and again at rehearsal; any correct abstention blocks capture approval until the corpus/prompt is retuned and the test rerun. Repeat after any delivery-model change.
  • Every act completes inside roughly five minutes while preserving the diagnosis pause and manual evidence check; cut trainer commentary before either protected beat.
  • The V01 stage highlight and V04 placement use the same stage order, geometry, build/run split and dashed optional Re-rank treatment.
  • The full replay path passes with the network disabled, and the live proof control fails closed to replay rather than leaving the interface blank.
  • A venue-resolution fallback recording covers all four acts and can be launched locally if the interactive interface fails.
  • Pradeep Menon signs the four baselines, accepted wrong signatures, offline package and runbook at the rehearsal-ready gate on 5 October 2026.
Offline Fallback
PrimaryLocal replay package containing accepted trace files, assets and the same projected interface; no network call is required.
SecondaryOne locally stored venue-resolution recording covering all four acts in order, including manual evidence panes and stage placements.
PreflightBefore rehearsal and delivery, disable the network, run all four replay traces, open the recording, verify fonts and resolution, and confirm that the live control falls back to replay with a visible status label.
Recovery RuleIf live or venue networking fails, state that replay is the designed default and continue from the current act; if the interface fails, switch to the recording at the same beat.
Runbook
FormatOne page, available both printed and locally as PDF
Required Fields
  • Preflight checklist: network-off replay, recording, fonts, resolution, timer and V01 stage highlight.
  • Act order and exact commands: break=chunking, break=dense_only, break=stale_index, break=out_of_corpus.
  • For each act: pair ID, literal locked query, accepted bad-answer signature, retrieved/agreed evidence, origin stage, one-line mitigation and five-beat timing cues.
  • Replay/live switch and the exact sentence explaining why replay is the default.
  • Fallback point for every act and the local recording path.
  • Reset step between acts and recovery steps for blank UI, wrong trace, accidental good answer or time overrun.
  • Version manifest for corpus, chunker, embedding, index snapshot, retriever, optional re-ranker, prompt and model.
Trainer RuleDo not improvise a query, baseline, answer or citation. If a trace does not match the accepted signature, switch to its accepted replay trace and continue.
Role Lenses
DeveloperOwn switch behaviour, trace completeness, intermediate-output visibility and the manual evidence comparison.
InfrastructureOwn versioned index snapshots, replay/live controls, network-off operation, local assets, latency headroom and recovery steps.
Risk OperationsCo-author and approve the baselines, effective-date logic, absence-of-support record, citation checks and rehearsal acceptance evidence.
Outputs
  • One versioned illustrative synthetic corpus and schema/configuration manifest.
  • Four signed-off fixed query/baseline pairs and four accepted captured traces.
  • One replay/live projected interface keyed to V01.
  • One 20-run-plus acceptance log with a separate Act 4 live firing log.
  • One offline replay package, one venue-resolution fallback recording and one-page runbook.
Scope Guards
  • No participant access, fifth act, opening success run, evaluation harness or UI polish beyond back-of-room legibility.
  • No agentic RAG, Graph RAG or RAFT in D01.
  • Do not present the four modes as complete, standard or frequency-ranked.
  • Do not use real institutional policy text, real MUFG material, a fabricated incident or unsupported literal query details.