Book a free call

How Much Does Re-Ranking Cost in Search?

Re-ranking adds a second scoring pass to search, and its cost depends on query volume, candidates per query and where the model runs. Here is how to estimate it.

Hertiv engineering teamReviewed by a senior engineer
5 min read
How Much Does Re-Ranking Cost in Search?
On this page

Short answer

Re-ranking usually costs a fraction of a cent per query on a hosted API, or the GPU time to run a small model yourself. The total depends on how many searches you serve, how many candidates each query re-scores, and whether you pay per call or per server hour.

What is re-ranking?

Re-ranking is a second scoring pass in search. A fast first pass retrieves a broad set of candidate documents, then a re-ranker model reads each candidate against the query and scores how well it matches, so the best results rise to the top.

It improves result quality because the first pass is usually a cheap vector or keyword match, while the re-ranker looks at the query and the document together. The trade-off is cost: every candidate the re-ranker reads adds compute, so the bill grows with query volume and candidates per query.

Cost part What you pay for Typical shape
Re-ranker calls Scoring candidates per query Per query or per candidate
First-pass retrieval Vector or keyword search Per query, usually small
Hosting Servers or GPUs for self-hosted models Per hour, even when idle
Evaluation Test sets and quality checks Small, mostly staff time

Most teams start with a hosted re-ranker and move to self-hosting only when volume makes the per-call price larger than the server bill. For the basics of the technique, see what is re-ranking.

What drives re-ranking cost?

Re-ranking cost is driven by four things: how many searches you serve, how many candidates each search re-scores, how long each candidate is, and which model does the scoring.

Candidates per query is the lever most teams miss. Re-scoring 100 candidates costs roughly five times as much as re-scoring 20, while the quality gain from the extra 80 is usually small. Start with 10 to 20 candidates and measure whether more actually helps.

Document length matters too, because the model reads the full text of each candidate. Long documents cost more per candidate than short ones, so trimming candidates to the relevant passage before scoring cuts the bill directly.

Model choice is the fourth driver. A cross-encoder reads the query and document together and scores well, but it costs more per candidate than a lighter late-interaction model. The lighter model is cheaper and faster, yet it may miss subtle matches. Test both on your own queries before choosing, because the right trade-off depends on your documents, not on a vendor benchmark.

Hosted APIs or self-hosted models?

Hosted re-ranking APIs charge per query or per candidate, with no server to run. Self-hosted models charge per server hour, with no per-query fee. The right choice depends on volume and on whether your data can leave your network.

Option Cost shape Best when
Hosted API Per query or per candidate Volume is low or uneven
Self-hosted model Per server hour Volume is high and steady
Hosted API See vendor site for rates You want zero operations work
Self-hosted model GPU plus staff time Data must stay on your network

A common path is to start hosted, measure real volume for a month, then compare the hosted bill with a self-hosted quote. The break-even point is usually higher than teams guess, because a server hour also needs monitoring and updates. For the retrieval layer around the re-ranker, see best vector databases for startups.

How to estimate re-ranking cost in five steps

Estimate re-ranking cost from your own traffic, not from a vendor example. Five steps give a number you can defend.

  1. Count searches per month. Use your analytics, not a guess, and split by the searches that actually need re-ranking.
  2. Pick candidates per query. Start with 20 and plan to test 10 and 50 to see what quality buys.
  3. Price one query. For a hosted API, multiply candidates by the vendor's per-candidate rate, or use a planning rate and note it as an estimate. For self-hosting, divide the monthly server cost by expected queries.
  4. Add the first pass. Retrieval, storage and embedding are small per query but real at scale, so include them in the total.
  5. Add a margin. Traffic grows and candidates creep up, so budget 20% above the estimate for the first quarter.

Write the estimate down with the assumptions, so the next review can check them against real usage instead of starting over.

Example (hypothetical): a support search bill

Example (hypothetical): a support team serves 5,000 searches a day and re-scores the top 20 candidates for each one. That is 150,000 searches a month.

At a planning rate of $0.002 per query, re-ranking costs 150,000 x $0.002 = $300 a month. The first-pass retrieval adds about $150 a month. The total is $300 + $150 = $450 a month, or $450 x 12 = $5,400 a year.

Cutting candidates from 20 to 10 roughly halves the re-ranking part, to about $150 a month, if quality holds. That is why the first tuning step is always candidates per query, not a cheaper model. If you are building the retrieval layer too, RAG development covers the full pipeline.

How to cut re-ranking cost without losing quality

Cutting re-ranking cost is mostly about sending the model less work, not about finding a cheaper model.

  • Re-score fewer candidates. Test 10 against 20 and keep the smaller number if quality holds.
  • Trim candidate text. Pass the relevant passage, not the whole document, to the re-ranker.
  • Cache common queries. Repeat searches can reuse yesterday's ranking instead of paying again.
  • Skip re-ranking for easy queries. Exact-match or navigational searches rarely need a second pass.
  • Batch where you can. Some self-hosted setups score candidates in batches, which uses the GPU better.

Measure quality on a fixed test set before and after each change, so a saving that hurts results is caught before users notice.

What are the common mistakes?

The most common re-ranking mistakes are re-scoring far more candidates than needed, and treating the hosted bill as the whole cost.

  • Re-scoring 100 candidates by default. The extra candidates add cost and rarely change the top results.
  • Ignoring the first pass. A weak first pass hands the re-ranker poor candidates, so no amount of re-scoring fixes it.
  • No quality test set. Without one, cost cuts and model swaps are guesses.
  • Forgetting data rules. Sending customer documents to a hosted API may breach your data policy.
  • Optimising price before quality. A cheap re-ranker that returns poor results costs more in lost trust than it saves.

Key takeaways

  • Re-ranking is a second scoring pass that reads each candidate against the query
  • Candidates per query is the biggest cost lever, ahead of model choice
  • Hosted APIs suit low or uneven volume; self-hosting suits high, steady volume
  • Estimate from your own traffic: searches, candidates, per-query price, plus a margin
  • Trim candidate text and cache repeat queries before chasing a cheaper model

Frequently asked questions

What is re-ranking in simple terms?

Re-ranking is a second look at search results. A fast first pass finds a broad set of candidates, then a re-ranker model reads each one against the query and scores it. The best-scoring candidates move to the top. It costs extra compute, but it usually returns noticeably better results than the first pass alone.

How much does re-ranking cost per query?

Hosted re-rankers typically charge a fraction of a cent per query, with the exact rate depending on candidates per query and document length, so check the vendor site for current pricing. Self-hosted models cost server hours instead. Either way, candidates per query decides the total more than the headline rate.

Is re-ranking worth it for small search volumes?

Usually yes, if search quality matters to your product. At low volume the monthly cost is small, and the quality gain is easy to see on a test set. The question to ask is whether your first-pass results are already good enough, not whether re-ranking is expensive.

What is the difference between re-ranking and embedding search?

Embedding search finds candidates by comparing vector similarity, which is fast but shallow. Re-ranking reads the query and each candidate together and scores the match in detail. Most production search uses both: embeddings for the first pass, a re-ranker for the final order. See what is re-ranking for the full comparison.

Can I self-host a re-ranking model?

Yes. Small open re-ranker models run on a single GPU or even a CPU for modest volumes. Self-hosting makes sense when volume is high and steady, or when documents cannot leave your network. Start hosted, measure volume, and move only when the hosted bill beats the server bill.

How do I know if re-ranking is working?

Build a small test set of real queries with known good answers, then measure how often the right document appears in the top three results before and after re-ranking. Track that number over time. If it does not move, the re-ranker is not earning its cost.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning search that ranks the right results first? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call