Back to Case Studies

Model Selection Benchmark for Quality, Latency, and Cost

·
A B2B SaaS company in the United States

Executive Summary

A model that works well in a prototype can become harder to justify as usage grows. GenAI Protos benchmarks the client's existing model against selected hosted and open-weight alternatives on one real business workload, using the same representative inputs and agreed operating requirements. The result is evidence-based guidance on whether to keep the current model, test an alternative, or revisit the application design.

01Problem Statement

The engineering team needs to know whether the model selected during prototyping remains suitable for sustained use. Public benchmarks provide useful context, but they do not show how a model handles the client's task mix, response-time requirements, or expected traffic. Comparing token prices alone also leaves out failed requests, retries, and infrastructure costs.

  • Which models meet the required task quality?
  • Where do they make errors that could affect business decisions?
  • How do response times change under expected load?
  • What does a successfully completed task cost?
  • Do the results hold on examples kept separate from development?

02Our Approach

We start by defining what a successful task looks like with the client's engineers and business reviewers, including acceptable outputs, the errors that matter most, and cases where the model should decline to answer. We assemble a representative test set covering routine requests, difficult inputs, and questions that cannot be answered from the available information. A separate holdout set stays unused during prompt development and configuration changes.

The current model provides the baseline. Selected alternatives run through the same evaluation harness, with shared baseline prompts, consistent scoring, matched concurrency levels, and agreed retry and timeout rules. Model versions, serving configurations, and any necessary differences are documented.

Cost calculations include failed attempts and retries. For open-weight models, we document hosting, utilisation, and operating-cost assumptions so self-hosted inference is never treated as free. We then map the quality, latency, and cost frontier: the options where improving one measure means accepting a trade-off elsewhere. Final candidates are checked against the hidden holdout before any recommendation is made.

  • Task success and high-risk error rates
  • Median and p95 end-to-end latency
  • Retries, timeouts, and throughput
  • Cost per successful task
  • Sensitivity to input length, task mix, and request volume
System Architecture & Flowclick to zoom
Architecture Overview
Architecture Overview
Architecture Overview

03Outcome

The outcome is a shortlist of models tied to the client's actual workload and operating limits. This gives the engineering team a basis for model selection and capacity planning. The findings may support a change, or show that the current model remains the most practical choice. Any savings or performance improvements come only from measured results.

  • A reusable benchmark with test cases, configurations, and evaluation code
  • A comparison of quality, latency, reliability, and cost
  • Examples of important failures and the conditions that trigger them
  • Holdout results and remaining uncertainties
  • A recommendation on which options warrant further testing and when to repeat the benchmark

04Tech Stack & Ecosystem

Key models, frameworks, and core infrastructure powering this solution.

Models compared

The client's current model as the baseline, against hosted API models (GPT, Claude and Gemini class) and open-weight models (Llama, Qwen and Mistral class).

Unified model access

LiteLLM. One interface for every model, so prompts, retries and timeouts stay identical.

Evaluation harness

Custom Python harness with shared prompts and consistent scoring. Reusable for future reruns.

Open-weight hosting

vLLM. Self-hosted serving, with GPU usage and operating cost written down so the cost comparison is fair.

Load testing

Locust. Matched concurrency to measure median and p95 latency, throughput, retries and timeouts under real traffic.

Tracing & cost tracking

Langfuse. Logs every call to calculate cost per successful task, not just token price.

Trade-off analysis

Pandas and Plotly to map where quality, latency and cost balance out.

05Client Testimonials

“We needed to know whether the model we chose for our prototype still made sense as usage grew. GenAI Protos compared alternatives on our actual requests, looking at response quality, latency under load, and cost including retries. Seeing the failure cases alongside the scores helped us understand the trade-offs.”
BS
Product & Engineering Team
B2B SaaS, United States

Is your AI model still the right choice at production scale?

Benchmark models on your workload for quality, latency under load, and cost per successful task.

Frequently asked questions

Benchmark candidates on representative product requests, including difficult cases. Compare task success, critical errors, p95 latency, and cost per successful task.

Test it at expected concurrency alongside alternatives. Measure p95 response time, throughput, retries, and timeouts under the same load.

Failed requests and retries increase the cost of a usable result. For open-weight models, GPU hosting and utilisation also affect total cost.

It depends on quality requirements, traffic, and operating costs. Evaluate both on the same requests and document the hosting assumptions.

Test finalists on a holdout set excluded from prompt development. Review consequential failures and record model versions and configurations before making a decision.