Tech Abstractions
← Back to chapter

Workbook

Economics, Pricing, and Moats: exercises

Applied exercises from this chapter. Write your own answer first, then open “Expert thinking” under each exercise to compare your reasoning.

Advanced Applied Exercises

Exercise 1: The Volume Discount Decision

You run an agentic B2B SaaS product priced at $2.50 per completed workflow. Current state (month 8):

  • Monthly completions: 85,000 across 22 customers
  • Gross margin: 58%
  • Cost-to-serve per completion: $1.05 (inference: $0.38, tools: $0.12, retrieval: $0.08, human review: $0.31 at 14% escalation rate, CS allocation: $0.16)
  • Your three largest customers each generate 4,000–6,000 completions/month (combined: 45% of total volume)

All three large customers are in renewal conversations and asking for volume pricing: $1.80/completion above 3,000/month.

Your CFO notes that at $1.80/completion with a $1.05 cost-to-serve, you have 42% contribution margin: below your target. Your CTO argues that large customers generate better data for the flywheel. Your head of sales says losing even one large customer would require 6 new mid-market accounts to replace the ARR.

Model the decision. What do you offer, what conditions do you attach, and what's the minimum flywheel commitment you require from each large customer in exchange for the discount?

Expert thinkingShow

The $1.80 price at $1.05 cost-to-serve yields 42% contribution margin: below your 58% average, but not economically unsound. The CTO's flywheel argument is also valid. The question is how to structure the discount so it creates value for both sides rather than just reducing margin.

The right offer: tiered pricing with a data partnership condition.

Offer: $2.50/completion for completions 1–3,000/month; $1.95/completion for completions 3,001–6,000/month; $1.70/completion above 6,000/month.

The $1.95 mid-tier preserves 46% contribution margin (acceptable). The $1.70 top tier at 38% is loss-leader territory, but only kicks in above 6,000/month which only applies at high volume.

The condition: Volume pricing is contingent on a data partnership agreement: the customer agrees to (a) structured outcome labeling (which completions were accepted without modification vs. which required human correction), (b) monthly review sessions where they share failure patterns with your product team, and (c) permission to use anonymized completion traces for model improvement.

The business logic: Large customers at volume generate the highest-density training signal. The NVIDIA NVInfo example shows that a small set of real, categorized failure examples (495 negative samples) supported a fine-tuned router that held 96% accuracy at 10x smaller model size. Your large customers are generating that signal at scale. The question is whether you're capturing it. A data partnership agreement is worth 5–8 percentage points of contribution margin: it pays for the discount.

What to tell the CFO: "We're not giving away margin: we're trading margin points for the labeled data that enables model right-sizing. The fine-tuning we can run on 6 months of labeled data from these three accounts reduces our inference cost by 60–70% for the routine cases. That's a path from 58% to 68%+ gross margin at scale."

Self-assessment checklist:

  • Did you design a tiered structure rather than a flat discount?
  • Did you attach a data partnership condition that makes the discount economically rational?
  • Did you model the downstream cost reduction from the labeled data, not just the immediate margin impact?

Exercise 2: The Moat Audit

You're 12 months post-launch. The following is true about your product:

  • Resolution rate: 82%
  • Gross margin: 61%
  • Customers: 18 enterprise, 0 churn
  • Eval corpus: 2,400 labeled examples across 3 failure categories
  • Model: fine-tuned Llama 13B (outperforms GPT-4o-mini on your task distribution by 7%)
  • Connectors: Zendesk, Stripe, Salesforce
  • SOP library: 400 documented workflow procedures across 11 customer environments
  • Workflow position: agent is the default first-touch for inbound support tickets in Zendesk

An AI lab releases a general-purpose support agent as part of their enterprise tier, priced at $40/agent seat/month. Initial benchmarks show it performs at 76% resolution rate on generic support benchmarks.

Rate your moat strength against this entrant across each of the five moat layers. Where are you strong, where are you exposed, and what should you do in the next 90 days?

Expert thinkingShow

Moat layer assessment:

Workflow position: Strong. The agent is the default first-touch for inbound tickets in Zendesk. The competitor's agent requires the customer to reroute their ticket handling, which is an operational change that procurement will resist. This is your strongest defensive position in the short term.

Context advantage: Moderate. You have Zendesk + Stripe + Salesforce. The lab's agent likely has the same or similar connectors: large labs invest heavily in connector coverage. Your advantage is customer-specific context (organizational data that has flowed through your connectors for 12 months) rather than connector breadth. Defend this by ensuring customer-specific context is embedded in retrieval, not just available in principle.

Domain SOP capture: Strong. 400 documented workflow procedures across 11 customer environments is a meaningful corpus. The lab's generic agent does not have customer-specific SOPs. This is a real performance advantage for complex, exception-heavy tickets where following customer procedure matters.

Evaluation advantage: Moderate-strong. 2,400 labeled examples and a fine-tuned model that outperforms GPT-4o-mini by 7% on your task distribution is meaningful. The competitor starts at zero labeled examples for your specific task distribution. Your 7% performance advantage on real production queries vs. the competitor's 76% on generic benchmarks likely translates to a larger real-world performance gap. Quantify this.

Habit and spread: Early-stage. 0 churn after 12 months with 18 customers is positive but not yet "infrastructure." You need to get to the point where the product is embedded in the customer's team processes, not just in their tech stack.

90-day priorities:

  1. Get your resolution rate vs. the competitor's resolution rate measured on real customer query distributions, not generic benchmarks. The 82% vs. 76% comparison on real queries is your sales asset.
  2. Publish the SOP capture story to all 18 customers: make explicit that the 400 SOPs in your system are not available to a generic competitor, and ask each customer to document 20 more.
  3. Accelerate habit formation: add weekly usage summaries per team, resolution trend reporting, and proactive SOP gap identification. Make the product feel like infrastructure, not a vendor tool.

Self-assessment checklist:

  • Did you assess each moat layer separately rather than giving a single pass/fail?
  • Did you identify workflow position as your strongest immediate defensive layer?
  • Did you propose 90-day actions that strengthen the weakest layers (habit, context specificity)?

Exercise 3: The Pricing Reset

You're 6 months post-launch. Current state:

  • Pricing: $3,500/month flat fee for unlimited usage (effectively seat pricing for a team product)
  • 14 customers, MRR: $49,000
  • Gross margin: 44% (and declining: usage intensity is growing faster than projected)
  • Your 5 highest-usage customers consume 73% of your total inference cost

Your board wants you to move to outcome pricing before the Series A. Your head of sales has two objections: (1) "Customers hate variable pricing: we'll lose deals" and (2) "We don't have the instrumentation to track outcomes reliably."

Address both objections with a concrete plan, and design the specific pricing model you would transition to.

Expert thinkingShow

Both objections are real but solvable. The question is the order of operations.

Addressing objection 2 first (instrumentation): Objection 2 must be resolved before you can address objection 1 credibly. If you cannot track outcomes, you cannot price by them, and you cannot defend outcome-based pricing to a skeptical buyer.

The instrumentation required for outcome pricing is: (a) a binary session outcome signal, did this session produce a completed outcome, or did it escalate/fail? (b) outcome attribution, which tool calls or workflow steps constitute a "completion" vs. a "partial" vs. a "failure"? This is 3–4 weeks of engineering work for a product that is already tracking session state. If the product cannot answer "did this session resolve the issue?" it has a deeper observability gap that will affect quality improvement as well as pricing.

Addressing objection 1 (variable pricing perception): Customers don't hate variable pricing: they hate unpredictable bills. The solution is hybrid pricing with a cap.

Proposed pricing model: $1,200/month platform fee (predictable, covers base infra cost) + $1.80 per completed outcome above 200 completions/month + a monthly spend cap of $5,500 (protects against bill shock for high-volume months).

For your 14 existing customers: grandfather them at current pricing for 6 months with an opt-in to the new model. Incentivize migration: customers who migrate get the cap set at $4,500 for their first year on the new model.

What this does to your 5 high-usage customers: Currently they pay $3,500/month regardless of usage volume. Under the new model, a customer completing 2,500 outcomes/month pays: $1,200 + (2,300 × $1.80) = $1,200 + $4,140 = $5,340: capped at $5,500. Revenue increases; the cap protects the customer relationship.

What this does to gross margin: At 2,500 completions, your cost-to-serve is approximately: (2,500 × COGS per completion). If COGS per completion is $0.85 (current average at 44% margin on $3,500 with lower usage), contribution margin at $5,340 revenue = ($5,340 − 2,500 × $0.85) / $5,340 = ($5,340 − $2,125) / $5,340 = 60.2%. You hit the Bessemer threshold.

Self-assessment checklist:

  • Did you address the instrumentation objection before the pricing design?
  • Did you design a cap that addresses the "unpredictable bills" concern specifically?
  • Did you calculate the margin improvement at the specific usage levels in the problem?

Real-World Implementations

Implementation 1: Klarna's Unit Economics Architecture

Klarna reported in February 2024 that its AI assistant handled 2.3 million conversations in its first month, cut resolution time from 11 minutes to under 2 minutes, and was projected to add $40M in annual profit. These are company-reported figures. In 2025 Klarna's CEO said cost had been over-weighted and that the company was hiring human agents again, so treat the case as a lesson in measurement, not a settled success.

Design pattern (illustrative, not a documented Klarna decision): Score every AI conversation on a binary outcome (fully resolved without human escalation versus not), validate the scoring on a human-reviewed sample, and do this before finalizing pricing.

Expert commentary: This is the correct sequence: build outcome measurement, validate it, then design pricing around it. A profit estimate like Klarna's $40M requires a reliable measurement of resolved versus unresolved conversations; without it, the estimate is speculation, and quality problems can hide behind cost savings. Teams that design pricing before instrumentation are making the same error in reverse: they commit to an outcome pricing model and then discover they cannot track outcomes reliably once customer disputes begin.


Implementation 2: Intercom Fin's Margin Expansion Path

Intercom Fin is priced at $0.99 per resolution (on top of seat fees). Intercom has not published Fin's gross margin, so this section describes a common margin-improvement path as an illustration, not a documented Intercom history.

Illustrative architecture decision: Invest in tiered model routing early. Routine FAQ-style resolutions, which are often the majority of high-frequency ticket types, go to a smaller, faster model. Complex multi-turn resolutions that need reasoning about account state go to the frontier model. The goal is to hold the resolution rate while inference cost per resolution declines.

Expert commentary: This is the standard margin improvement path for any agentic product at scale: launch with frontier model, establish quality baseline, identify the subset of tasks where a smaller model meets the quality bar, route accordingly. The key insight is that model routing is not a quality tradeoff: it is a quality segmentation. The small model handles the tasks it handles well; the frontier model handles the cases that require it. A routing layer that correctly segments these two categories produces both lower cost and better quality than a single-model approach, because the frontier model's attention is concentrated on cases that genuinely need it.


Production Challenges

Challenge 1: The Margin Compression Mystery

It's month 10. Your gross margin has dropped from 61% at launch to 49% over the past three months. Revenue is up 40%. Customer count is up from 12 to 19. Nothing in the cost structure has obviously changed: same model, same tools, same pricing.

You have access to full per-session cost logs. Design a diagnostic process to identify the root cause.

Expert analysisShow

A margin compression from 61% to 49% on growing revenue with stable pricing means cost-to-serve per completion has increased. The question is which cost component grew and why.

Step 1, Segment cost by customer cohort. Break per-completion cost into your original 12 customers vs. the 7 new customers. If new customers have higher per-completion cost, the issue is onboarding, new customers have less SOP coverage, triggering more human escalations, or their system environments generate longer context windows.

Step 2: Segment cost by completion type. Has the distribution of ticket types changed? If new customers bring workflow types that were previously edge cases (and therefore more token-intensive), the average completion cost rises without any change to the underlying cost model.

Step 3: Check escalation rate trend. If human escalation rate increased from, say, 12% to 20% across the base, and human review cost is $1.50 per escalation, that alone explains roughly: (0.20 − 0.12) × $1.50 = $0.12 additional cost per completion amortized, which at 61% base margin and $2.50 pricing would account for approximately half the margin compression.

Step 4: Check model provider pricing changes. Foundation model providers have updated pricing (in both directions) with limited notice. A pricing change that increased input token cost by 30% on a high-input-token workflow would be immediately visible in per-session cost logs.

Step 5: Check context length trend. Has average context length per session increased? Context bloat from long conversation histories, accumulated tool call outputs, or verbose system prompts compounds with usage intensity. A 30% increase in average context length is a 30% increase in input token cost.

The most likely culprit is a combination of new customer onboarding (higher escalation rate until SOPs are fully loaded) and context length growth (accumulated conversation history not being actively compacted). Both are fixable: SOP loading is an onboarding process improvement; context compaction is an engineering change.


Challenge 2: The Flywheel Isn't Closing

You're 6 months post-launch. You have 28,000 completed sessions in your logs. Your ML lead reports: "We have plenty of data: we just can't use it." The data problems: 40% of sessions have no outcome label (they just ended without explicit resolution or escalation); session logs are stored as unstructured JSON blobs per session, not per tool-call step; human corrections from escalated sessions are stored in a separate CRM with no linkage to session IDs.

Design a 6-week remediation plan that produces a usable training corpus from existing data and prevents the same collection gaps going forward.

Expert analysisShow

This is a common state for products 6 months post-launch: rich usage data that cannot be used because the collection and labeling infrastructure was not designed with training in mind. Six weeks is enough time to fix it if the work is scoped correctly.

Week 1–2: Retroactive outcome labeling. For the 40% of sessions with no explicit outcome label, apply automated heuristics to classify them: (a) session ended with a "thank you" or positive acknowledgment pattern → resolved; (b) session was followed by a new session on the same topic within 24 hours → likely unresolved; (c) session had a tool call to a human escalation endpoint → escalated. These heuristics will be 80–85% accurate, not perfect, but sufficient for the majority of unlabeled sessions. Manually review a 200-session sample to validate heuristic accuracy.

Week 2–3: Session log restructuring. Parse existing unstructured JSON blobs into a structured schema: session_id, timestamp, tool_calls (array with step, tool_name, input_schema, output_schema, success), final_outcome, completion_type. This is a one-time transformation on the historical data and an ongoing ingestion format change. The historical transformation requires 1–2 engineers for a week; the ongoing schema change requires updating the logging service.

Week 3–4: CRM linkage. Escalated sessions in the CRM should have the session_id in the escalation record: add this field to the escalation creation API call going forward. For historical escalations, attempt linkage by customer_id + timestamp (session end time ≈ escalation creation time within a 5-minute window). This will recover 60–70% of historical escalation linkages.

Week 5–6: Training corpus assembly and quality validation. Assemble the structured corpus: sessions with confirmed outcomes (explicit or heuristic), tool call sequences, and human corrections from recovered escalations. Run a quality validation pass: 200 randomly sampled sessions reviewed by a domain expert to confirm labeling accuracy. Estimate: 28,000 sessions → 16,800 usable with outcome labels → 2,800 with human correction signal (the highest-value subset). Start the first fine-tuning run on the 2,800 correction examples.

Going forward: Add session outcome capture to the product UI as a first-class feature: a resolution confirmation step that takes 10 seconds and produces a labeled training example automatically. Every resolved session is labeled; every escalated session captures the escalation reason.


Interview-Style Reasoning Questions

Question 1

A VP of Finance challenges you: "Our gross margin is 54%. Our main competitor claims 71% gross margin. What do we do about this?" Walk through your diagnostic and your action plan.

Expert thinkingShow

Before accepting a competitor's claimed margin, pressure-test whether it is comparable. Then, if the gap is real, diagnose it systematically.

Is the comparison valid? Gross margin comparisons across AI companies are frequently misleading because companies include or exclude different costs. Does the competitor include human review cost in COGS? Do they include retrieval infrastructure? Do they include customer success allocation? A "71% gross margin" that excludes human review and CS overhead might be 58% on a comparable basis. Before acting on the gap, understand what is in each company's COGS definition.

If the gap is real, the diagnostic has three branches:

  1. Model cost: Are they using smaller, fine-tuned models for routine tasks while you use frontier models? At 54% margin with a high inference cost ratio, model right-sizing is the first lever. Fine-tuning a smaller model on your task distribution typically reduces inference cost by 60–80% for the routine case subset, which could move margins from 54% to 62–65%.

  2. Escalation rate: A higher human review rate is often the largest single cost driver outside model inference. If their escalation rate is 8% and yours is 18%, that gap alone explains 5–8 margin points depending on human review cost. Fix: better SOP coverage, improved confidence calibration, tighter workflow scope.

  3. Context efficiency: Longer average context windows at the same quality level mean higher inference cost per session. Context trimming and compaction can reduce input token cost by 30–50% with minimal quality impact.

Action plan: Measure all three, model right-sizing opportunity, escalation rate, context length, and rank by projected impact. Build a 90-day roadmap to close the gap through the highest-leverage intervention first. Avoid presenting margin improvement as a single initiative; it is a portfolio of incremental improvements across multiple cost components.


Question 2

An engineering lead proposes: "We should build our own vector database instead of paying $8,000/month for Pinecone. Over 24 months, we'd save $192,000." Evaluate this proposal.

Expert thinkingShow

This is a classic build-vs-buy decision that almost always has the same answer at early-stage: don't build.

The $192,000 savings calculation is missing the cost side. Building and maintaining a production-quality vector database is not a sprint. A minimal viable implementation, ingestion pipeline, approximate nearest-neighbor index, query latency optimization, replication, monitoring, and on-call responsibility, is 3–6 engineer-months to build and 0.5–1 engineer-months per month to maintain. At a blended engineering cost of $15,000–20,000/engineer-month: build cost = $60,000–120,000 upfront; maintenance = $7,500–10,000/month. Over 24 months: $240,000–360,000 total cost, vs. $192,000 for Pinecone. The build is more expensive, not less.

The opportunity cost is the larger issue. 3–6 engineer-months spent building vector database infrastructure is 3–6 engineer-months not spent on product differentiation: model routing, eval infrastructure, SOP capture, or flywheel tooling. These are the investments that compound into moat. Infrastructure is not moat; it is commodity.

When does building make sense? At very high scale (millions of daily queries where Pinecone's per-query pricing makes it materially more expensive than amortized infrastructure), or when the vector database requirements are so specific to your use case (custom distance functions, proprietary indexing) that no vendor product fits. Neither condition applies at $8,000/month.

The recommendation: Stay on Pinecone. Negotiate a volume commitment for a 15–20% discount. Redirect the engineering capacity to eval infrastructure, which has a direct impact on resolution rate, margins, and moat, not infrastructure that Pinecone already does well.


Question 3

Your board asks you to explain the data flywheel to a non-technical board member in 60 seconds. Then they ask: "How do we know it's actually working?" Give both answers.

Expert thinkingShow

60-second explanation for a non-technical board member:

"Every time our agent handles a task, we record exactly what happened, what the customer asked, what the agent did, whether it succeeded or needed a human to step in. We take the cases where a human had to fix something and use them as training examples for the next version of the agent. So every mistake the agent makes today becomes a lesson that makes it less likely to make the same mistake next month. It's like a feedback loop where the product gets better automatically the more it's used, but only if we deliberately close the loop, which most teams don't do."

How do we know it's working?

Four measurable indicators:

  1. Eval corpus growth rate: How many new labeled examples are being added to the training corpus per month? If this number is flat, the loop is not closing. Target: 200+ new labeled examples per month from production failures.

  2. Model performance on the golden set over time: Run the same fixed evaluation set against each successive model version. If the flywheel is working, accuracy on the golden set should trend upward. Regression is a signal that fine-tuning data quality has degraded.

  3. Inference cost per completion trend: If the flywheel enables routing to smaller fine-tuned models, per-completion inference cost should decline quarter-over-quarter. This is the economics proof point.

  4. Escalation rate trend: If the flywheel is improving the model on real failure cases, human escalation rate should decline. Flat or rising escalation rate means the flywheel data is not reaching the right failure categories.

Present these four numbers at each board meeting. The flywheel is working when all four trend in the right direction simultaneously.


Question 4

You're interviewing for a Head of AI Product role. The interviewer asks: "We have an agentic coding assistant with $2M ARR, 65% gross margin, and 0% churn over 8 months. We want to build a moat. Where would you invest the next $500K?" Walk through your answer.

Expert thinkingShow

65% gross margin and 0% churn are strong signals, but they are lagging indicators: they reflect the past 8 months, not the next 24. The question is which investment builds a lead that competitors cannot close in 12–18 months.

Evaluation corpus: $150K. This is the highest-leverage investment. Commission a structured labeling effort: for every pull request generated over the past 8 months, have a senior engineer label it across 5 dimensions (correctness, style conformance, test coverage, security, architectural appropriateness). 500 labeled PRs is enough to start fine-tuning. 2,000 labeled PRs across multiple language and framework environments is a competitive moat. Competitors cannot replicate this data without months of deployment and the same engineering labeling effort.

Model right-sizing infrastructure: $100K. Build the routing layer and fine-tuning pipeline that enables routing simple tasks (boilerplate generation, standard refactors) to a smaller model while reserving frontier models for complex reasoning tasks. This is 1–2 engineers for 6–8 weeks. Projected impact: reduce inference cost by 40–60% on the high-volume, low-complexity task distribution. Gross margin target: 72–75%.

Workflow position depth: $150K. Deepen the GitHub integration: add support for GitHub Actions (CI feedback → agent fix loop), GitHub Projects (task planning integration), and PR review comment resolution. The goal is to be present at every moment in the development workflow, not just issue-to-PR creation. Each new integration touch point is a distribution advantage that a new competitor cannot have on day one.

Behavioral drift monitoring: $100K. Build a production monitoring system that runs the eval corpus weekly against the current model. Flag any degradation from the baseline. This is the infrastructure that protects the 0% churn: customers experience degradation before you detect it without this system, and churn follows.

What I would not invest in yet: A second product line, a different workflow vertical, or sales headcount: until the moat in the core product is deeper.


Question 5

A potential enterprise customer says: "We're concerned about outcome-based pricing. If your agent resolves 90% of our tickets, our monthly bill becomes unpredictable because ticket volume varies." How do you respond, and what pricing structure do you offer?

Expert thinkingShow

The customer's concern is legitimate and should be addressed directly, not dismissed. "Unpredictable bills" is a procurement objection that kills deals regardless of product quality. The answer is a pricing structure that preserves outcome alignment while providing bill predictability.

Three-part pricing structure:

  1. Platform fee: $2,000/month (covers access, integration, SLA, and a baseline included resolution volume). This is the predictable floor: procurement can budget for it without usage projections.

  2. Included resolutions: 500 resolutions/month included in the platform fee. This covers baseline usage for lower-volume months with no variable charge.

  3. Variable component: $0.85/resolution above 500/month, with a monthly spend cap of $6,500. The cap is the key element: it converts "unpredictable" into "bounded." The maximum bill under this structure is $8,500/month regardless of ticket volume.

For the customer's specific concern (variable ticket volume): The cap means that if ticket volume spikes during peak periods, the bill does not spike proportionally. They pay at most $8,500 even if the agent handles 10,000 resolutions in a high-volume month. During low-volume months, the platform fee plus a small variable charge keeps the bill near the floor.

The business logic: At $0.85/resolution with a $1.05 cost-to-serve, resolutions above the cap threshold are slightly below cost, but the cap creates a volume ceiling that bounds the total exposure. The platform fee covers fixed costs. The variable component below the cap provides margin. This is the right commercial structure for a customer with variable volume and a CFO who needs budget predictability.