A practical cost architecture for vertical AI products
Route each task to the right model, retrieve only relevant context, move deterministic work off the LLM, and measure usage at the product boundary.
Vertical AI costs come from product decisions before they come from model prices. A workflow that sends an entire knowledge base to one frontier model on every turn will remain expensive after a provider discount. A bounded task with focused retrieval and measurable quality gives the team more levers.
Assign a model to a task
Classification, extraction, coaching, roleplay, drafting, embeddings, and long-form reasoning have different quality requirements. A model registry lets the product select the least expensive route that still meets the task standard. Per-vertical overrides preserve flexibility when one market needs a different language or safety profile.
Retrieve the smallest useful context
Retrieval should answer a product question. A coaching turn may need one user goal and a few lesson chunks. A quote workflow may need price-book records and the current opportunity. Sending unrelated history raises cost and can lower answer quality.
Move deterministic work into code
Validation, state transitions, rate limits, calculations, safety policy, and approval checks belong in testable services when possible. The model should handle ambiguity and language, not work that a function can perform with a defined result.
Measure cost beside quality
Token totals alone cannot tell a product team whether a route works. Track latency, error rate, approval rate, user correction, output acceptance, safety events, and the workflow measure. A lower-cost route fails if users redo the work.
Keep providers replaceable
Provider abstraction protects product workflows from model churn. It also supports privacy and availability policies. The workflow should name the task and required controls while the routing layer chooses an eligible model.
Apply this to a real workflow.
Bring the buyer, current process, constraints, and success measure.