Produce the complete decision package for the managed-vs-custom RAG platform choice on a multi-tenant, DPDP-scoped SaaS scenario: a weighted decision matrix where you set the weights, a reference-architecture diagram for the winning option, an ADR, and the exit-cost note most decision documents forget.
Orbit's board has approved orbit-docs-copilot for GA, and Anita must now commit the platform: a managed RAG service from a hyperscaler, or a custom stack she controls. Every hyperscaler publishes reference architectures for both paths — the decision spectrum is the official guidance shape, not a vendor trick. What the guidance cannot do is weight Orbit's constraints. That is the architect's job, and it is not delegable to the AI.
~90 minutes hands-on · Core→Advanced tier (maps to module M5). Cost: ₹0 — design-artifact lab; a chat assistant (free tier or local Ollama), Mermaid for the diagram.
Create rag-decision/ with the scenario below as scenario.md, plus empty matrix.md, architecture.mmd, adr-rag-platform.md, exit-cost-note.md.
Orbit — orbit-docs-copilot platform decision: scenario constraints
Company: Orbit, B2B SaaS (workforce management), 140 tenant companies.
Workload: customer-facing docs copilot; tenants upload their own HR
policy documents — India-scoped personal data is in scope, so DPDP
Rules 2025 obligations (consent lineage, deletion on request, purpose
limitation) attach to prompts, embeddings, and outputs.
Tenancy: hard requirement — tenant A's documents must never influence
tenant B's answers; several enterprise tenants demand per-tenant
deletion certificates.
Residency: Indian tenants' data stays in-region; two EU prospects will
require EU processing within 12 months.
Team: Anita + 4 engineers; strong on Postgres/K8s/VPCs; nobody has run
a search cluster; on-call rotation is already thin.
Traffic: ~40k requests/day at GA, 3x peak; growth plan 5x in 18 months.
Commercials: platform opex target under control of unit economics
review each quarter; CFO allergic to open-ended per-query pricing
without a cap; finance wants an exit story before any multi-year
commitment.
Timeline: GA in one quarter; a failed re-platform later would cost two.
Turn the scenario into 6–8 named decision criteria in matrix.md — e.g., tenant isolation & deletion capability, residency control, ops burden at team size, time to GA, cost shape & predictability, retrieval quality control, exit cost, ecosystem fit. Ask your assistant to critique your criteria list against the scenario ("what constraint have I not represented?") — but the list is yours. Every criterion must trace to a scenario line; delete any that exist because they are conventional rather than because Orbit needs them.
✅ Checkpoint: 6–8 criteria in matrix.md, each annotated with the scenario line that justifies it.
Assign each criterion a weight (total 100) and write one sentence per weight defending it from the scenario — the deletion/tenancy and residency constraints are regulatory, the team-size constraint is structural, so expect them to dominate. Do this before any option scoring: weights set after scores are rationalization, not analysis. Record the weight rationale in the matrix file; the ARB will read the rationale, not the arithmetic.
✅ Checkpoint: weights sum to 100, set and justified prior to any scoring, committed in matrix.md.
Define 3 options: (a) managed RAG (a hyperscaler knowledge-base/search offering end to end), (b) custom stack (LlamaIndex-class framework + pgvector on managed Postgres + your own eval loop), (c) hybrid (managed model endpoint, custom retrieval). Have the assistant draft 1–5 scores per criterion per option with a stated reason each. Then do the architect's pass: any score whose reason rests on a claimed platform capability — per-tenant deletion semantics, residency guarantees, isolation model, pricing shape — gets verified against the vendor's current documentation before you accept it, because capability claims about managed AI services are exactly where assistants hallucinate. Adjust scores you disagree with; mark every adjustment.
A weighted matrix inherits the truth of its cells — one hallucinated "the managed service supports per-tenant deletion certificates" can silently flip the decision, so verify capability cells against vendor docs dated today.
✅ Checkpoint: completed matrix with weighted totals, ≥2 cells marked "verified against docs on <date>", and your adjustments visible.
For the winning option, produce architecture.mmd (Mermaid): ingestion path with consent/lineage capture point, per-tenant isolation mechanism made visible (metadata filter or index-per-tenant — name it on the edge), the deletion path (the DPDP-driven arrow most diagrams omit: request → embeddings + chunks + caches + traces), region boundary, and the eval loop as a first-class component. Generate with the AI, then verify each element against your matrix reasoning — the diagram must show the mechanisms your scores assumed exist.
✅ Checkpoint: rendering diagram whose isolation, deletion, and residency mechanisms match the claims your matrix scored.
Draft adr-rag-platform.md (MADR shape: context from the scenario, the three options with weighted totals, decision, consequences — including what you gave up). Then the artifact that separates a decision package from a slide: exit-cost-note.md. In one page: what is portable if Orbit must leave the chosen platform in 18 months (documents, eval sets, prompts, application code) versus what is rebuilt (embeddings — re-embedding cost at then-current prices, index structures, platform-specific orchestration, learned retrieval tuning), an order-of-magnitude effort estimate in engineer-weeks with your assumptions stated, and the two lock-in reducers you will adopt from day one (e.g., portable document store as source of truth, provider-neutral eval harness). Red-team the ADR once with a fresh adversarial prompt and fold in what survives.
✅ Checkpoint: ADR status "proposed" with consequences; exit-cost note quantifies portable-vs-rebuilt with stated assumptions.
Assessment scenarios in this domain hinge on constraint-to-decision traceability — expect items where the technically superior platform loses because a regulatory or team constraint outweighs it, and items where the right answer is "verify the claimed capability against vendor docs before deciding".
Managed-vs-custom is not a technology argument; it is a weighted judgment about your constraints — regulation, team, and money — and the weights are the decision. The AI drafts scores and prose; the architect owns weights, verifies capability claims, and prices the exit before signing.
The rag-decision/ package: matrix, diagram, ADR, exit-cost note. Self-grading rubric (pass = 8/11):
Platform decisions for clients involve commercial terms and client data classifications that must not enter public tools. Run this lab's synthetic scenario freely; on engagement, keep negotiated pricing and tenant names out of prompts (use indexed placeholders), run scoring assistance inside the client-approved tenancy or a local model, and verify capabilities against vendor docs from a logged-out browser so the trail is reproducible. The four-artifact package format is the client deliverable.