Skip to content
EqualStack
AI & ML

Choosing an LLM for your product: quality, cost, speed and privacy

How to pick the right large language model for each feature in your product, balancing answer quality, cost, response time and data privacy.

EqualStack engineering teamSenior engineers3 min read

"Which model should we use?" is usually asked as if there were one answer. In practice, a product with several AI features often uses several models, each chosen for the job it does. New models arrive every few months, so the more useful question is: how do we choose, and how do we keep the choice easy to change?

The four things you are trading off

Quality

How often the model gets the task right for your users. This is task-specific: a model that writes excellent prose may be no better than a small one at classifying support tickets. Measure quality on your own examples, not on public leaderboards.

Cost

Most hosted models charge per token, separately for input and output. Long prompts, large retrieved documents and verbose answers add up quickly at scale. A feature used a million times a month needs a very different model from one used a hundred times.

Speed

Users notice waiting. Chat and autocomplete need fast first tokens and quick responses; overnight batch jobs do not care. Smaller models and streaming responses help where speed matters.

Privacy and control

Where does your data go, how long is it kept, and is it used for training? Regulated industries may need specific regions, contractual guarantees, or models you host yourself. Decide this first, because it narrows every other choice.

A practical way to choose

1. Split your product into tasks

List each AI task separately: classifying, extracting fields, answering questions from documents, summarising, drafting, reasoning over several steps. Each can use a different model.

2. Build a small evaluation set per task

Gather 100 to 300 real examples with the answers you expect. Include the awkward cases: ambiguous questions, messy documents, edge cases. This set is the most valuable AI asset you will build, because it lets you compare models objectively and switch with confidence later.

3. Start with a strong model, then step down

Get the task working well with a capable model first, so you know what "good" looks like. Then try smaller, cheaper and faster models against the same evaluation set. You will often find a small model is almost as good for classification and extraction, at a fraction of the cost.

4. Optimise the prompt and the context before the model

Clear instructions, good examples and well-chosen retrieved context often improve quality more than switching to a bigger model. Sending less irrelevant text also cuts cost and latency.

5. Check the privacy terms

For each provider, confirm data retention, training use, available regions and the contract terms you need. For sensitive data, consider open models hosted in your own cloud.

Hosted or open models?

  • Hosted models from the major providers are usually the quickest way to high quality, with no infrastructure to run. You pay per use and depend on the provider's terms and availability.
  • Open models you host yourself give more control over data, cost at high volume and customisation, at the price of running GPUs, scaling and updates.

Many teams start hosted, measure real usage, then move specific high-volume or sensitive tasks to open models where the numbers justify it.

Design so you can switch

Models improve and prices change. Protect yourself by:

  • Putting all model calls behind one small internal interface, so changing a model is a configuration change, not a rewrite.
  • Keeping prompts in version control alongside their evaluation sets.
  • Logging inputs, outputs, latency and cost per feature, so you can see the effect of each change.
  • Having a fallback model for when a provider is slow or down.

Keep costs predictable

  • Cache answers to repeated questions and reuse retrieved context where you can.
  • Cap the length of prompts and answers.
  • Set budgets and alerts per feature.
  • Route easy requests to small models and only hard ones to large models.

The short version

Choose per task, not per product. Decide your privacy needs first, measure quality on your own evaluation set, start strong and step down to cheaper models where the numbers allow, and keep model calls behind one interface so switching is easy.

For how we build retrieval-based assistants, read RAG in production: 7 lessons from shipping AI assistants, or see where AI pays off in a product. Planning an AI feature? Book a free 30-minute call.

Enjoyed this? Get a practical note twice a month.

Engineering lessons, case studies and guides like this one, from the senior team that wrote it.

No spam. Unsubscribe anytime.

Written by

EqualStack engineering team

Senior engineers

Written by the senior engineers who design, build and run our clients' products.

About us

Keep reading

Related articles

AI & ML3 min read

RAG in production: 7 lessons from shipping AI assistants

Retrieval-augmented generation is easy to demo and hard to run. Seven practical lessons on chunking, evaluation, access control and cost.

AI & ML3 min read

AI agents in production: when to use them and how to keep them safe

What AI agents are good at, when a simpler workflow beats them, and the guardrails that let an agent act in real systems without surprises.

AI & ML4 min read

Adding AI to your product: where it pays off and where it doesn't

A practical guide for product leaders: the AI use cases that reliably deliver value, the ones that disappoint, and how to ship an AI feature without the risk.

Have a project in mind?

Tell us what you're building. A senior engineer will reply within one business day with questions, ideas and next steps.