← All news

News / Learn / LLM fundamentals

How do you pick a model for your product?

You'll be able to choose a model for your product by testing it against your own tasks, cost, speed, and constraints.

A model is the engine that reads text and writes text back. Models differ in quality, speed, price, context size, and where they run. Picking one means matching those traits to what your product needs.

Model choice shapes your product's accuracy, response time, cost per user, and privacy posture. A model that wins a general test may fail on your specific task. Choosing well early saves rework later, and you can keep the choice open by designing your app so swapping models is cheap.

Start by writing down what the product must do. Name the task, the input size, the output format, and how fast the answer must arrive. Note your limits too: budget per request, data that cannot leave your servers, and languages you must support.

Next, shortlist a few candidates from different families. Include at least one closed hosted model and, if privacy or cost matters, one open-weights model you can run yourself. Public leaderboards are a starting point only. They measure general skill, not your task.

Then build a small evaluation set. Collect 30 to 100 real examples with clear expected results. Run each candidate on the same set with the same prompt, and score the outputs. Score correctness, format compliance, and failures such as made-up facts. Measure latency and cost per call on the same inputs.

Finally, compare the results against your requirements, not against each other. A slightly weaker model that is fast and cheap may be the right choice. Rerun the evaluation when providers update their models, when your prompts change, or when your data changes.

A small harness that runs one prompt against several models and records quality checks, latency, and cost inputs. The client call is a placeholder you replace with your provider's SDK.

import time

def call_model(model_name, prompt):
    # Replace with your provider's SDK call.
    # Return (text, input_tokens, output_tokens).
    raise NotImplementedError

cases = [
    {"input": "Order #1042 arrived broken", "must_contain": "refund"},
    {"input": "Where is my package?", "must_contain": "tracking"},
]

def run_eval(model_name, prompt_template):
    passed, latencies = 0, []
    for case in cases:
        prompt = prompt_template.format(text=case["input"])
        start = time.perf_counter()
        text, _, _ = call_model(model_name, prompt)
        latencies.append(time.perf_counter() - start)
        if case["must_contain"] in text.lower():
            passed += 1
    return {
        "model": model_name,
        "pass_rate": passed / len(cases),
        "avg_latency_s": sum(latencies) / len(latencies),
    }

# for m in ["model_a", "model_b"]:
#     print(run_eval(m, "Classify this support message: {text}"))

A short sketch to show the idea. Check the official docs of the tool you use.

  • Choosing by leaderboard rank alone Leaderboards test general skill. Run candidates on a set of your own real examples and score the results.
  • Ignoring latency and cost Measure response time and cost per request on your actual inputs. A strong answer that arrives too late or costs too much fails your users.
  • Testing with only a few easy examples Include messy, long, ambiguous, and adversarial inputs. Easy cases hide the failures that matter.
  • Hard-wiring one provider into the code Put model calls behind one small interface. That makes switching or routing to a second model a configuration change.
  • Treating the choice as permanent Models change over time. Keep your eval set, rerun it on a schedule, and re-check the choice when something changes.

Learn how to write a basic eval set with clear pass criteria, how LLM-as-a-judge scoring works and its limits, how model routing sends easy requests to cheaper models, and how open weights and self-hosting change cost and privacy trade-offs.

Should I always pick the biggest model?

No. Larger models often cost more and respond more slowly. Many tasks, such as classification or extraction, work well with smaller models. Test before you pay for size.

How many examples do I need in an eval set?

Start with 30 to 100 realistic cases that cover common and tricky inputs. Add more as you find failures in production.

Is an open-weights model always cheaper?

Not always. You pay for hardware, hosting, and engineering time. Compare total cost per request, including your own operations work.

What if two models score about the same?

Choose the faster or cheaper one, or the one with better data privacy terms and easier integration. Ties are a signal to decide on operational factors.

How often should I re-evaluate?

Rerun your eval when you change prompts, switch data sources, or when a provider changes the model you use. Many teams also run it on a regular schedule.

Written with AI by CapyLaunch. Spotted a mistake? Email hello@capylaunch.com.