LLM Ranking Cost: What Reranking Actually Costs
What Drives LLM Ranking Cost
"LLM ranking cost" usually means one of two things: the cost of using a language model to rank or rerank a list of items (search results, candidates, product recommendations, leaderboard entries), or the cost of comparing multiple LLMs against each other on a benchmark. This article is about the first one, since that's the cost that actually shows up on your invoice every day — using an LLM as a reranker inside a real pipeline.
The short answer: ranking costs more than a single chat completion because you're not making one call, you're scoring or comparing many items per request. A pointwise ranking of 20 documents can cost 20x a single query. A pairwise comparison of the same 20 documents can cost over 100x. The actual dollar amount depends on the model you pick, how you structure the ranking (pointwise, pairwise, or listwise), the size of each item, and how many ranking requests you run per day.
Pointwise, Pairwise, and Listwise Cost Differently
The architecture you choose for LLM ranking changes the token math dramatically.
- Pointwise: the model scores each item independently ("rate this document's relevance 0-10"). Cost scales linearly with the number of items — N items means N calls (or N items in one batched call, depending on how you structure prompts).
- Pairwise: the model compares two items and picks the better one. To fully rank N items this way you need up to N(N-1)/2 comparisons, which explodes fast — 20 items means up to 190 comparisons.
- Listwise: the model sees the whole list in one prompt and returns an ordered ranking. This is usually the cheapest per-item approach since it's one call, but the prompt grows with list size and very long lists can hit context limits or degrade ranking quality.
Most production reranking systems use listwise for small-to-medium lists (10-50 items) and fall back to pointwise for larger candidate pools, since listwise accuracy tends to drop past a certain list length.
Doing the Actual Math
Cost for any of these approaches comes down to:
cost = (input_tokens + output_tokens) × price_per_token × number_of_calls
Say you're reranking 20 search results, each with a 200-token snippet, using a mid-tier model priced around $3/million input tokens and $15/million output tokens.
Listwise (1 call):
- Input: ~20 × 200 tokens + prompt overhead ≈ 4,200 tokens
- Output: ~200 tokens (just the ordered list)
- Cost: (4,200 × $3 + 200 × $15) / 1,000,000 ≈ $0.016 per ranking
Pointwise (20 calls):
- Input per call: ~250 tokens (one snippet + instructions)
- Output per call: ~10 tokens (a score)
- Cost: 20 × (250 × $3 + 10 × $15) / 1,000,000 ≈ $0.018 per ranking
Pairwise (190 calls):
- Input per call: ~450 tokens (two snippets + instructions)
- Output per call: ~10 tokens
- Cost: 190 × (450 × $3 + 10 × $15) / 1,000,000 ≈ $0.284 per ranking
Listwise and pointwise land in the same ballpark here, but pairwise is 15-18x more expensive for the same list. Multiply any of these by thousands of daily search queries and the architecture choice becomes the single biggest lever on your ranking bill — bigger than model choice in most cases.
Factors That Push the Number Up or Down
- Model tier: a frontier model can cost 5-10x more per token than a smaller one. Ranking rarely needs the most expensive model — relative ordering is a simpler task than open-ended generation.
- List size: longer lists mean more input tokens per call, and for pairwise, cost grows quadratically, not linearly.
- Prompt overhead: repeated system instructions and formatting rules add up across many calls. Trimming boilerplate matters more in ranking than in single-turn chat because it's multiplied by every item or pair.
- Caching: if the same candidate set gets reranked repeatedly (e.g., a fixed catalog reranked per new query), caching the item descriptions and only sending the query + IDs cuts input tokens significantly.
- Streaming vs. blocking: streaming doesn't reduce cost directly, but it lets you cut off generation early if you only need the top-K ranking rather than the full ordered list.
Cutting LLM Ranking Cost in Practice
- Default to listwise for lists under ~30 items. It's usually cheapest per full ranking and needs the fewest round trips.
- Use a cheaper model for the first pass, then re-rank the top 10 with a stronger one. Two-stage ranking (cheap filter, expensive refine) usually beats running an expensive model over everything.
- Truncate item text. Rankers rarely need the full document — a title plus a short snippet is often enough signal, and it directly reduces input tokens.
- Batch requests where the API supports it instead of firing one call per item.
- Track cost per ranking job, not just per token. If you're running ranking through SubToAPI, every response includes usage metadata so you can see exactly how many tokens a given ranking call consumed and attribute cost to a specific feature or team.
A minimal listwise ranking call through the Messages API looks like this:
curl https://api.subtoapi.app/v1/messages \
-H "Authorization: Bearer $SUBTOAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4",
"max_tokens": 300,
"messages": [{
"role": "user",
"content": "Rank these 5 snippets by relevance to \"best hiking boots for wide feet\", return only a comma-separated ordered list of IDs:\n1: ...\n2: ...\n3: ...\n4: ...\n5: ..."
}]
}'
The usage block in the response gives you input and output token counts directly, which is the fastest way to build your own cost-per-ranking dashboard without guessing. See the quickstart and Messages docs for the full request shape, or streaming if you want to stop generation early once the top results are returned.
Is LLM Ranking Worth the Cost?
Compared to a traditional cross-encoder reranker running on your own infrastructure, LLM ranking costs more per query but requires zero training data, zero fine-tuning, and adapts instantly to new domains or ranking criteria described in plain language. For low-to-medium query volume — internal tools, B2B search, admin dashboards — the per-query cost (fractions of a cent to a few cents) is usually negligible next to engineering time saved. For high-volume consumer search, the math changes: a dedicated reranking model trained once is almost always cheaper at scale, and LLM ranking is better reserved for the final top-K refinement step rather than the full candidate pool.
Questions
Does ranking cost more than a normal chat completion? Yes, per ranking job it usually does, because you're either sending more items per prompt (listwise) or making many more calls (pointwise/pairwise) than a single question-and-answer exchange.
Which ranking method is cheapest? Listwise ranking is typically cheapest for lists up to a few dozen items since it needs only one call. Pairwise is the most expensive because comparisons grow quadratically with list size.
Can I reduce ranking cost without changing models? Yes — trim item text to the minimum needed for relevance judgments, cache repeated content, batch calls, and use a two-stage cheap-filter-then-expensive-refine approach instead of ranking every candidate with your best model.