AI Architecture Lab.
Train a network. Inspect the evidence. Control the actions.
See a network learn.
A real multilayer perceptron learns to separate synthetic points. Change the architecture and observe the measured results.
Inside the network
Click a neuron to inspect itThe coloured tiles show each node’s output over the input plane. The output node always uses tanh; colours are scores, not calibrated probabilities.
Output decision surface
Move over the plotWhat is calculated? Formulas, validation and limits
Node: aⱼ = φ(bⱼ + Σᵢ wᵢⱼaᵢ). Data loss: mean ½(ŷ − y)². Update: θ ← θ − η × mean gradient; regularisation applies to weights, not biases.
Backpropagation and SGD run in a browser worker. The core is adapted from TensorFlow Playground under Apache 2.0. L1 retains its original permanent link-pruning behaviour. The displayed loss excludes the regularisation penalty. Our wrapper flushes incomplete final batches and uses a documented seeded PRNG.
The test set is held out from training, but repeatedly inspecting it while choosing settings makes it an exploration set. A final independent validation is required for a real application. This lab does not train an LLM, diagnose patients or assess regulatory compliance.
The gradient check uses central finite differences on one sample, excluding the regularisation term. At ReLU kinks, the derivative is not defined. A pass validates that check only.
Keep knowledge connected.
Retrieve evidence from permitted internal sources and an approved external corpus. See how permissions and freshness change the result.
Scope & access
BM25 ranking
Origin & date
Human ownership
Fixture reference date: 14 October 2026. Freshness is evaluated against this fixed date for reproducibility.
Retrieved sources
Evidence, with references
Synthetic documents. No real medical guideline, law or banking policy. Answers quote selected evidence; no LLM generates text.
Method and production architecture
Positive-IDF BM25: IDF(t) = ln(1 + (N − df(t) + 0.5)/(df(t) + 0.5)); score uses k₁ = 1.2 and b = 0.75. Access filtering happens before ranking. Recall and precision use the declared synthetic relevance set for the benchmark question only; arbitrary questions have no claimed ground truth.
For a production RAG, add governed connectors, OCR, hybrid lexical/vector search, reranking and an evaluated model. Internal authority, external evidence and model inference must remain distinguishable. RAG does not erase a model’s learned knowledge.
The adversarial test document is explicitly labelled in this fixture and blocked by a deterministic rule. This does not claim general prompt-injection detection. No tool or document can execute an action through this extractive demo.
Control what an agent may do.
Explore scoped permissions, independent human approval and the trace of a consequential action.
Choose an action
Idle
A read action can complete within the allowed scope. A write action requires permission and independent review.
No real payment, publication, claim or patient record is changed. In production, permissions and approvals must be enforced server-side.
Audit trace
What this control proves
The local state machine checks write permission, authorisation, separation of requester and reviewer, and review acknowledgement. Rejected or blocked actions produce no simulated write effect. A completed approval produces exactly one sandbox effect.
This is an architecture demonstration, not an autonomous LLM agent or a compliance certification. Real integrations require authenticated identities, backend policy enforcement, idempotency, incident handling and proportionate audit retention.
Make the deployment assumptions visible.
Estimate nominal model and KV-cache memory. Separate a capacity calculation from the operational controls of sovereign AI.
Sovereignty is also operational.
Define data residency, administrative access, keys, outbound traffic, licences, subprocessors and an exit plan.
Open design decisions
Selecting a control records a planning choice. It does not verify implementation or certify compliance.
Memory formulas and limits
Weights GiB = parameters × bits / 8 / 2³⁰. Full KV-cache GiB = 2 × layers × KV heads × head dimension × context tokens × concurrent sequences × bytes per KV element / 2³⁰.
Total = nominal weights + full KV cache + the stated runtime allowance. Assumption: a dense decoder on one device, without offloading or sliding-window cache. Quantisation metadata, workspaces, cache implementation and actual peak memory are not measured. The initial settings are illustrative, not a named-model specification.
Model families such as Mistral and Qwen must be evaluated using the configuration and licence of an identified version. Capacity estimates do not establish latency, quality or throughput.