Skip to content
All articles

Spring AI · Architecture

The model is not the whole application

In a Spring AI service, the model call sits inside a governed request pipeline, and four paths surround it: request, knowledge, control and evaluation. Keep all four visible in design reviews.

· 3 min read

A governed request pipeline and the four paths around it. A request passes through identity, tenant and budget resolution, then policy and authorized context, then the Spring AI ChatClient with advisors, model and tools when permitted, then validation of schema and claims, and returns a result or abstains. Four paths to keep visible in design reviews: the request path serves the interaction; the knowledge path ingests and retires enterprise evidence; the control path manages prompts, models, policies, secrets, quotas and flags; the evaluation path decides whether a candidate earns release and whether production stays acceptable.

The shortest path to production judgment, in the course's words, is to stop drawing the model as the whole application.

A governed request pipeline

A caller enters through an ordinary transport boundary. The application resolves identity, tenant, role, request purpose and budget. It retrieves only authorized context, chooses an approved prompt and model route, invokes Spring AI, validates the response, enforces post-generation policy and emits evidence.

The model may generate text or request a tool, but deterministic services retain authority over data and side effects. The course's five steps are: resolve the request, apply policy and authorized context, run the ChatClient with approved advisors, model and tools, validate schema and claims, then return the result, abstain or escalate with evidence. Trace IDs, versions, decisions, latency, tokens, citations and outcomes are recorded along the way.

Spring AI integrates the model call. The application owns the end-to-end decision.

Four paths to keep visible

The course asks you to keep four paths visible in design reviews:

  • the request path serves the interaction;
  • the knowledge path ingests and retires enterprise evidence;
  • the control path manages prompts, models, policies, secrets, quotas and feature flags;
  • the evaluation path decides whether a candidate deserves release and whether production behavior remains acceptable.

Mental Model

A design review that only draws the request path has drawn the part of the system that is easiest to demo. The other three paths are where evidence goes stale, where behavior changes without a deploy, and where regressions are caught.

A useful question for each review: for every box on the request path, which of the other three paths keeps it correct over time?

Get one diagram a week

A short article built around one engineering diagram, from the same library as these courses.

One diagram-led article a week on AI and systems engineering. We email you once to confirm, and every newsletter has an unsubscribe link. Privacy policy