AIKm™AI 知識管理學會

Research brief · 2026-07-13

Cost optimisation for enterprise LLM deployments

The cost of a production LLM system rarely comes from the model list price. It comes from oversized default calls, long prompts, and running a frontier model where a small one would do. Five levers, in the order AIKm pulls them.

TL;DR. LLM bills grow non-linearly with sloppy defaults. AIKm cuts cost with four levers: route by need so cheap models handle default queries and larger models escalate only when evidence requires it; cache deterministic tool responses; compress prompts by moving fixed instructions to system messages and trimming retrieved passages to the top three; and batch background jobs. Measure cost per successful task against a representative baseline; savings and quality effects depend on the workload and provider.

Cost levers, in order

LeverMeasurement to compareQuality risk
Model routingWorkload-specific; establish a baselineLow, if the router has a fallback
Prompt disciplineWorkload-specific; establish a baselineLow
Retrieval hygieneWorkload-specific; establish a baselineLow
Caching (semantic and exact)Workload-specific; establish a baselineMedium, needs staleness policy
Distillation or quantisationWorkload-specific; establish a baselineMedium, needs evaluation set

1. Route by need, not by default

Most enterprise queries do not need a frontier model. Classify the request (lookup, summary, drafting, reasoning) and route accordingly. Keep a fallback to a stronger model when the router's confidence is low, and log every escalation so you can retrain the router.

2. Cut prompt bloat

System prompts grow. Templates duplicate examples. Retrieval returns too many passages. Measure token spend per route, and treat any prompt over a few thousand tokens as a defect to investigate.

3. Retrieval hygiene

Better retrieval reduces the number of passages you need to send to the model. Rerank aggressively, cap at the smallest k that still hits your groundedness target, and prefer smaller, denser chunks over long ones.

4. Cache what repeats

Enterprises ask the same questions repeatedly. Semantic caching keyed on a canonical form of the query, with an explicit time-to-live tied to the underlying data, is often the single highest-ROI change.

5. Distil or quantise the hot path

For a small number of very high-volume routes, distilling into a smaller task-specific model or serving a quantised open-weight model can pay back in weeks. This step only makes sense once you have an evaluation set (see the evaluation brief) that will tell you if quality slips.

Discuss an LLM cost review

Author: Dr Hoson H.S. Lam · Content updated:

Primary references & further reading

These sources provide technical background. They do not independently validate AIKm project outcomes. Examples and evaluation suggestions are guidance; results depend on the data, task and implementation.