The way in opens the moment the set has loaded.

Architecture of IntelligenceDrawing set · Akshay Bajpai

S-201Structural

Structural Principles

The decisions that outlast implementation

System design, infrastructure patterns, and how I think about structure.

Scale
1:20
Rev
C
Issued
2026.09
1Section through a governed platformS-201 · 1:20

Architecture is the set of decisions that outlast implementation. In AI systems that means naming invariants early: the clinician or operator is always the final authority, every model output is traceable to a version and data slice, and ambiguous database questions never execute without preview, disambiguation, and explicit human confirmation. Those are not compliance checkboxes. They are structural choices that keep NL2SQL, RAG, and agent tool calls from becoming silent liabilities.

Unstructured EHR · as receivedPatient John D. 45y male arrived 09:30 complaining of sharp chest pain radiating to left arm. BP is 145/90, HR 98. Meds: lisinopril 10mg daily. No known allergies. Doctor notes slight diaphoresis. Sent for stat ECG and troponin levels.… parsing string
… regex failed
… layout parser confidence: 12%
Extracted intelligence · JSON
{
  "patient_age": 45,
  "patient_gender": "M",
  "symptoms": ["chest pain", "diaphoresis"],
  "vitals": {
    "bp": "145/90",
    "hr": 98
  },
  "medications": ["lisinopril 10mg"],
  "orders": ["ECG", "troponin"],
  "confidence_score": 0.98
}
Field
Conf.
patient_age
1.00
patient_gender
0.99
symptoms
0.97
vitals
0.99
medications
0.98
orders
0.98
… schema validated
… 6 of 6 fields resolved
… layout parser confidence: 98%
Fig. 1Drag the divider. The same clinical note, before and after the extraction pipeline. The point of the architecture is that the right-hand state is traceable back to the left.

For conversational and agentic platforms I default to a gateway-first layout: tiered routing (exact match → classifier → composed retrieval), hybrid dense-and-sparse search with cross-encoder reranking, per-tenant keys and caching, OpenRouter or Bedrock-backed model selection with fallbacks, and microservices bounded by failure domain: orchestration, retrieval, execution against real rows, guardrails with escalation flags, observability on every hop. Monorepos like AURIXA and forward-deployed stacks on AWS CDK (Lambda, API Gateway, RDS, Redis, secrets) are different packaging of the same idea: scale the concern that hurts, not the whole binary.

OBSERVABILITY ON EVERY HOPREQUESTGATEWAYper-tenant keys · cachingTIER 1 · EXACT MATCHTIER 2 · CLASSIFIERTIER 3 · COMPOSEDretrievalHYBRID SEARCHdense + sparse · rerankedMODEL SELECTIONwith fallbacksGUARDRAILSescalation flagsRESPONSE

A request the first tier can answer by exact match.

Gateway › Tier 1 · exact match › Guardrails

tiers tried: 1 of 3

The cheapest tier is asked first. Most of the routing is deciding how little work a request needs.

Fig. 2The gateway-first layout from the paragraph above. Choose a request; each routing tier is tried in turn and the first that can serve it does.

When throughput dominates (video ingest, restaurant demand sensing, finance onboarding), I reach for Kafka (or equivalent) ingestion, asynchronous inference, WebSocket fan-out for operators, and sub-200ms ingestion-to-decision budgets where the product promise requires it. Air-gapped and on-premise defense deployments add another axis: self-contained inference stacks without assuming a always-on cloud control plane.

MLOps is part of architecture, not an appendix: MLflow and W&B for experiment lineage, QLoRA when fine-tunes must be affordable, batching and quantization when p95 cost matters, Spark when batch feature work belongs off the request path, Terraform and CDK when environments must be reproducible. Local Docker parity with production is non-negotiable for the teams I lead: if staging cannot run the same contract as prod, UAT is theatre.

Drawing conventions

The same discipline applies to this site. It is issued as a drawing set with three states, and the controls that govern it are exposed rather than hidden.

Control scheduleDraft

These are the real controls for this sheet, not a specimen panel. Everything below is wired to the drawing you are looking at.

Recurring themes across engagements: minimal surface area, clear boundaries, performance as a requirement from day one, and the conviction that the best dependency is the one you do not add. Case studies with tradeoffs and metrics are in Work; longer-form philosophy in AI infrastructure philosophy and Essays.

Architecture of IntelligenceDrawing set · Akshay Bajpai · akshaybajpai.comTitleStructural PrinciplesRevCIssued2026.09S-201

S-201record

sheet
S-201
title
Structural Principles
subtitle
The decisions that outlast implementation
discipline
S · Structural
scale
1:20
revision
C
issued
2026.09
refs
W-400, B-500, E-600
invariants
operator authority · output traceability · no silent execution
default
gateway-first, tiered routing