Make the model replaceable. Keep the contract.
The application should know what it expects from a model and what to do when that expectation is not met.
Discuss the architecture01The design question
Valid JSON is a start, not a verdict.
A response can match a schema while naming a nonexistent account or citing the wrong passage. Format validation, factual checks and permission checks serve different purposes. The integration should retain those distinctions instead of treating one successful parse as permission to continue.
Reference design. Reusable NAV infrastructure is under development.
02Key decisions
Choose around the task’s constraints.
Context
Select the information the task needs, within the user’s access. More context can add irrelevant or conflicting material.
Behavior
Define structured fields, an acceptable refusal and a useful request for clarification. Test them with representative cases.
Change
Compare a new provider or configuration against the same task cases before routing ordinary work through it.
03In practice
Model Integration in practice
Choose the task before the model
Latency, input sensitivity, context length, output requirements, and expected error cost shape the integration. A deterministic rule or search query can be the better tool for parts of the workflow.
Treat retrieved text as data
Documents and tool responses may contain misleading or malicious instructions. The application must preserve the boundary between source material and execution policy, and validate any resulting tool arguments independently.
Plan for change
Version evaluation cases and application contracts so model and provider changes can be assessed before rollout. Compare output quality, latency, cost, and control behavior against the current configuration.
04Scope
Areas of work
- Provider integration
- Retrieval design
- Structured output
- Context boundaries
- Fallback behavior
- Versioned evaluation
05A common question
Should the application depend on one model provider?
The answer depends on the task and available interfaces. A stable application contract and versioned evaluations make provider choices easier to assess without pretending that different models behave identically.