Sample diagrams for AI and machine-learning systems: how data reaches a model, how models are trained and kept fresh, what is inside a network, and how an LLM agent talks to its tools. Each page has one large realistic diagram, a legend, a variant, pros and cons, and the same diagram as code.
AI systems need two kinds of picture. System diagrams show the software around a model: data pipelines, retrieval, serving, monitoring and the calls between components. Model diagrams show what is inside the model: layers, tensor shapes, attention and residual connections. Teams that only draw one kind usually discover the other the hard way, either when a shape mismatch breaks training or when nobody can explain why the chatbot cited the wrong document.
Only one sample here is strict UML. UML covers software structure and behaviour; these are the other standard notations used alongside it. The agent tool-call page uses a UML 2.5 sequence diagram, and the training pipeline page also redraws its flow as a UML activity diagram. The RAG and pipeline diagrams are architecture data-flow diagrams, and the neural network and transformer pages use the layer and block conventions found in ML papers.
Start from the question you need to answer, not the notation. If the question is about order and responsibility at runtime, reach for a sequence diagram. If it is about where data moves and is stored, draw a data-flow architecture. If it is about the model's maths, draw layers with shapes.
| Question | Diagram | Sample page |
|---|---|---|
| How do documents become grounded answers? | Architecture data-flow diagram | RAG Architecture |
| How is a model trained, gated, deployed and retrained? | Pipeline diagram / UML activity | ML Training Pipeline |
| What layers does the model have, and what shapes flow between them? | Layer diagram, neuron graph | Neural Network Architecture |
| How do attention, residuals and normalisation fit together? | Block diagram | Transformer Block |
| Which component calls which, and when does the agent loop stop? | UML sequence diagram | LLM Agent Tool-Call Sequence |
Every sample uses the same colour rules: blue for normal steps, yellow for inputs, gates and highlights, green for outputs and success, red for error paths.