Rana Maninder Singh
Lesson 3 of 8Choosing & Using AI Models

How to compare models: capability, context, speed, cost, privacy, licence

Lesson opener

In one line: Compare two models on six axes — capability, context window, speed, cost, privacy, licence — then pick the weakest axis that still meets the ticket.

Why it matters: A Mumbai ops team that picks "the smartest" model for a 12-word routing label pays for context and latency they never use.

Before this lesson: The model landscape.

Before you start

ResourceLink
PreviousThe model landscape
NextFree tiers vs paid vs API
Prerequisitesaim2
Time~50 minutes

What you will learn

By the end of this lesson you will be able to:

  1. Name the six compare axes without a vendor chart.
  2. Score each axis as meet / exceed / fail against a written ticket.
  3. Treat context window as "prompt + history + retrieved text + completion," not as a trophy number.
  4. Refuse a model that fails privacy or licence even if capability is high.
  5. Compute a weighted score only after hard gates pass.
  6. Leave brand names and list prices in the snapshot, not in the scorecard ids.

Six axes

AxisAskFail looks like
CapabilityDoes it do this job on a tiny gold set?Pretty prose, wrong label
ContextDo prompt + docs + reply fit?Silent truncation
SpeedIs time-to-first-token and total time OK?Queue at 11:00 IST
CostCan finance live with tokens × volume?Surprise invoice
PrivacyMay this data leave the VPC / country?PAN in a public region
LicenceMay we use it this way commercially?Hidden revenue cap

Capability without a gold set is a demo. Context without a token budget is a hope. Speed without a percentile is a vibe. Cost without volume is a tweet. Privacy and licence are gates: they are not averaged away.

WHY A weighted average that includes a failed privacy gate is how PAN numbers leave India.

WHEN Write the ticket's must-pass gates first. Only then score the rest.

Cost. Comparison itself is cheap if you use a 20-row gold set (aim6). Paying for a week of production traffic "to see" is not a comparison method.

Hard gates then a score

This course uses 0 / 1 / 2 on each scored axis (fail / meet / exceed) and blocks the row if a gate fails.

if privacy_fail or licence_fail:
    reject
else:
    score = sum(weights[axis] * points[axis])

Do not put a rupee figure or a model name in the function. Those change. The method does not.

Demo 1 — Gate then score

AXES = ("capability", "context", "speed", "cost")
GATES = ("privacy", "licence")

def compare_row(row: dict, weights: dict) -> str | float:
    for gate in GATES:
        if row.get(gate) == "fail":
            return "reject-gate"
    score = 0.0
    for axis in AXES:
        score += weights[axis] * int(row[axis])
    return score

weights = {"capability": 2.0, "context": 1.0, "speed": 1.0, "cost": 1.0}
a = {"capability": 2, "context": 1, "speed": 1, "cost": 2, "privacy": "meet", "licence": "meet"}
b = {"capability": 2, "context": 2, "speed": 2, "cost": 2, "privacy": "fail", "licence": "meet"}
print(compare_row(a, weights))
print(compare_row(b, weights))
assert compare_row(b, weights) == "reject-gate"

Expected output:

8.0
reject-gate

Demo 2 — Context fit

def context_fit(prompt_tok: int, docs_tok: int, reply_tok: int, window: int) -> str:
    need = prompt_tok + docs_tok + reply_tok
    if need > window:
        return "fail-window"
    if need > int(window * 0.8):
        return "tight"
    return "ok"

print(context_fit(800, 2000, 400, 4000))
print(context_fit(800, 2000, 400, 2800))
assert context_fit(100, 100, 100, 8000) == "ok"

Expected output:

ok
fail-window

Demo 3 — Pick the cheaper that still meets

def pick(rows: list[dict]) -> str:
    ok = [r for r in rows if r["gate"] == "pass" and r["capability"] >= 1]
    if not ok:
        return "none"
    return min(ok, key=lambda r: (r["cost_units"], -r["capability"]))["id"]

cands = [
    {"id": "chat-large", "gate": "pass", "capability": 2, "cost_units": 10},
    {"id": "chat-mid", "gate": "pass", "capability": 1, "cost_units": 3},
    {"id": "chat-public", "gate": "fail", "capability": 2, "cost_units": 1},
]
print(pick(cands))
assert pick(cands) == "chat-mid"

Expected output:

chat-mid

Guided practice: tight context

def context_fit(prompt_tok: int, docs_tok: int, reply_tok: int, window: int) -> str:
    need = prompt_tok + docs_tok + reply_tok
    if need > window:
        return "fail-window"
    if need > int(window * 0.8):
        return "tight"
    return "ok"

print(context_fit(3000, 500, 400, 4000))
assert context_fit(3000, 500, 400, 4000) == "tight"

Expected output:

tight

Independent practice: reject missing gate

Deliverable: compare_row returns reject-gate when licence is fail.

AXES = ("capability", "context", "speed", "cost")
GATES = ("privacy", "licence")

def compare_row(row: dict, weights: dict) -> str | float:
    for gate in GATES:
        if row.get(gate) == "fail":
            return "reject-gate"
    score = 0.0
    for axis in AXES:
        score += weights[axis] * int(row[axis])
    return score

weights = {"capability": 1.0, "context": 1.0, "speed": 1.0, "cost": 1.0}
row = {"capability": 2, "context": 2, "speed": 2, "cost": 2, "privacy": "meet", "licence": "fail"}
print(compare_row(row, weights))
assert compare_row(row, weights) == "reject-gate"

Expected output:

reject-gate

Common mistake

The deliberate mistake

Symptom: the bake-off slide is a screenshot of a public leaderboard.

Diagnosis: none of the six axes were scored on the team's tickets.

Correction: write gates, score a 20-row set, then pick.

Prevention: leaderboards are advertising. The ticket is the spec.

Snapshot — checked September 2026

Numbers below are catalog claims, not this course's scores.

Where this connects

What you can now do:

  • Gate on privacy and licence.
  • Fit a prompt into a window.
  • Pick the cheaper model that still meets capability.

Next lesson: Free tiers vs paid vs API. Three ways to pay — none of them is "the model is free."