AI architecture

How production AI systems are designed

Three reference architectures I build against. Hover or tap any component to see the role it plays and why it exists.

01

RAG Architecture

Grounded answering over enterprise knowledge with verifiable sources.

Hover or tap a component to see what it does in this architecture.

User

A natural-language question arrives with the user's access scope attached.

Application

Validates input, applies rate limits and builds the request context.

Retriever

Embeds the query and runs hybrid dense plus keyword search.

Vector Database

Stores chunk embeddings with metadata for filtering by type, recency and scope.

Reranker

A cross-encoder reorders candidates so only the strongest passages reach the model.

LLM

Synthesises an answer constrained to retrieved context, with citations.

Response

Streamed back with sources, or an explicit abstention when evidence is thin.

02

Agentic AI Architecture

Reasoning and tool use, bounded by validation before any real action.

Hover or tap a component to see what it does in this architecture.

User

States a goal rather than a procedure.

Agent

Runtime that owns state, step budget and execution tracing.

Planner

Decomposes the goal into an ordered, revisable step list.

Tools

Typed registry — each tool declares a schema that arguments must satisfy.

APIs

Enterprise systems reached only through idempotent, permissioned calls.

Knowledge

Retrieval over documentation and prior cases informs each step.

LLM

Selects tools and produces structured arguments and rationales.

Validator

Deterministic checks gate the result before anything is written.

Action

The final effect, logged with its full decision trace.

03

Machine Learning Architecture

From raw data to a monitored, retrainable production service.

Hover or tap a component to see what it does in this architecture.

Data

Batch and streaming sources with contracts and quality checks.

Feature Engineering

Versioned, leakage-safe features shared between training and serving.

Model Training

Reproducible runs with tracked parameters, data versions and artefacts.

Evaluation

Time-based validation, calibration and segment stability before promotion.

Model Registry

Promoted versions with lineage, so rollback is a config change.

API

Low-latency serving with the same feature logic used in training.

Monitoring

Drift, latency and performance tracking that can trigger retraining.