Quick revision
The short answer
We make the model the replaceable part and invest in what lasts. Model calls sit behind internal interfaces and a gateway, so changing provider is configuration plus evaluation, not a rewrite. The durable assets are our evaluation datasets, domain data, retrieval pipelines and guardrails. We prefer short, usage-based contracts, avoid single-vendor features unless the value is large, re-evaluate new models on the same test sets regularly, and keep documentation of model use and risk ready for regulation such as the EU AI Act.
What to remember
In this answer, we saw that the way to make multi-year AI decisions is to treat the model as the replaceable part. We isolate model calls behind internal interfaces and a gateway so switching is configuration plus evaluation, invest in durable assets like evaluation sets, domain data, retrieval and guardrails, prefer short usage-based contracts and contain single-vendor features, re-evaluate new models regularly on the same tests, and keep documentation of model use and risk ready for regulation such as the EU AI Act.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
We make the model the replaceable part and invest in what lasts. Model calls sit behind internal interfaces and a gateway, so changing provider is configuration plus evaluation, not a rewrite. The durable assets are our evaluation datasets, domain data, retrieval pipelines and guardrails. We prefer short, usage-based contracts, avoid single-vendor features unless the value is large, re-evaluate new models on the same test sets regularly, and keep documentation of model use and risk ready for regulation such as the EU AI Act.
Why this question is asked
A multi-year architecture decision normally assumes the foundations will be stable: a database, a cloud, a language runtime. LLMs break that assumption. A model that is the best choice today may be beaten on quality and undercut on price within six months, and a feature that only one vendor offers may become standard or disappear. Interviewers ask senior leaders this question to see whether they can commit to a direction without betting the company on one vendor's roadmap. In this answer, we will look at what actually changes and what does not, how to isolate the changing part, which assets to invest in, how to handle contracts and vendor-specific features, how to re-evaluate continuously, and how to prepare for regulation.
1Separating What Changes From What Lasts
The useful first step is to sort the parts of an AI system by how fast they change. Models, prices, context sizes and provider APIs change every few months. Our business problems, our data, our users' expectations and our quality bar change slowly. A good architecture lets the fast-changing layer be swapped while the slow-changing layers keep their value.
So the question becomes: where do we put our engineering money? If we spend it on prompt tricks tuned to one model's quirks, the value disappears with the next model. If we spend it on a high-quality evaluation set for our claims process, that value stays no matter which model we use next year.
| Part of the system | Typical lifetime | Where to invest |
|---|---|---|
| Model choice and version | months | keep swappable, behind a gateway |
| Provider APIs and SDK features | months | contain in adapters |
| Prompts | months, per model | versioned, tested, cheap to rewrite |
| Evaluation datasets | years | invest heavily |
| Domain data and retrieval pipelines | years | invest heavily |
| Guardrails and authorization | years | invest, share across features |
2Isolating Model Calls Behind Internal Interfaces
Isolation works at two levels. In code, services talk to an internal interface or a framework abstraction such as Spring AI's ChatClient or LangChain4j's ChatModel, never to a provider SDK spread through the domain. In the network, calls go through a company gateway that maps logical model names (summary-standard) to real providers and versions. Together they mean that switching a feature from provider A to provider B is a configuration change in the gateway plus an evaluation run, and the forty services calling it do not change.
There is an honest limit to this. Abstractions cover the common ground, chat, embeddings, tool calls and structured output, but providers differ in quality, tokenizers and how they follow instructions, so a prompt tuned for one may need adjustment for another. Isolation makes the switch cheap to attempt; evaluation tells us whether it worked.
Notice that the fallback entry also gives us a standing proof that we are not locked in: a second vendor is configured, evaluated and taking traffic during outages.
3Investing in Durable Assets
Evaluation datasets are the most valuable and most neglected asset. A few hundred real inputs per feature with known good outputs or scoring rules let us answer, within an hour, whether a new model is better, cheaper or worse for us. Without them, every model decision is a matter of opinion or vendor benchmarks that do not reflect our data.
Domain data and retrieval pipelines are next: clean, well-chunked, permission-tagged documents and good search. They improve every model's answers, and they move with us when we change models. Guardrails, the shared code that authorizes tool calls, redacts personal data and validates outputs, are similar. None of these depend on which model sits underneath, so every dollar spent on them keeps paying.
4Contracts and Vendor-Specific Features
Commercially, we keep our options open. We prefer usage-based pricing and contracts of a year or less, or multi-year commitments only with the freedom to move volume between models. Large committed-spend discounts are tempting, but a three-year commitment to one vendor in a market where prices fall quickly can turn a discount into a premium.
Technically, we treat vendor-only features with care. Some are worth it: a feature that saves 40 percent of cost or enables a product we could not otherwise build. Others, such as a proprietary agent framework or a vendor-hosted memory store holding our data, can tie us in deeply for small gains. The rule I use is that a single-vendor feature needs a written case for its value, an estimate of the cost to leave, and an adapter that contains it.
5Re-evaluating on a Regular Schedule
Because the market moves, we make re-evaluation a routine instead of a crisis. Every quarter, or whenever a significant new model is released, the platform team runs the shared evaluation suites against the current models and the most promising new ones, using exactly the same test sets. The output is a short report per feature: quality, cost per thousand requests and latency, old model against new.
- New models released or quarter starts
- Run the same evaluation setsquality, cost per 1,000 calls, latency
- Better or cheaper at equal quality?YesShadow traffic, then gradual switchNoKeep the current model
- Update the gateway routinglogical names unchanged
- Record the decision and resultsaudit trail of model use
5 steps in order. Play them, or step through them one at a time.
6Planning for Regulation
Regulation is the slowest-moving force here and the one that is easiest to forget. The EU AI Act entered into force in 2024 with obligations phased in over the following years, depending on the risk category of the system and on whether we provide or deploy general-purpose models; other regions are writing similar rules. Exact obligations and dates are a matter for legal review, so we check the current text rather than rely on memory.
Architecturally, what helps is the same discipline as above. If the gateway records which model and version served each feature, and each feature has a short risk assessment, a description of its purpose, its data and its human oversight, then a regulator's or auditor's question becomes a report rather than an investigation. That documentation also outlives any vendor.
7Follow-up questions
Is it not cheaper to commit fully to one vendor and get the discount?
In the short term, often yes. But the discount is usually smaller than the price drops and quality gains we would miss over a multi-year term, and full commitment weakens our negotiating position later. A middle path is a moderate commitment with one primary vendor while keeping a second one configured and evaluated.
Does open-weight hosting solve lock-in?
It removes dependence on one API vendor and can help with data control, but it adds lock-in to our own serving stack, GPU capacity and operations team. It is one more option behind the same gateway, chosen per use case, not a universal answer.
How do you convince teams to spend time on evaluation sets?
By making them the gate for model changes and showing results: when the quarterly review saves a feature 50 percent of its cost with proof that quality did not drop, teams see the value. The platform team also supplies tooling so building a set is a few days of work, not a project.
8Conclusion
In this answer, we saw that the way to make multi-year AI decisions is to treat the model as the replaceable part. We isolate model calls behind internal interfaces and a gateway so switching is configuration plus evaluation, invest in durable assets like evaluation sets, domain data, retrieval and guardrails, prefer short usage-based contracts and contain single-vendor features, re-evaluate new models regularly on the same tests, and keep documentation of model use and risk ready for regulation such as the EU AI Act.
Open with
My principle is that the model is the part we expect to replace, so I design for replacement and invest in what lasts. In code, services use an internal interface or an abstraction like Spring AI's ChatClient, and calls go through a gateway that maps logical model names to real providers.
Then, if they want more
Switching a feature to another vendor is then a gateway configuration change plus an evaluation run. I usually keep a second vendor configured as a fallback, which also proves we are not locked in.
The things I invest in heavily are those that survive every model change: evaluation datasets for each feature, our domain data and retrieval pipelines, and shared guardrails such as authorization of tool calls and redaction.
Commercially I prefer usage-based pricing and shorter contracts, because prices in this market fall quickly; if we use a vendor-only feature, it needs a clear value case, an estimate of the exit cost and an adapter around it.
Every quarter we re-run the same evaluation sets against current and new models and switch when a model is better or cheaper at equal quality, with shadow traffic first.
Finally, I plan for regulation like the EU AI Act, whose obligations phase in over several years: the gateway records which model served what, and each feature has a short risk assessment and documentation.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring AI reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "LLM capabilities and prices change every few months. As the senior technical leader, how...": https://scrivio-interview-library.netlify.app/spring-boot/llm-fundamentals/ce12bdb07b/