A Practical Playbook for Comparing LLMs Before You Ship a Feature
Picking a model for a new feature (summaries, classification, support drafts) is usually a comparison problem. Here's a lightweight playbook that keeps the comparison fair, cheap and safe. 1. Build a fixed eval
Picking a model for a new feature (summaries, classification, support drafts) is usually a comparison problem. Here's a lightweight playbook that keeps the comparison fair, cheap and safe.
1. Build a fixed eval set first
30โ100 realistic inputs, plus a note on what a good output looks like for each. Use synthetic or anonymised data. Every model gets the same inputs, so you're not comparing vibes from a few manual prompts.
2. Abstract the provider
def generate(model: str, messages: list[dict], **params) -> dict:
# one place to call the API, log latency, tokens and errors
...
With a single entry point, swapping models is a config change. Log the same fields (model, latency, input/output tokens, status) for every call so results are comparable.
3. Isolate experiments with a dedicated key
Eval scripts loop and retry. Use a separate key with a small token budget, a rate limit and an allowed-model list, then freeze or revoke it when finished. Never point experiments at the production key.
4. Make retries idempotent
If your client retries on timeouts, send an idempotency key (where your provider or gateway supports it) so a retry doesn't become a second billed request.
5. Score on more than quality
| Metric | Why it matters |
|---|---|
| Format accuracy | Broken JSON breaks your pipeline |
| Latency at typical input size | UX and timeouts |
| Tokens per request | Your real cost driver |
Decide per task: a smaller model may be enough for tagging, while long-form generation may justify a larger one.
5b. Automate the scoring
Keep a tiny script that runs the eval set against a model name and writes one row per input: model, latency_ms, input_tokens, output_tokens, valid_format (bool), and a pass/fail or score from your rubric. Commit the eval set and the script to the repo so the comparison can be rerun whenever a new model version appears, instead of being a one-off spreadsheet.
6. Keep security on during tests
Show key secrets once and store only a hash, use IP allowlists where available, and don't persist prompts you don't need.
Tooling note
We build OROO Blue, a secure AI gateway for Indian teams: one API and one OROO key for OpenAI, Google and Anthropic models (oroo-chatgpt, oroo-gemini, oroo-claude), per-key model/token/rate limits, idempotency keys, a prepaid INR wallet, and no storage of prompts or completions. The playbook above works with any setup, though.
Full article with checklist: https://orookids.blogspot.com/2026/11/one-key-three-model-families-how-to.html ยท OROO Blue: https://orooblue.com
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.