Business Value Pillars for an LLM System: Turn "Cheaper and Faster" Into Targets, Then Pick the Lane
"Make it cheaper and faster" is a wish, not a target. Give efficiency, cost and the performance SLA a number each, route chat and overnight work to different lanes, and score three plans against all three targets.
What you will learn
- Name the five business value pillars and give each one a measure
- Turn a vague wish into targets for efficiency, cost and the performance SLA
- Route each kind of work to a lane: direct call with a cached prefix, or a batch
- Score several plans against every target and reject a cheap plan that breaks the SLA
Before you start
- Basic Python
- Prompt caching basics
- Message Batches or real-time calls
A team lead sends you one line: Make it cheaper and faster. That sounds like a goal, but nobody can check it.
Look at the work behind it. Three chat questions, where a customer is waiting. Four overnight summaries, needed by morning, where nobody is waiting. Now the wish has holes. Cheaper than what? Faster for whom? Better by which measure? One wish, two kinds of work.
A business value pillar turns a wish like that into a number. In this article you give three pillars a target each, route the two kinds of work to different lanes, and score three plans against every target.
Courier, freight or a pre-packed box
Think of three ways to move a parcel:
- An express courier arrives today, at the standard price. The chat questions need that: a direct call.
- A freight shipment is cheaper, and arrives when it arrives. The overnight summaries can take that: a batch. The Claude docs price a batch at half the standard rate.
- A pre-packed box: you pack the stable part once and reuse it every time. Here, that's the policy book at the front of every prompt: a cached prefix.
You wouldn't send a pallet by courier, or a birthday gift by freight.
Every pillar needs a measure
There are five pillars. A pillar is a number with a target, set before the design:
| Pillar | Asks for | Example measure |
|---|---|---|
| Efficiency | Less effort per task | Requests handled without a human |
| Transformation | Something that wasn't possible before | Set per project |
| Productivity | More output per person | Set per project |
| Cost | Spend per outcome | Full-rate tokens per request |
| Performance SLAs | A promised level of service | Chat replies by a direct call |
Three of the five are scored in the run below. The other two get their measure the same way.
The targets in code
The project is a slice of SupportDesk. It runs against a stand-in: the Anthropic SDK on an httpx mock transport with scripted replies, a cache and a batch endpoint, so no API key is needed and the replies show the design, not a real model's quality. pillars.py is a small table of targets. They are scenario numbers; a real project takes them from the business:
"""A pillar becomes a number with a target before we design anything.
The targets are our own scenario data: percent of requests, or tokens."""
TARGETS = {
"efficiency": ("no human needed", ">=", 100),
"cost": ("full-rate tokens", "<=", 1100),
"performance": ("chat by direct call", ">=", 100),
}
def verdict(pillar, measured):
_what, op, target = TARGETS[pillar]
if op == ">=":
return "pass" if measured >= target else "FAIL"
return "pass" if measured <= target else "FAIL"
- Efficiency: every request handled without a human.
- Cost: at most 1,100 full-rate tokens per request.
- Performance SLA: every chat reply comes from a direct call, with no waiting for a batch.
The lanes in code
plan.py marks the stable policy book for caching and lets the SLA pick the lane:
"""Choose the lane from the SLA. Chat needs an answer now."""
from stand_in import MODEL
import policy_book
SYSTEM = [{"type": "text", "text": policy_book.TEXT,
"cache_control": {"type": "ephemeral"}}]
def user(q):
return {"role": "user", "content": q["text"]}
def lane(request):
return "direct" if request["sla"] == "now" else "batch"
def ask_now(request, client):
r = client.messages.create(model=MODEL, max_tokens=200, system=SYSTEM,
messages=[user(request)])
return r.content[0].text
def send_batch(requests, client):
return client.messages.batches.create(requests=[
{"custom_id": q["id"], "params": {"model": MODEL, "max_tokens": 200,
"system": SYSTEM, "messages": [user(q)]}}
for q in requests])
- The policy book never changes between requests, so it carries
cache_control. - If someone needs an answer now, the lane is direct; otherwise it's a batch.
ask_nowis one direct call with the cached policy book.send_batchsends all the waiting work as one batch.
Same work, two lanes
Two chat questions first, then the four summaries as one batch. From the recorded run:
chat C-1 full 2304 cached 0
chat C-2 full 13 cached 2290
batch in_progress 4 requests
The first chat question sends the policy book in full: 2,304 tokens, nothing in the cache yet. The second sends 13 full-rate tokens, and the policy book is read from the cache. The four summaries go out as one batch whose status is in_progress, because the results come later. These counts are the stand-in's size estimate (one token per four characters), not a bill. How caching changes cost and latency in a real call is in prompt caching: cost and latency.
One workload, three plans
run_all.py runs the same seven requests three ways and scores each against the targets. Its cost figure counts direct full-rate tokens plus batch tokens at half; cache reads bill at their own rate and are not counted in it. Here is the scoring function:
def score(name, fn):
stand_in.reset()
fn()
log = stand_in.LOG
full = sum(e["full"] for e in log if e["lane"] == "direct") + sum(e["full"] for e in log if e["lane"] == "batch") / 2
chat_direct = sum(1 for e in log if e["lane"] == "direct" and e["text"] in CHAT)
m = {"efficiency": 100 * len(log) // len(REQUESTS), "cost": round(full / len(REQUESTS)),
"performance": round(100 * chat_direct / len(CHAT))}
cells = " | ".join(f"{m[p]:>4} {pillars.verdict(p, m[p])}" for p in ("efficiency", "cost", "performance"))
print(f"{name:<14} {cells}")
And the scorecard it printed:
targets (our scenario)
efficiency no human needed >= 100
cost full-rate tokens <= 1100
performance chat by direct call >= 100
plan efficiency | cost | performance
one way 100 pass | 2287 FAIL | 100 pass
lanes by SLA 100 pass | 337 pass | 100 pass
batch for all 100 pass | 171 pass | 0 FAIL
- One way for all. Every request goes direct, with the policy book sent in full each time. Efficiency and performance pass, but cost fails at 2,287.
- Lanes by SLA. Chat goes direct with the cache, the backlog goes in a batch. All three pillars pass, at 337.
- Batch for all. The cheapest at 171, so cost passes. But the chat questions now wait for a batch, so the performance SLA fails at 0.
A cheap plan that breaks the SLA hasn't improved anything. For the batch-or-real-time choice on its own, see Claude Message Batches or real time.
The traps: three tempting answers
When a scenario names a pillar and asks for the design, three answers look attractive:
- Batch everything, because it's half price. That breaks the chat SLA.
- Make every request direct and fast. That pays for speed the backlog never needed.
- Pick the cheapest model, then see. With no target, you can't say it worked.
The architect's answer is pillar, target, lane: name the pillar that drives the design, give it a target, then match each kind of work to the cheapest lever its SLA allows.
Quick recap
| Step | What you do |
|---|---|
| Pillar | Efficiency, transformation, productivity, cost or SLAs |
| Target | A number, set before the design |
| Lane | The cheapest lever the SLA allows: cached direct call for "now", batch for "by morning" |
| Score | Every plan against every target, including the one you prefer |
The project files for this lesson are in the community, free to join.
Try it yourself
Add a fourth plan: chat goes direct but without the cache, and the summaries go in a batch. Before you run it, predict which pillar is at risk and whether it still fits under 1,100. Then tighten the cost target and see which plans survive.
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
Fallback Models for an LLM App: A Chain That Checks Region and Fit, Flags Degraded Answers and Gets Rehearsed
When the main model goes down, the backup has to be allowed to take the data, able to read the whole request and tested before the bad day. A simulated four-model chain for an EU customer: a 6,000-token request lands on mid-eu, flagged degraded; a 10,000-token request is served by nobody, on purpose.
Back Pressure for LLM Traffic: Bound the Queue, Give Chat Its Own Lane, Count Tokens, Cancel When the Caller Leaves
A bulk upload buries the chat. In a small simulation, one shared queue grows to 199 waiting and the middle chat answer takes 80.2 s. A bound plus a chat lane brings it to 0.35 s while 178 bulk jobs are told to retry in 10 s, and cancelling abandoned calls saves 21,000 wasted tokens.
Load Balancing LLM Traffic: Count the Work, Weigh the Prefix Cache, Check Real Health, Drain Before Deploys
Six GPU replicas, two at 95% and four at 30%: round robin counts requests, and requests aren't equal. In a small simulation, least outstanding requests cuts p95 from 6.52 s to 3.05 s, prefix affinity lifts cache hits to 95% but pushes p95 to 11.45 s, a real health check takes errors from 48 to 2, and draining cuts 0 answers instead of 4.
A Message Queue for Document Ingestion: At Least Once, Leases, an Idempotent Consumer and a Dead Letter Queue
A queue doesn't lose a document, but it can hand one out twice. In a small simulation, a worker crash makes document two go from 3 to 6 chunks and the index holds 11 when the documents hold 8. An idempotent consumer brings it back to 8 with the same two deliveries, and a limit of three tries moves a poison file to a dead letter queue.
