Build vs. Buy: A Framework for Your First AI Feature
Every team adding AI to a product reaches the same fork: build it ourselves, or wire up someone else’s API? The instinct, especially among strong engineers, is to build. It feels like control. More often it is a way to spend three months recreating something you could have rented for a few cents per call.
Buying is not always right either. The framework below starts from a question most teams skip.
Start with the cost of being wrong
Before you compare features or pricing, ask what happens when this feature gives a bad answer. The cost of a wrong output should drive almost every decision after it.
Take a feature where a wrong answer is a mild annoyance: a slightly off autocomplete suggestion, or a summary the user can ignore. Buy, ship quickly and learn from real usage. Now take a feature where a wrong answer is expensive, such as one that sends money, deletes data or gives medical or legal guidance. The interesting engineering there is everything around the model: the guardrails, the verification and the human review. You build that part no matter where the model comes from.
So build vs. buy is rarely a question about the model. It is a question about how much control over correctness the use case demands.
What to buy
For the core intelligence, buy. Training a frontier model is out of reach for nearly every team, and fine-tuning is the wrong first move more often than people assume. A top-tier hosted model will beat anything you can train yourself on a typical product budget, and the gap tends to widen with each new release.
Buy the plumbing too: vector databases, observability, eval tooling and prompt management. These are solved problems with mature vendors, and every week spent on them is a week not spent on what your users came for.
What to build
Build the parts that encode your specific advantage.
- The context layer. How your own data is retrieved, ranked and handed to the model. Most of the quality in a retrieval-based feature lives here, and no vendor has your data.
- The verification layer. The checks that catch bad output before a user sees it. If the cost of a wrong answer is high, this is where you earn trust.
- The product surface. Latency, fallbacks, and what the feature does when the model is unsure. Default behavior makes your product feel like everyone else’s.
The pattern is consistent: buy the commodity intelligence, and build the thin layer that makes it yours and makes it trustworthy.
A worked example
Say you run a B2B invoicing product and want an assistant that drafts payment reminder emails.
- A wrong answer is an awkward email that a person reads before sending. The cost is low, so buy: use a hosted model, a short prompt and a template, and ship this week.
- Now say the same assistant is allowed to adjust payment terms or issue credits. A wrong answer moves money. Keep buying the model, and build the controls: a hard limit on amounts, a required approval for anything above it, a log of every action and the reason, and a test set of tricky customer messages you run before each prompt change.
Same model, same vendor, very different amount of engineering. The cost of being wrong set the build budget.
The trap: building for a scale you do not have
A common expensive mistake is optimizing for a future you have not reached. A team self-hosts models to save on API costs before it has the volume to justify that, then spends more on GPUs, on-call time and engineer salaries than the API would have cost for years.
Buy until the bill genuinely hurts. When a vendor line item becomes a measured, meaningful share of your costs, revisit the decision with real numbers. Until then, the API is cheaper than the engineer-hours.
Three questions to settle it
- Is this our differentiation, or plumbing? Plumbing gets bought.
- What does a wrong answer cost? High cost means building guardrails even when you buy the model.
- Do we have the scale to justify owning it? If not, rent now and revisit later.
Most features come out of this the same way: buy the model, build the layer around it. That configuration ships fastest and fails most gracefully, and you can change the vendor later without rewriting the part that matters.
Keep the exit open
Whatever you buy, plan for switching. Put the model call behind a thin interface in your own code, keep your prompts and test cases in version control, and record which model version produced which output. Models and prices change quickly. A team that can swap vendors in a day has more negotiating power than one that cannot.
Deciding what to build, buy or skip on an AI feature is something Twill Software helps teams work through before they commit months to the wrong path. The first consultation is free: get in touch.