🏗️ Three calls, not two

Most PMs walk into a build-vs-buy meeting with a binary in their head: build it, or buy it. AI is sneakier. There's a third option called lease — you don't own the thing, you don't write it either, you rent its output by the token. That's how every team uses GPT, Claude, or Gemini. It feels like buying. It is not.

The three calls show up at every layer of the AI stack, and they trade off differently. Buy is fast and shallow — somebody else's product becomes a feature inside yours. Build is slow and defensible — you own the code, the data, and the surprises. Lease is in between — fast, metered, and quietly conditional on the vendor's roadmap, pricing, and uptime. Pick wrong at any layer and you either ship late, run out of cash, or wake up six months later locked into a contract you can't escape.

This lesson gives you a per-layer framework. We'll walk through the five layers — UX, orchestration, model, data, evals — and for each one we'll name the default call and the conditions under which you flip it. Then we'll follow Vivek at VidyaPath into a real build-vs-buy meeting where four of these calls land on his table at once.

The one line to remember:
buy the commodity, build the moat, lease the model. A PM who can defend each call layer by layer is the one engineering listens to.

🧱 The five-layer stack — with the default call on each

Same stack you've seen since lesson 01. The new thing here is the badge on the right of each layer: the default call most teams should make on day one. Defaults are not laws — every default has a flip condition, which we'll list in the deep-dive table. But if you can't justify a deviation from the default, take the default.

5
UX — how the user meets the AI Buy first
Off-the-shelf chat widgets, citation components, streaming markdown — commodity. Build only the parts unique to your product.
4
Orchestration — prompt + retrieval + tools Build
Your prompt logic, your retrieval shape, your tool wiring is your taste. Vendors abstract this badly. Own it.
3
Model — the reasoning engine Lease
You rent intelligence by the token. Self-hosting open-source is a build call — only do it when economics, latency, or sovereignty force the issue.
2
Data — what the model sees Build
Your moat. Buy a vector DB (commodity), but the corpus, labels, feedback loop and golden set are yours. Always.
1
Evals & ops — did it actually work? Buy first
Eval platforms, tracing, observability — commodity. The rubric and golden set stay yours, but the harness is rentable.
Reading the calls together:
the cheap layers (UX, evals harness) are buy. The boring infra (vector DB, tracing) is buy. The expensive but commoditised brain (the LLM) is lease. The two layers where your product actually has identity — orchestration logic and your data — are build. That's the entire framework on one slide.

🎯 The buy-vs-build heuristic, layer by layer

One trait card per layer. Each names the default call and the single line you should be able to recite when somebody on the leadership team asks "why are we paying for that?" or "why are we building that?".

🖼️
Layer 5 · UX — buy first
Buy chat widgets, streaming components, code-syntax renderers, citation chips. Build only the parts that are part of your product's identity (e.g. the doubts-solver's whiteboard mode). Off-the-shelf components ship in days; brand-shaping ones take quarters.
🧩
Layer 4 · Orchestration — build
Build your system prompt, refusal rules, retrieval logic, routing, tool wiring. Vendors selling "agentic frameworks" optimise for demos, not your three weird edge cases. The day you flip on a leadership review, you'll wish you owned the prompt.
🧠
Layer 3 · Model — lease
Lease from a frontier vendor (OpenAI, Anthropic, Google) until one of three things forces a flip: unit economics break, latency floor is unreachable, or data sovereignty/regulation requires on-prem. Then evaluate self-hosted open-source — that's a build call.
🗂️
Layer 2 · Data — build
Buy the vector DB, the embedding model, the search infra. Build the corpus, the labels, the golden set, the feedback loop. The first list is rent. The second list is your moat. Confusing the two is how teams hand competitors a head start.
📏
Layer 1 · Evals — buy harness, build rubric
Buy the eval platform (the harness, dashboards, traces, regression alerts). Build the rubric, the golden set, the launch gate. The harness is plumbing. The rubric is judgement — your judgement is what makes the eval worth running.
PM heuristic: if the layer is where users notice the difference (your data, your prompt taste, your refusal style), build. If the layer is where users don't notice the difference (vector DB, eval harness, chat-bubble component), buy. The model is the unusual case — users do notice, but you can't realistically build it from scratch — hence lease.

🇮🇳 Scenario — VidyaPath Bangalore, the doubts-solver build-vs-buy meeting

📚
Real-world scenario
PM Vivek has 5 days to walk into a build-vs-buy meeting with four AI stack decisions queued up — and a CFO who wants the cheapest answer that doesn't kill quality.

Vivek runs the doubts-solver feature at VidyaPath in Bangalore. A student photographs a maths problem; the AI explains the solution step by step, in the student's language, in under three seconds. The feature has 180,000 daily active users on a 10-week growth plan, and the CFO has flagged that AI cost per session has crept from ₹0.6 to ₹1.4 since they doubled the context window.

On Friday at 4pm, Vivek has a build-vs-buy meeting on the calendar with engineering, finance, and the CTO. Four decisions are on the table at once. (1) Model — keep leasing OpenAI, or self-host an open-source model on GPU instances they already pay for? (2) Eval platform — pay $24,000/year for a hosted eval vendor, or build an in-house harness on top of their existing test infra? (3) Retrieval — pay for a managed vector DB, or use the Postgres pgvector extension their backend team already runs? (4) UX — license a chat SDK with citations and streaming for $8,000/year, or have the design team build a custom one?

Five days, four decisions, three calls per layer (buy, build, lease) — twelve possible answers. Vivek needs the framework. The framework is the rest of this lesson.

🧮 The framework in one table — and on a 2×2

Three columns: what does buy mean for each layer, what does build mean, and what's the flip condition. If the answer is "the flip condition fires", deviate from the default. Otherwise, take the default and move on.

Layer Buy means Build means When to switch
5 · UX License a chat SDK (streaming, markdown, citations, code blocks). $5–15k/year. Live in a sprint. Design and ship your own chat UI, citation chips, refusal renderer, undo affordances. Switch to build when the SDK can't render your product's signature interaction (e.g. a step-by-step maths whiteboard, an inline code-diff). Build only that piece — keep buying the rest.
4 · Orchestration Use a vendor "agent platform" or no-code prompt builder. They host the system prompt, tool calls, retrieval routing. Write your own prompt, your own retrieval logic, your own routing — in code, in your repo, version-controlled. Default is build. Only buy if you're shipping a prototype this week and will rewrite it. Vendor abstractions almost always lose to in-house code by month four.
3 · Model Lease from OpenAI / Anthropic / Google by the token. Pay per million input + output tokens. Self-host an open-source model (Llama, Mistral, Qwen) on your own GPUs or a fixed-rate inference provider. Switch to build when (a) token spend > ₹40 lakh/month and self-host pays back in <6 months, (b) latency floor is <800ms and the API can't hit it, or (c) regulation forces on-prem.
2 · Data Buy infrastructure — vector DB, embedding API, OCR, search. Your CSV is licensed from a public dataset. Build the corpus, the taxonomy, the labelling pipeline, the golden set, the feedback loop. Own every row. Default is build. The only "buy" you should ever do at this layer is infra (vector DB, embeddings). Never buy the data itself for a defensible product — your competitor can buy the same CSV.
1 · Evals & ops Buy a hosted eval/observability platform. They give you the harness, traces, dashboards, regression alerts. Build the harness in your CI on top of pytest + a logging table. Roll your own dashboard. Switch to build when the vendor's pricing tilts unit economics, when your traces contain regulated data the vendor can't see, or when you've outgrown their rubric model. Until then, buy.

Plotted on strategic value vs commodity

Same five layers, on a 2×2. The Y-axis is strategic value — how much does this layer differentiate your product? The X-axis is commodity — how easy is it for any team to get the same thing off-the-shelf? The quadrant names the call.

↑ High strategic value Low strategic value ↓ Bespoke Commodity → BUILD Layer 4 · Orchestration Layer 2 · Data (corpus + labels) LEASE Layer 3 · Model high value, fully commoditised CUSTOM-IF-WORTH-IT Layer 5 · UX (the signature bits) build only what brand demands BUY Layer 5 · UX (chat widgets) Layer 1 · Eval harness · Vector DB
The diagonal rule:
the closer a layer sits to the top-left (high strategic value, bespoke), the more you must build. The closer to the bottom-right (low value, commodity), the more you must buy. The model is the one weird outlier — top-right, high value but commoditised — and that's exactly why "lease" exists as a third option.

Decision flow for one layer — the model call

Vivek's hardest single call in the meeting. Here's the flow he should walk through. Three checks; if any answers "yes", consider self-hosting. If all three answer "no", keep leasing.

Start: leasing OpenAI should we self-host instead? Q1 · Token spend > ₹40L/mo? and pays back in <6 mo? YES NO Q2 · Latency floor < 800ms? and API can't hit it? YES NO Q3 · Regulation forces on-prem? data sovereignty / DPDP YES NO Self-host build call open-source LLM Keep leasing default · cheapest path to a working product
Vivek's call on the model: token spend is currently ₹76 lakh/month — Q1 fires a YES. But payback math on three H100 GPUs plus DevOps headcount is ~9 months on his current scale, so the YES is borderline. Latency is fine (Q2 NO). No regulatory on-prem requirement (Q3 NO). Recommendation: stay on lease for now, set a re-evaluation trigger at ₹1.2 crore/month spend and revisit then. That's a defensible answer in a CFO meeting.

🔌 The AI connection

How real AI teams actually decide this

Inside frontier-product teams the build-vs-buy review happens at every quarterly planning cycle, layer by layer. A common pattern: lease the model, buy the eval harness, buy the vector DB, build the orchestration in code, build the data pipeline. The teams that get bought (or that build a real moat) are almost always the ones with a strong Layer 2 build — proprietary corpus, labels, feedback loop — not the ones with a clever Layer 4. The ones that get crushed are the ones who built their own model when they should have leased, or bought their orchestration from a vendor when they should have built. commoditymoatlease-vs-buyflip-condition

🛠️ Mini challenge — make four calls in 20 minutes

Pick one AI feature in your company (or NaijaCart's product search if you don't have one)

1. Map the five layers

For each of the five layers, write one line: what is currently in production for that layer, and is it bought, built, or leased? You'll find one or two layers where nobody can answer cleanly. That's the layer where the build-vs-buy call is overdue.

2. Pick the layer that's wrong

Of the five, one will look obviously off. Maybe you're building chat UI from scratch (Layer 5 — should be buy). Maybe you bought an "AI agent platform" that owns your prompt (Layer 4 — should be build). Write the flip recommendation and the one number that justifies it (cost, time, or risk).

3. Defend it on one slide

Imagine you're presenting to the CFO. One slide: current call, recommended call, the dollar (or rupee) impact, and the flip condition that would change the recommendation back. If you can't fit it on one slide, the case isn't ready.

💼 Interview questions

Easy Across the 5-layer AI stack, what's the default call on each layer?
+
Layer 5 (UX) — buy first, build only the signature bits. Layer 4 (Orchestration) — build. Layer 3 (Model) — lease from a frontier vendor. Layer 2 (Data) — buy the infra (vector DB, embeddings), build the corpus, labels, and feedback loop. Layer 1 (Evals & ops) — buy the harness, build the rubric and golden set. Memorable shape: buy · build · lease · build · buy.
Easy What's "lease" — vs buy vs build — for an AI feature?
+
Buy = pay a vendor a flat or seat-based fee for software you install or integrate (e.g. a chat SDK, an eval platform, a vector DB). Build = your engineers write and own the code, in your repo, on your infra. Lease = you pay per usage (per token, per call) for capability the vendor hosts and never gives you the source for. The model is the canonical lease — you don't own GPT-4o, you don't run it, you rent its tokens. The risk profile is different: lease bills scale linearly with success, lease pricing can change overnight, and lease contracts can be terminated by the vendor for terms-of-service reasons. PMs who treat "lease" like "buy" get burned at the next renewal.
Medium When does buying (or leasing) the model lock you in?
+
Three lock-ins to watch. Prompt drift — every prompt is tuned to one model's quirks; switching means rewriting and re-evaling every prompt. Mitigate by keeping prompts minimal and golden sets portable. Feature lock-in — you ship a feature that depends on a vendor-only capability (function calling shape, vision input, 1M-token context). Mitigate by gating features behind a thin abstraction in Layer 4. Pricing lock-in — the vendor's per-token price changes mid-contract or a competitor halves theirs. Mitigate by running your evals on at least two vendors quarterly so you have a real switch option. The one mitigation that beats all three: own Layer 1 (evals). If you can re-evaluate any model on your golden set in 30 minutes, you're never locked in.
Medium A vendor sells you an "AI agent platform" that owns your prompt and tools. What's the danger?
+
You've sold your Layer 4 — the layer that's supposed to be your moat — to a vendor. Three concrete dangers. (1) Iteration speed drops; every prompt change goes through a vendor UI instead of a pull request. (2) Debug visibility drops; when a bad answer comes in, you can't see the full context the model received. (3) Switching cost compounds; the longer you build inside the vendor's abstraction, the harder it is to leave. The healthy version: use the vendor for your first prototype (week 1), then port it to in-house code by the second iteration. If you don't, by month four the vendor effectively co-owns your product.
Hard A vendor wants to acquire your AI feature company. They argue "just use our model directly". How do you respond?
+
This is a classic "absorb the orchestration layer" play. The pitch sounds reasonable: their model is great, you'd remove a hop, costs go down. The honest response has three parts. One — name what you actually own. Your value isn't the model (theirs); it's the prompt taste, the retrieval logic, the refusals tuned to your domain, the corpus, the labels, the golden set, and the feedback loop. Their pitch erases all of that and replaces it with their default chat product. Two — name what they're really buying. If they're offering acquisition prices, they want your distribution and your data. "Just use our model directly" is the ask that reveals the offer is undervalued — they want the moat for free. Three — name the lock-in. The day you accept "use our model directly" you've lost vendor optionality, your prompt portability, and your ability to switch when their pricing changes. Counter-offer: keep leasing the model, keep your Layer 4 in-house, charge them a partnership fee for distribution if they want it. If they decline, the acquisition pitch was never about partnership — it was about absorbing a competitor.

🧪 Test your knowledge

Question 1 of 5
Across the 5-layer AI stack, which layer's default call is "lease"?
Question 2 of 5
Vivek's eval-platform decision — $24k/year hosted vendor, or in-house harness. Which default does the framework recommend?
Question 3 of 5
Which condition would justify flipping from leasing the model to self-hosting an open-source one?
Question 4 of 5
A vendor sells an "agent platform" that hosts your system prompt, tools and refusals. Default PM call?
Question 5 of 5
For the data layer, which split does the framework recommend?
0
/5
You make build-vs-buy calls layer by layer.

⚠️ Common mistakes

Treating lease like buy
Token-priced model APIs scale linearly with success. PMs who treat them like a flat SaaS line miss when unit economics quietly invert at 3x scale.
Buying the orchestration layer
Vendor "agent platforms" host your prompt, tools, refusals — and slow your iteration loop. By month four you'll wish you owned the prompt in your repo.
Building the chat UI from scratch
A six-week designer-engineer effort to ship streaming, citations, and code blocks — when a $10k SDK does it in a sprint. Buy the commodity. Save the hours for the moat.
Letting a vendor train on your data
A "free tier" that uses your inputs as training data is selling your moat for credits. Read the data clause first; the price tag is never the only cost.

🌟 Key takeaways

  • Three calls, not two: buy · build · lease. Lease is metered, conditional, and not the same as buy.
  • The layer-by-layer default is buy · build · lease · build · buy — UX, Orchestration, Model, Data, Evals.
  • Build the layers where users notice the difference (your prompt, your data). Buy the ones where they don't (chat widgets, vector DB, eval harness).
  • Switch off "lease the model" only when token spend, latency floor, or regulation forces it — not because of a benchmark blog post.
  • Owning Layer 1 (evals) is what protects you from every other lock-in. If you can re-evaluate any vendor in 30 minutes, you're never locked in.
Africa & India's Best AI Academy
🤖 AI-first 🎓 Placement Assistance

You now make build-vs-buy calls layer by layer.
Next — put it all together in a capstone.

Join the Best AI Program: The AI-Era Agentic Engineer — 5 months, fully online, with placement assistance. Week 1 is free.

Explore The AI-Era Agentic Engineer →