Unit 4/Lesson 3 of 3

Quality, Cost & Latency Tradeoffs

Every AI product decision involves a tradeoff between output quality, cost per run, and response latency. There is no free lunch — understanding this triangle is what separates experienced AI PMs from beginners.

SkillsTradeoff analysisCost optimizationLatency vs. quality
+30 XP
✏️ On desktop — select text to ask Nobi, save notes, or add thoughts

The AI product tradeoff triangle

Every AI system exists in a tension between three constraints:

Quality — how good are the outputs? For IRIS, quality is depth and accuracy of SMB profile analysis. For Zylo, quality is personalization and reply rate. Quality typically increases with: larger models, more context, better prompts, and more sophisticated retrieval.

Cost — how much does each run cost? Cost increases with: larger models, more tokens (longer prompts + longer outputs), more tool calls, higher request frequency.

Latency — how fast does the agent respond? Latency increases with: larger models (slower inference), more context (longer input processing), more tool calls (each adds network latency), sequential pipeline steps.

The tradeoffs:
- Higher quality → higher cost, higher latency (larger models, more context)
- Lower latency → lower quality or lower context (smaller models, truncated context)
- Lower cost → lower quality or higher latency (smaller models, fewer tool calls, caching)

The PM's job: define the required quality floor, the maximum acceptable latency, and the target cost per run — then work with engineering to find an architecture that satisfies all three. When they can't all be satisfied simultaneously, make the explicit tradeoff decision and document it.

For BuzzBoard: a Zylo outreach draft might require <3 second latency (rep is waiting), high quality (customer-facing), and moderate cost ($0.02/draft). An IRIS deep analysis might tolerate 30-second latency (async batch job), require high quality, and target $0.05/analysis.

囲
Miaiみあい

Two equivalent options — if the opponent takes one, you take the other. Quality, cost, and latency are not miai: you can't have all three optimally. Choosing which two to optimize is the strategic move.

Cost optimization techniques

When cost is the binding constraint, these are the levers:

Prompt compression — reduce token count without losing critical information. Use a prompt optimizer (DSPy, PromptPerfect) to find shorter prompts that maintain output quality. A 2,000-token prompt that achieves the same results as a 4,000-token prompt halves input cost.

Caching — if the same or similar inputs recur, cache the outputs. IRIS doesn't need to re-analyze an SMB every hour if nothing has changed. Cache profiles with a TTL (time-to-live) matched to how frequently the underlying data changes. Semantic caching (embedding-based similarity matching) can cache near-identical inputs even when they're not byte-identical.

Model routing by task complexity — not every task needs the most capable model. Use a cheap, fast model (Haiku, GPT-4o-mini) for simple classification tasks (is this prospect worth enriching?) and reserve expensive models (Sonnet, GPT-4o) for complex generation tasks (multi-paragraph outreach drafting).

Batching — instead of processing prospects one at a time, batch them. Batch API pricing (OpenAI, Anthropic both offer batch endpoints) is typically 50% cheaper than real-time API pricing. Use for async workflows where latency isn't critical.

Output length control — explicitly constrain output length in your prompt ("respond in under 200 tokens"). Models have a tendency to verbosity; left unconstrained, they produce longer outputs than necessary. Output tokens are the most expensive.

Approximate retrieval — for RAG systems, expensive embedding search can be partially replaced with BM25 (keyword-based) retrieval for the first pass, using vector search only for the top candidates. Hybrid retrieval cuts retrieval cost while maintaining quality.

Latency optimization techniques

When latency is the binding constraint (a rep is waiting for a Zylo draft), these are the levers:

Streaming — start sending output to the user before the model is done generating. The first token appears in ~500ms; the full response appears over the next few seconds. Total time is the same but perceived latency is dramatically lower. This is the highest-impact latency fix for interactive features.

Pre-computation — don't compute at the moment of need; compute in advance. IRIS can analyze prospects during off-peak hours so that when a rep opens an account, the profile is instant. Ember can run account health checks overnight so morning risk alerts are ready at login.

Parallelization — if Zylo needs to draft outreach for 20 prospects and each draft is independent, run them all in parallel rather than sequentially. 20 × 2 seconds = 40 seconds sequential; parallel = 2 seconds.

Model selection for latency — smaller models are faster. Claude Haiku is ~3–5× faster than Claude Sonnet for the same input. If Haiku meets your quality bar, the latency gain is free.

Reduce round trips — each tool call in an agent adds a network round trip (100–500ms). Batch tool calls where possible; design prompts that minimize the number of calls needed to complete a task.

Right-size the context — don't pass the full IRIS research report to Zylo if Zylo only needs a 200-token summary. Shorter inputs process faster. Context trimming is both a cost optimization and a latency optimization.

Ask Nobiexplain

Select any text in the lesson to ask a question. Press Esc to close.

1 / 3

A rep reports that Zylo takes 12 seconds to generate an outreach draft, which breaks their workflow. Engineering says the model itself responds in 4 seconds but there are 3 sequential tool calls before the model runs. What's the highest-impact fix?