Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Is a cross-encoder reranker worth the latency? Measured on 2,908 FastAPI doc chunks

Tested on: FastAPI English docs (154 Markdown files, 2,908 heading-aware chunks), sentence-transformers 6.3.0, transformers 5.24.1, torch 2.15.0 CPU (1 torch thread, 2-core GitHub runner), cross-encoder/ms-marco-MiniLM-L-6-v2 reranker, all-MiniLM-L6-v2 embeddings. Query sets: 200 random heading queries, 200 random exact-identifier queries (seed 0), 30 hand-written paraphrases. Single run, no GPU.…

Testing a cross-encoder reranker on FastAPI English documentation revealed mixed results based on query type and candidate depth. On heading queries, reranking the top 20 candidates improved Mean Reciprocal Rank (MRR) from 0.710 to 0.889 (+0.179), while top 10 and top 50 candidates showed even more significant gains in hit@1 and hit@5 metrics.

However, reranking did not benefit exact code identifiers, as their hit@5 dropped from 0.835 to 0.780 when using top-50 candidates. Paraphrases were inconclusive, with mixed gains and losses in hit@k metrics depending on candidate depth. Latency increased proportionally with candidate depth, costing a median of 1,706 ms per query at 20 candidates on a single CPU thread.

The model, ms-marco-MiniLM-L-6-v2, achieved NDCG@10 of 74.30 on TREC DL 2019 and about 1,800 docs/sec on a V100 GPU. While reranking can improve results for natural-language queries like headings, identifiers, and paraphrases may not see significant benefits. The bottom line is that reranking the top 20 candidates is recommended over larger depths, with recall@N being a key metric to check before further optimization.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Shrinking an encrypted photo vault on the phone: AES-256-GCM plus HEVC, and no cloud

Most photo vault apps solve one problem: hiding pictures behind a PIN. We wanted to solve two at once on a phone that is already full: keep private photos encrypted on the device, and make that…

  • PhotoVault encrypts photos using AES-256-GCM on device without cloud
  • Lossless mode stores original files, Compact mode uses HEVC re-encode
  • Secure Share transfers vault between devices without cloud involvement

Anyone with an invite link can join your team. Who else has the link?

Anyone with an invite link can join your team. Who else has the link? Team invites are a common feature in apps built with AI tools: a link that lets someone join your workspace.

  • Invite links allow anyone to join your workspace if guessable or never expiring.
  • Short, readable tokens are easier for attackers to guess.
  • Set expiration time, single-use, and low default role for invites.

Array Division | CSES - Algoritmit ongelmanratkaisussa

https://cses.fi/alon/task/1085 #include #include #include using namespace std ; int main ( ) { ios_base :: sync_with_stdio ( false ) ; cin .

  • Problem involves dividing array into subarrays to minimize maximum sum
  • Solution uses binary search algorithm on CSES platform
  • Program outputs smallest possible maximum subarray sum

Kapper 2.1: already delightful for humans, now rocket fuel for agents

Since Kapper 1.6 , we've shipped six releases — and somewhere along the way, the way people write SQL changed. Most SQL is now written by an agent.

  • Kapper 2.1 improves speed with cacheable templates and optimized query path
  • Self-describing errors introduced in 2.0.0 provide clearer messages for humans and agents

More from Sunday, 29 November 2026 →