L4 · 06 · AI-Native Architecture & Build vs Buy

Adding AI to a product isn't like adding a normal feature: outputs are probabilistic, costs scale per call, the ground shifts under you monthly, and "it worked in the demo" is not an SLA. This page is the architecture-level view: designing AI-native systems, deciding what to build vs. buy, structuring a platform team, and reasoning about reliability and cost at the system level.

Level 455 minTracks 3, 8, 19

By the end of this page you can

Why AI-native is different

Classic softwareAI-native software
Deterministic: same input, same outputProbabilistic: plausible-but-wrong is a normal outcome
Bugs are code errorsFailures are silent: a bad answer, not an exception
Unit tests prove correctnessEvals measure quality on a distribution
Cost scales with users (roughly flat/request)Cost scales per call with tokens — context length matters
Dependencies are stable APIsThe model under you updates silently
The central design consequence You can't prove an LLM feature correct; you can only bound its error rate. So AI-native architecture is architecture for uncertainty: evals as the test suite, guardrails as the type system, fallbacks as the error handler.

The reference architecture

Product(app / agent) AI gateway routing, auth, budgets guardrails, cache, fallback tracing, evals hooks hosted frontier model cheap/fast model local / self-hosted Platform observability eval store, dashboards policy, audit log

The gateway is the key idea: one place where every LLM call passes through. Routing, budgets, guardrails, caching, tracing and fallback live there — not scattered across features. It gives you a single point to change models, enforce policy and observe cost, and it lets product teams use AI without each one reinventing the plumbing.

Build vs buy, at three levels

LevelBuy (API / platform)Build (self-host / own)
ModelDefault for most teams: frontier quality, zero opsWhen: data residency, volume cost, offline, custom fine-tune at scale
Serving/frameworkManaged platforms get you running fastWhen you outgrow their limits or need control (your own gateway, vLLM)
Feature (e.g. support bot)SaaS copilots for generic needsWhen it's your differentiator or needs your data/tools
Build vs buy drifts The answer changes over time. SaaS copilots add features; open models catch up; your volume grows until self-hosting wins on cost. Re-evaluate yearly — and design so a model is swappable behind the gateway, so "buy" never becomes "stuck with".

Designing for probabilistic output

The platform team pattern

As AI adoption grows inside a company, the winning structure is a small platform team that owns the gateway, eval infrastructure, observability and approved model list — while product teams build features on top. This is the same shape as internal developer platforms, with the same benefits (consistency, safety, speed) and the same risk (the platform becomes a bottleneck if it's mandatory and slow).

Cost and reliability at the system level

Try it (60 min)
  1. Sketch your own system's AI gateway: routing, budgets, guardrails, tracing, fallback. What would each feature need?
  2. Do the build-vs-buy table for one real feature you know (support bot, code review, search). Which cells change in a year?
  3. Write a cost model for a feature: tokens/call × calls/day × price. Where does it break at 10× usage?

Key takeaways