Glossary Platform & AI

What drives LLM cost and latency?

LLM cost and latency are what a language model costs to run and how long it takes to answer. Both rise with the size of the model, the number of tokens it reads and writes, and the number of model calls a task needs. Agents multiply all three, because each step is another call.

Also known as: LLM inference cost, AI token costs, inference latency

What drives LLM cost and latency?

A token is a chunk of text, roughly three-quarters of a word in English. Models are usually priced per million tokens, with separate prices for what goes in and what comes out. Speed works the same way: a model reads the input quickly, then writes the output one token at a time.

That makes cost and latency a product of three things: how big the model is, how many tokens each call uses, and how many calls a task makes. Chat assistants make one call per question. Agents make many.

What are the levers for cost and speed?

LeverHow it helpsTrade-off
Smaller modelsFaster and cheaper per tokenWeaker on complex reasoning
Model routingSends easy tasks to small models and hard ones to large modelsNeeds a way to judge difficulty
Shorter contextFewer input tokens per callRisk of leaving out what the model needs
Prompt cachingReuses the unchanged start of a long prompt at a lower priceOnly helps when prompts repeat
Fewer stepsFewer calls per taskNeeds more careful workflow design
BatchingLower prices for work that can waitResults arrive later
Distillation and quantizationSmaller, faster versions of a modelUsually done by model providers, with some loss of quality

What is an example of LLM cost?

Example

A summary that cost more than expected

A team builds an agent that summarizes weekly performance for 200 accounts. Each run reads a long instruction prompt plus the account's data, then writes a page.

Testing on five accounts looked cheap. At 200 accounts, with retries and a review step, the agent makes thousands of calls a week. The team routes the data-gathering steps to a smaller model, caches the shared instructions, and keeps the large model only for the written summary, cutting cost by more than half without changing the output people read.

Large models vs. small models

TopicLarge modelsSmall models
Best atReasoning, writing, and ambiguous requestsClassification, extraction, and routine steps
SpeedSlowerFaster
Cost per tokenHigherLower
Good default forThe hardest step in a taskEverything else

Why do LLM cost and latency matter?

Pilots hide cost because they run on a handful of examples. Production multiplies it by users, accounts, and steps. Latency matters too: an assistant that takes 30 seconds gets used less, and an agent that's slow can't keep up with the work it was built for.

  • Measure per task. Cost per finished report or answer is more useful than a monthly bill.
  • Match the model to the step. Not every step needs the most capable model.
  • Watch the loop. Retries and long agent loops are where costs quietly grow.
How Alli does this

How does Alli do this?

Alli4u lets people choose from models across several leading AI providers, based on what each user is enabled for, so teams can match the model to the task while the organization controls cost.

Admins turn on models user by user and track token usage for each person, so leaders can see who uses AI, what it costs, and where it pays off.

Explore Alli4u 

LLM cost and latency FAQ

What is a token in an LLM?

A token is a chunk of text a model reads or writes, often part of a word. In English, a token averages roughly three-quarters of a word. Models are usually priced per million tokens.

Why do AI agents cost more than chatbots?

Each step an agent takes is another model call, often with a long context. A task with ten steps and a retry or two can use many times the tokens of a single answer.

How can you reduce LLM costs?

Route simple steps to smaller models, keep prompts focused, cache repeated instructions, cut unnecessary agent steps, and batch work that doesn't need an immediate answer.

What is model routing?

Sending each request to the cheapest model that can handle it well, and reserving larger models for the hardest requests.

Last updated Back to the glossary

See these ideas working on your data.

Book a walkthrough and we'll show you how Alli connects, defines, and acts on your data, live.

Book an intro