How to Choose the Right LLM for a Business Task
DEV Community

How to Choose the Right LLM for a Business Task

Generative AI is now cheap enough for almost any business to use, but picking one of the large language models (LLMs) on offer is harder than it looks.

To choose an LLM for a narrow business task, build a small test set from your own data, run two or three models on it, and compare accuracy, output format, cost at full volume and reliability. Leaderboards and benchmark comparison charts help you choose the best candidates for a shortlist. They can't tell you which model does your job best, and the right LLM for your use case is rarely the one at the top of the chart.

I learned this building the AI side of DiscountReactor, a coupon and deals site, including the AI agent that searches retailers for new discounts every day. Our task is narrow, and common in e-commerce: read messy retail promotions and turn them into clean data a shopper can trust.

What counts as a narrow business task?

A narrow task has a fixed input, a fixed output and an easy way to tell when the answer is wrong. Ours looks like this:

Input: promotion banners, sale pages, terms and conditions, newsletters. Output: the code, the discount, the minimum spend, the expiry date and any exclusions. Failure: a shopper tries the code at checkout and it doesn't work.

Most LLM use cases in a small business are like this. Summarising support tickets, tagging products, extracting invoice fields and drafting product descriptions all have a clear "right answer". That's good news, because it means you can measure.

It also means you rarely need a general chatbot. You need a language model that does one job well.

Why can't you rely on public benchmarks?

Public benchmarks measure general skills such as reasoning, maths or coding. Your business measures one small thing, on your own messy data.

An LLM comparison table might show model A beating model B by a few points. A model that leads on coding or maths may be average at reading retail terms in natural language. Extraction like ours used to need custom natural language processing rules. Now the right model can do it from a short prompt.

On your task, B may still win, because it handles your edge cases better or follows your format more reliably. Use an LLM benchmark comparison to pick two or three candidates from different providers, such as OpenAI's GPT models, Anthropic's Claude and Google's Gemini, then stop reading charts and start testing.

The same goes for "best model" lists. The best LLM for data analysis, or the best LLM for summarization, depends entirely on whose data and what kind of summary. Nobody's list was built on your inputs.

How do you evaluate an LLM on your own data?

LLM evaluation starts with a test dataset before any model selection, and before you commit to a base model. Collect 50 to 100 real examples and write down the correct answer for each one by hand. For a coupon task, each example is one real promotion with its correct code, discount, expiry and conditions.

Then:

  1. Run every candidate model on the same examples with the same prompt.
  2. Compare each answer against your correct answer.
  3. Count the mistakes, and note which kind they are.
  4. Rerun the whole set whenever you change the model or the prompt.

That's a complete LLM evaluation framework for a small team. You don't need a platform to start. A spreadsheet works.

The same method works for agentic workflows and other AI systems with several steps: test each step the agent performs on its own before you test the whole chain.

Which LLM evaluation metrics actually matter?

For a narrow task, five LLM evaluation metrics cover almost everything.

Metric What it tells you How to measure it
Accuracy How often the answer is right Correct answers รท total examples
Costly-error rate How often it makes the mistakes that hurt trust Count wrong expiry dates, missed conditions and similar errors separately
Format pass rate How often the output is usable without fixing Responses your system parses first time รท total
Cost per 1,000 tasks What it really costs at your volume Total spend, including retries รท tasks ร— 1,000
Failure rate How often a run times out or errors Failed calls รท total calls

The second line is the one most teams skip. A model with slightly lower overall accuracy can still be the better choice if it rarely makes the errors your customers notice. For us, a wrong expiry date does far more damage than a clumsy description.

Why does LLM structured output matter so much?

If your system expects JSON with fixed fields, every broken response becomes manual work. A model that's right 95% of the time but breaks the format 5% of the time can cost more people-hours than a model that's right 92% of the time and always returns clean data.

So test LLM structured output on its own:

  • Check whether the model supports a structured output mode or schema enforcement.
  • Feed it your hardest inputs, such as long terms, mixed languages and promotions with several codes.
  • Count how many responses your system reads first time without changes.

At DiscountReactor, the LLM step hands data to our internal coupon and store management system. If the format breaks, the error travels downstream, so format reliability matters as much as accuracy.

How do you compare LLM cost?

Price per request looks tiny until you multiply it by every task, every day. LLM cost comes from three things:

  • LLM token cost: what you pay per token, priced separately for input tokens and output tokens. Long prompts and long terms and conditions add up quickly.
  • Volume: how many tasks you run per day or month.
  • Retries: every broken or failed response you send again.

For a fair LLM cost comparison, calculate the monthly total for each model at your real volume, retries included. Then put it next to the hours the task used to take by hand. That's the number that tells you whether the model pays for itself.

LLM inference cost also changes with model size. A small model is cheaper per request and faster, while a frontier model costs more and is slower. For a narrow, high-volume task, the smaller model is often good enough, and it can cost less by a wide margin. The goal is the right balance between accuracy and cost.

What is the simplest LLM cost optimization?

Use routing by difficulty. Send every task to the smallest model that passes your tests first, and pass only the hard cases to a larger one. Different models can work side by side in the same system.

Other LLM cost optimization steps that work for small teams:

  • Shorten the prompt. Cut instructions the model already follows without being told.
  • Trim the input. Send the promotion text, not the whole web page.
  • Cache repeated work. If the same page hasn't changed since yesterday, don't process it again.
  • Set a monthly budget alert before you scale, not after the first bill.

How do latency and context window affect the choice?

For a daily batch job, reliability matters more than latency. I care whether the job finishes every morning, not whether each request takes one second or four. If customers wait for the answer, as with customer service chatbots, response times matter much more, and a fast model may beat a smarter but slower one.

Also check the context window, which is how much text the model can read at once. Long documents need a large one. Short promotions don't, so don't pay for capacity you won't use.

Then check rate limits, timeouts and how the API behaves at peak hours. Then make sure failures are visible. DiscountReactor runs on DigitalOcean behind Cloudflare, and we use Sentry to catch errors quickly instead of finding them a week later.

Should you choose an open-source or proprietary LLM?

Use a proprietary model through an API unless data privacy, cost at very high volume or customisation forces you to self-host.

Proprietary models from OpenAI, Anthropic and Google are quick to start with. You pay per token and someone else runs the servers. Open-source and open-weight models, such as Meta's Llama family from Hugging Face, give you more control over your data and let you fine-tune your own trained model, but you pay hardware costs and need someone to run them.

For most small businesses, an LLM API is the right choice to start. Different businesses have different needs, so revisit it if your volume or privacy needs change.

Do you need retrieval-augmented generation?

Only if the model must answer from your own documents, such as policies, product catalogues or past support tickets. Retrieval-augmented generation (RAG) finds the relevant text first and passes it to the model with the question.

Our coupon task doesn't need RAG, because each promotion already contains everything the model must read. Test the retrieval step separately, because a good model can't fix a search that finds the wrong text.

How much should integration effort count?

A lot. The best model on paper is worthless if it takes months to connect. Compare the APIs, the SDKs, the documentation, structured output support and how much code you'd write around each model. A model your team can connect this week often beats a slightly more accurate one that needs a rebuild.

Which model do we use, and why?

We use OpenAI tools, including the OpenAI API, across our content, SEO and automation workflows. [Andrew to add: which models, what you compared them with, and the result that decided it.]

That choice isn't permanent. Models change every few months and prices keep dropping. I treat the model like any other supplier: reliable enough for today, replaceable tomorrow. That's only possible because the rest of our stack doesn't depend on one provider's quirks.

For my own daily work I use other tools too. Anthropic's Claude helps me draft and think through problems, ChatGPT is useful for quick checks, and Perplexity is my first stop for quick research because it shows its sources. Choosing a production model and choosing a personal assistant are separate decisions.

What mistakes should you avoid?

  • Choosing from a leaderboard. General rankings say little about your narrow task.
  • Skipping the human check. Our AI is fast, but it also makes mistakes fast. People review what matters before it reaches shoppers.
  • Letting the AI model do everything. Keep it on the step where it adds the most value. Let existing systems handle storage, tracking and publishing.
  • Testing once. LLM testing is ongoing. Rerun your test set after every model or prompt change.
  • Ignoring cost until the bill arrives. Estimate the monthly total at full volume first.

How does clean output help with AI search?

Shoppers now ask AI assistants where to find deals, and those assistants need pages they can read and check. Every code on DiscountReactor shows when it was last verified, when it expires and how often it has been used, as on our Static Nails coupon page. That structure starts with the LLM step getting the data right.

On 3 November 2026, Ahrefs showed Perplexity citing 360 of our pages and ChatGPT citing 35, even though our Google traffic is small next to the big coupon sites. I can't prove exactly why AI tools pick our pages, but clear, checkable details seem to help.

Conclusion

Knowing how to choose an LLM comes down to knowing your own task. You can't choose the right LLM until you can describe a correct answer.

The best practices are simple and don't need a big budget. Write down what a correct answer looks like, build a test set of 50 to 100 real examples, and compare two or three models on accuracy, costly errors, format, cost and reliability. Start this week with the test set. The model decision becomes much easier once you have it.

Frequently asked questions

What makes one LLM better than another?

For your business, the better LLM is the one that gets your task right most often, at a cost and speed you can live with. General intelligence matters less than accuracy on your own data.

How many examples do I need to evaluate an LLM?

Fifty to a hundred real examples are enough for a first decision on a narrow task. Include your hardest cases, not only typical ones, because that's where models differ most.

Is the most expensive LLM always the most accurate?

No. On narrow, well-defined tasks such as extraction, classification or summarization, smaller models often match larger ones. Test them on your own data before paying for the biggest model.

What is the difference between LLM evaluation and LLM testing?

LLM evaluation is choosing a model by measuring candidates against your test set. LLM testing is the ongoing check that your chosen model still performs after prompt changes, model updates or new types of input.

How do I estimate LLM token cost before I start?

Count the average tokens in one input and one output, multiply by the provider's price per token, then multiply by your monthly task volume. Then add a buffer for retries.

Can I use different LLM models in the same system?

Yes. Many teams use a cheap model for simple steps and a stronger one for hard cases. Test each step separately so you know which model handles what.

Can a small business run an LLM evaluation without special tools?

Yes. A spreadsheet with your examples, correct answers and each model's output is enough to start. Dedicated evaluation platforms help later, once you test often.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.