Architecture of an AI application
Short answer
An AI application joins a user interface, business logic, data, model calls and operations. The application enforces access rights and validates inputs independently of the model. It should make results verifiable and have a defined alternative when a dependency fails.
Test each boundary with a real failure
For a knowledge assistant, test an authorized request with a good source, an ambiguous request, a restricted document and a generation outage. Each path should show a clear result. If the model fails, document search can be an alternate route if the findings are safe and useful.
Observe latency, cost, technical errors and a separate sample of answer quality. Keep input authorization and business effects outside the model. This makes it possible to diagnose whether a failure came from access control, retrieval, generation or the user interface.
References Implementing SLOs
Worked example
A knowledge assistant checks permissions, retrieves approved passages and shows sources alongside a drafted answer. When generation is unavailable, the document search remains accessible.
How to proceed
- Map the data flow, access boundaries and ownership.
- Separate model requests, validation and application state.
- Test operational failures and monitor cost, latency and answer quality.
- Risks and boundaries
- Unvalidated outputs or dependence on a single model path can move failures across multiple layers.
- Decision criteria
- Choose architecture that lets the team evaluate rights, output quality, cost and recovery independently.
Frequently asked questions
Which controls stay outside the model?
Authorization, input checks, application state and business rules are enforced by the application.
How should an application handle a model outage?
Set clear time limits and offer a useful fallback where possible, such as document search or human support.
What should monitoring capture?
Availability and latency, cost per useful result, quality samples and the model version involved.
Sources
Giminger Consulting
Discuss how to apply this guidance to your organization.