# Systems built around a model

> This section covers systems built around a model, which the same canon governs with one extra category whose records sit on the correctness layer.

Page: Architecture · Scale
Canonical: https://banes-lab.com/software-architecture/scale#systems-built-around-a-model

This section is stop 102 of 102 in the learning route. Previous: [05 - Scale follows determinism](https://banes-lab.com/software-architecture/scale/scale-follows-determinism.md). It builds on [04 - The author is probabilistic](https://banes-lab.com/software-architecture/scale/the-author-is-probabilistic.md), [05 - Scale follows determinism](https://banes-lab.com/software-architecture/scale/scale-follows-determinism.md).

This section covers systems built around a model, which the same canon governs with one extra category whose records sit on the [correctness layer](https://banes-lab.com/records/layer/correctness-core.md). Nothing about a model is special to the canon. The category applies the contracts, schema and security layers to an author whose output is a distribution, and the one thing it adds is the insistence that the distribution be measured before it is trusted, in the four obligations shown in [F1·a one category](https://banes-lab.com/software-architecture/scale#systems-built-around-a-model-panel-a).

### A dependency whose output is a distribution

A model is treated as a component that returns answers, so its output crosses every boundary a deterministic component's would and none of the contracts are applied. A completion is written straight into a trusted store, the store is read as fact by the rest of the system, and the fact was a fluent guess that was never validated because the model was treated as a component rather than as an author. A model's output is a distribution, so every contract that assumes a deterministic component is violated by default where a model stands, and the only repair is to apply the contracts explicitly at the boundary the model's output crosses.

For this reason a model is governed as a dependency whose output is a distribution, by the same canon applied at its boundary. The model is treated as an author rather than a component, so every boundary its output crosses is one the contracts already govern. In practice, a model is versioned, gated and evaluated like any dependency, and measured before it is trusted. What it generates is grounded in retrieved evidence that cites its source rather than in recollection, and the knowledge it reasons over is structured so the output can be explained. Its authority is bounded at every boundary, so its output is validated before it reaches a sink, a raw completion never lands in a trusted store, and every capability it may invoke is declared, so it is discovered rather than reachable by default.

To check this, follow one model output from generation to the first trusted sink and name the validation it crossed. If there is none, the model's authority is unbounded, and the canon has a category for exactly that failure. The category governs a model as a component of a system and says nothing about how a model should be built or trained. A model's internals are a dependency's internals, and the canon's claim stops at the boundary where its output crosses into the system.

### Governed, grounded, structured

[Model governance](https://banes-lab.com/records/arch/model-governance.md) and [model evaluation](https://banes-lab.com/records/arch/model-evaluation.md) are the canon's records for the first obligation. [Model drift monitoring](https://banes-lab.com/records/arch/model-drift-monitoring.md) keeps measuring after the model is trusted, because a distribution that was acceptable at one version is a claim about that version only, and [model version ambiguity](https://banes-lab.com/records/arch/model-version-ambiguity.md) is the anti-pattern of a system that cannot say which one answered.

[Retrieval-augmented generation](https://banes-lab.com/records/arch/retrieval-augmented-generation.md) is the grounding, with [vector search](https://banes-lab.com/records/arch/vector-search.md) as the retrieval and the citation as the ground. [Knowledge graphs](https://banes-lab.com/records/arch/knowledge-graphs.md) structure what the system reasons over so that [explainability](https://banes-lab.com/records/arch/explainability.md) is a property of the output rather than a hope.

### Bounded

[Model safety](https://banes-lab.com/records/arch/model-safety.md) is the canon's record for the bound. The validation is [input validation](https://banes-lab.com/records/arch/input-validation.md), and a capability the model may invoke is a [capability declaration](https://banes-lab.com/records/arch/capability-declaration.md). [Least privilege](https://banes-lab.com/records/arch/least-privilege.md) and [secure by default](https://banes-lab.com/records/arch/secure-by-default.md) are the same two principles they are for any actor, applied to one whose intentions are a distribution.

An [agentic architecture](https://banes-lab.com/records/arch/agentic-architecture.md) is [traded against determinism](https://banes-lab.com/records/tension/agentic-architecture-determinism.md), and the operating point is the set of gates described in [the loop](https://banes-lab.com/disciplined-methodology/start/the-loop.md), which is the same answer this whole page gives. [Prompt sprawl](https://banes-lab.com/records/arch/prompt-sprawl.md) is what a system looks like when the gates were never built and the prompts took their place.

F1·a one category

```mermaid
flowchart TB
model["A model in the system"]
governed["versioned, gated, evaluated · like any dependency"]
grounded["generation grounded in retrieved evidence that cites its source"]
structured["knowledge structured so the output can be explained"]
bounded["authority bounded · output validated before any sink, capabilities declared"]
canon["The same canon · contracts, schema and security applied to an author whose output is a distribution"]
model --> governed --> canon
model --> grounded --> canon
model --> structured --> canon
model --> bounded --> canon
```

## Links to

- [Correctness Core](https://banes-lab.com/records/layer/correctness-core.md)
- [Model Governance](https://banes-lab.com/records/arch/model-governance.md)
- [Model Evaluation](https://banes-lab.com/records/arch/model-evaluation.md)
- [Model Drift Monitoring](https://banes-lab.com/records/arch/model-drift-monitoring.md)
- [Model Version Ambiguity](https://banes-lab.com/records/arch/model-version-ambiguity.md)
- [Retrieval-Augmented Generation (RAG)](https://banes-lab.com/records/arch/retrieval-augmented-generation.md)
- [Vector Search](https://banes-lab.com/records/arch/vector-search.md)
- [Knowledge Graphs](https://banes-lab.com/records/arch/knowledge-graphs.md)
- [Explainability](https://banes-lab.com/records/arch/explainability.md)
- [Model Safety](https://banes-lab.com/records/arch/model-safety.md)
- [Input Validation](https://banes-lab.com/records/arch/input-validation.md)
- [Capability Declaration](https://banes-lab.com/records/arch/capability-declaration.md)
- [Least Privilege](https://banes-lab.com/records/arch/least-privilege.md)
- [Secure by Default](https://banes-lab.com/records/arch/secure-by-default.md)
- [Agentic Architecture](https://banes-lab.com/records/arch/agentic-architecture.md)
- [Agentic Architecture / Determinism](https://banes-lab.com/records/tension/agentic-architecture-determinism.md)
- [The loop](https://banes-lab.com/disciplined-methodology/start/the-loop.md)
- [Prompt Sprawl](https://banes-lab.com/records/arch/prompt-sprawl.md)
