Building an AI Startup: Stack, Moats and Unit Economics
An AI startup is a software company with an extra variable that moves in both directions: capability is improving underneath you every quarter, and so is the competition that can now replicate last year's trick with an API call. That symmetry defines the strategy. Building on top of a fast-improving layer means you must treat model choice as a recurring decision rather than a founding commitment, and it means your moat has to live somewhere the model provider cannot reach — workflow depth, proprietary feedback data, distribution, or compliance posture. This lesson walks the technical decisions founders face in the first eighteen months: what to build, what to rent, how to price against inference cost, and which shortcuts become expensive at scale.
Is It Actually a Model Problem?
Plenty of products described as AI products are really workflow products with a text box attached. The useful test is to remove the language model for an afternoon and see what collapses. If the product still delivers value through structure, templates, integrations and human review, you have a durable application; the model is a component you can swap. If nothing survives, you are renting your entire value proposition, and every provider release becomes an existential event.
This distinction guides sequencing. Workflow-first products earn adoption on reliability and integration, then add generation where it removes drudgery. Model-first products must chase the state of the art continuously and re-benchmark whenever a new version ships. Neither is wrong, but the second path demands evaluation infrastructure from week one, because a silent capability change in a provider model is indistinguishable from a bug in your own code.
Build Versus Buy at Each Layer
Decisions compound, so make them layer by layer rather than as one global stance. The question at each rung is the same: does building this ourselves create advantage, or does it create maintenance?
| Layer | Rent when | Build when | Typical early choice |
|---|---|---|---|
| Frontier model | Quality matters and volume is uncertain | You need fine-tuned behavior no API offers | Rent, keep an adapter interface |
| Open weights serving | Volume justifies operations work | Data residency or cost demands it | Rent first, revisit at scale |
| Retrieval pipeline | Corpus is small and simple | Search quality is your product | Build the chunking, rent the index |
| Evaluation set | — | Always | Build immediately, it is your memory |
| Guardrails | Compliance is standard | Rules are domain-specific | Start managed, specialize later |
| Auth, billing, storage | Almost always | Rarely | Rent everything |
The evaluation set deserves emphasis because it is the one asset that pays for itself in every scenario. Fifty carefully labeled examples with expected answers tell you whether a new model version helps, whether a prompt change regressed something, and whether a competitor's benchmark claims map onto your task. Teams that skip it end up comparing models by vibes.
Where an AI Moat Actually Comes From
Model quality is not your moat; it is a shared input. Durable advantages in applied AI tend to come from four places, and honest founders can usually name which one they are pursuing.
First, proprietary feedback loops: every accepted suggestion, corrected output and downstream outcome becomes training signal competitors cannot buy. Second, workflow depth — the integrations, permissions, audit trails and edge cases that make switching costly after a product becomes load-bearing. Third, distribution: owning the customer relationship beats owning a clever prompt. Fourth, trust and compliance, which in regulated markets is a genuine barrier that takes quarters rather than weekends to clear.
def moat_score(product: dict) -> dict:
"""Rough founder self-assessment: 0 weak, 3 strong on each axis."""
axes = {
"feedback_data": product.get("labeled_outcomes_per_month", 0),
"integration_depth": product.get("systems_integrated", 0),
"distribution": product.get("owned_audience", 0),
"compliance": len(product.get("certifications", [])),
}
thresholds = {"feedback_data": (500, 5000), "integration_depth": (3, 10),
"distribution": (1000, 25000), "compliance": (1, 3)}
scores = {}
for axis, value in axes.items():
lo, hi = thresholds[axis]
scores[axis] = 3 if value >= hi else 2 if value >= lo else 1 if value > 0 else 0
return {"scores": scores, "total": sum(scores.values()),
"weakest": min(scores, key=scores.get)}
print(moat_score({"labeled_outcomes_per_month": 900, "systems_integrated": 2,
"owned_audience": 400, "certifications": []}))
A total of four with everything resting on prompt craft is a project, not a company. The score is crude on purpose: it forces the conversation toward the axis that is actually weak.
Unit Economics Before the Pitch Deck
Inference cost is a variable you control through product design, so model it early. A feature that summarizes a long document on every keystroke behaves very differently from one that runs on explicit request; a routing layer that sends routine traffic to a cheap model and reserves the expensive one for hard cases changes gross margin without changing what the customer sees.
from dataclasses import dataclass
@dataclass
class FeatureEconomics:
name: str
calls_per_user_day: float
input_tokens: int
output_tokens: int
cheap_price_in: float
cheap_price_out: float
smart_price_in: float
smart_price_out: float
smart_share: float = 0.15
users: int = 5000
price_per_user_month: float = 29.0
def monthly_cost(self) -> float:
days = 30
calls = self.calls_per_user_day * self.users * days
cheap_calls = calls * (1 - self.smart_share)
smart_calls = calls * self.smart_share
cheap = (cheap_calls * self.input_tokens / 1e6 * self.cheap_price_in
+ cheap_calls * self.output_tokens / 1e6 * self.cheap_price_out)
smart = (smart_calls * self.input_tokens / 1e6 * self.smart_price_in
+ smart_calls * self.output_tokens / 1e6 * self.smart_price_out)
return cheap + smart
def margin(self) -> float:
revenue = self.price_per_user_month * self.users
gross = revenue - self.monthly_cost()
return gross / revenue
summarize = FeatureEconomics("doc summary", 3, 6000, 600,
0.15, 0.60, 3.00, 12.00, smart_share=0.2)
copilot = FeatureEconomics("inline copilot", 40, 1200, 250,
0.15, 0.60, 3.00, 12.00, smart_share=0.05)
for feature in (summarize, copilot):
print(f"{feature.name:16s} cost ${feature.monthly_cost():,.0f}/mo "
f"margin {feature.margin():.0%}")
Two product patterns reliably rescue margin: truncating and caching context aggressively, and moving work off the synchronous path so users experience speed while batch jobs handle the expensive part. Pricing deserves the same scrutiny — charging per seat when costs scale with usage lets your heaviest customers become your least profitable ones, which is a problem that appears exactly when you have found product-market fit.
Shipping the MVP Without Cornering Yourself
The MVP should be deliberately boring: one provider behind a thin adapter, prompts stored as versioned files, structured outputs with validation, and a small evaluation set run on every change. That configuration lets you swap models in an afternoon and keeps the diffs small when an API degrades.
import json
import os
import time
from dataclasses import dataclass
@dataclass
class ModelResponse:
text: str
model: str
latency_ms: float
usage: dict
class ProviderAdapter:
"""One interface, several providers, automatic fallback."""
def __init__(self, chain):
self.chain = chain
self.prompts = self._load_prompts("prompts/v3")
@staticmethod
def _load_prompts(path):
with open(path, encoding="utf-8") as fh:
return json.load(fh)
def complete(self, task: str, **variables) -> ModelResponse:
template = self.prompts[task]
rendered = template["template"].format(**variables)
last_error = None
for provider in self.chain:
started = time.perf_counter()
try:
raw = provider.generate(rendered, schema=template["schema"])
parsed = json.loads(raw)
template["schema"].validate(parsed)
return ModelResponse(text=raw, model=provider.name,
latency_ms=(time.perf_counter() - started) * 1000,
usage=provider.last_usage)
except Exception as exc:
last_error = exc
continue
raise RuntimeError(f"all providers failed: {last_error}")
adapter = ProviderAdapter([fast_provider, frontier_provider])
The pieces worth keeping as you scale are the ones that are painful to add later: request tracing with prompt and model version attached, a feedback channel that captures user corrections, and idempotent handling so a retried request does not double-bill a customer.
How AI Startups Actually Fail
The failure patterns are remarkably consistent. A team ships a demo that works on the eighty percent of inputs it was designed around, discovers the long tail during onboarding, and burns trust before improving the pipeline. Another raises against a capability that a provider ships as a feature six months later. A third prices per usage that scaling makes unprofitable, or watches gross margin erode as customers push longer contexts. And plenty stall on the last mile of reliability, where ninety-five percent accuracy feels fine in a demo and unusable in a daily workflow.
The countermeasures are unglamorous: evaluate on your own labeled set continuously, keep prompts and model choice swappable, treat latency and error rate as product features, instrument corrections as training data, and design pricing that survives your own success. Founders who do these things tend to look boring in demos and durable in markets.
Common Mistakes
Hard-coding one provider's response format through the app
Fix: Wrap calls in a single adapter with structured validation and fallback
Skipping an evaluation set while iterating on prompts
Fix: Label fifty real cases in week one and run them on every change
Pricing per seat for a feature whose cost scales with usage
Fix: Model cost per user, then align pricing with the metric that drives it
Calling model quality the moat
Fix: Name the axis you are building: feedback data, workflow depth, distribution or compliance
Shipping without tracing prompt and model version
Fix: Attach both to every request so regressions are diagnosable
Key Takeaways
- Treat model choice as a recurring decision behind an adapter interface
- An evaluation set is the cheapest durable asset an AI startup can build
- Moats come from feedback loops, workflow depth, distribution and trust
- Gross margin is set by product design: caching, routing and truncation
- Most AI startups fail on the reliability tail, not on the happy path