Architecture Diagrams

A collection of Mermaid diagram sources (.mmd) covering machine-learning system design, retrieval-augmented generation, deployment architecture, ETL workflows, and game-state machines.

ML System Architecture

ch1-system-architecture.mmd — End-to-end ML System

flowchart TD: Raw Data Sources → Feature Pipeline → Vector Store
              Training Data → Base Model → Inference Pipeline → API Endpoints → Users

Top-down flowchart of a complete ML system: feature ingestion, vector storage, model fine-tuning, inference serving, and API delivery.

ch3-etl-workflow.mmd — ETL Workflow

Extract-transform-load pipeline connecting raw data sources through transformation stages to a downstream data store.

ch4-rag-architecture.mmd — RAG Architecture

Retrieval-augmented generation pipeline: document chunks are embedded and stored in a vector database; at query time the query is embedded, relevant context is retrieved, and an LLM generates the final response.

ch5-training-flow.mmd — Model Training Flow

Training pipeline stages from raw dataset preparation through model training, evaluation, and checkpoint export.

ch9-advanced-rag.mmd — Advanced RAG

Extended RAG architecture incorporating re-ranking, hybrid retrieval, or multi-hop reasoning steps beyond the basic embed-retrieve-generate loop.

Deployment and Operations

ch10-deployment-arch.mmd — Deployment Architecture

Production topology: Client → Load Balancer → API Gateway → Auth Service; Inference Service queries a Vector Store and an LLM Service; results are logged to a Monitoring DB.

ch11-cicd-pipeline.mmd — CI/CD Pipeline

Left-to-right flowchart: Code push triggers a Git repo, CI pipeline builds a Docker image, image is pushed to a registry, and the model service is deployed with metrics and alerting.

Game State Machines

pushcases.mmd — Sokoban Push Cases

State diagram modelling the two push variants in a Sokoban-style puzzle: hitting a box centre triggers a single-box push; hitting a box edge triggers a double-box push. Each path resolves to Success or Blocked.

wideflow.mmd — Move Validation Flow

Decision tree for processing a robot move: wall-collision check, box-contact check, box-type branch (single vs double), push-success check, and final state update or invalid-move resolution.

Viewing the Diagrams

The .mmd files can be rendered with the Mermaid CLI:

npx -p @mermaid-js/mermaid-cli mmdc -i ch1-system-architecture.mmd -o ch1-system-architecture.svg

Or viewed directly on mermaid.live by pasting the file contents.

Author: Jason Walsh

j@wal.sh

Last Updated: 2026-04-28 21:27:44

build: 2026-05-20 03:34 | sha: 12ce5fe