• bitcoinBitcoin(BTC)$75,762.00-0.96%
  • ethereumEthereum(ETH)$2,073.40-0.52%
  • tetherTether(USDT)$1.00-0.04%
  • binancecoinBNB(BNB)$655.21-0.34%
  • rippleXRP(XRP)$1.33-0.25%
  • usd-coinUSDC(USDC)$1.000.01%
  • solanaSolana(SOL)$83.80-0.01%
  • tronTRON(TRX)$0.373635-0.01%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.031.08%
  • dogecoinDogecoin(DOGE)$0.1014190.89%
  • HyperliquidHyperliquid(HYPE)$60.963.58%
  • USDSUSDS(USDS)$1.000.16%
  • zcashZcash(ZEC)$566.04-9.29%
  • leo-tokenLEO Token(LEO)$10.010.07%
  • cardanoCardano(ADA)$0.2402700.18%
  • RainRain(RAIN)$0.01155543.78%
  • moneroMonero(XMR)$380.410.61%
  • bitcoin-cashBitcoin Cash(BCH)$343.87-0.16%
  • chainlinkChainlink(LINK)$9.430.70%
  • whitebitWhiteBIT Coin(WBT)$55.75-0.94%
  • CantonCanton(CC)$0.157059-4.42%
  • the-open-networkToncoin(TON)$1.931.83%
  • stellarStellar(XLM)$0.1477120.15%
  • USD1USD1(USD1)$1.00-0.02%
  • Ethena USDeEthena USDe(USDE)$1.00-0.01%
  • daiDai(DAI)$1.00-0.08%
  • litecoinLitecoin(LTC)$52.03-0.13%
  • suiSui(SUI)$1.00-1.44%
  • avalanche-2Avalanche(AVAX)$9.16-0.11%
  • MemeCoreMemeCore(M)$3.000.57%
  • hedera-hashgraphHedera(HBAR)$0.086428-0.48%
  • paypal-usdPayPal USD(PYUSD)$1.000.01%
  • nearNEAR Protocol(NEAR)$2.52-7.25%
  • shiba-inuShiba Inu(SHIB)$0.0000060.39%
  • crypto-com-chainCronos(CRO)$0.067617-0.45%
  • Circle USYCCircle USYC(USYC)$1.12-0.02%
  • Global DollarGlobal Dollar(USDG)$1.000.01%
  • BittensorBittensor(TAO)$277.821.28%
  • tether-goldTether Gold(XAUT)$4,495.06-0.55%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.130.29%
  • pax-goldPAX Gold(PAXG)$4,505.40-0.50%
  • polkadotPolkadot(DOT)$1.251.55%
  • mantleMantle(MNT)$0.64-1.08%
  • uniswapUniswap(UNI)$3.27-0.07%
  • OndoOndo(ONDO)$0.409711-0.73%
  • okbOKB(OKB)$88.332.96%
  • HTX DAOHTX DAO(HTX)$0.000002-0.32%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.056415-6.82%
  • Ripple USDRipple USD(RLUSD)$1.000.01%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Design a High-Precision Retrieve-and-Rerank Pipeline with ZeroEntropy Zerank-2 Reranker

May 26, 2026
in AI & Technology
Reading Time: 1 min read
A A
Design a High-Precision Retrieve-and-Rerank Pipeline with ZeroEntropy Zerank-2 Reranker
ShareShareShareShareShare

YOU MAY ALSO LIKE

Sony Abruptly Shuts Down Online Multiplayer Game Destruction AllStars

DeepSWE blows up the AI coding leaderboard, crowns GPT-5.5, and finds Claude Opus exploiting a benchmark loophole

print("\n" + "="*70 + "\nPART 4: NDCG@10 evaluation\n" + "="*70)
eval_set = [
   {"query": "Where is most ATP produced in the cell?",
    "rels": {0: 2, 2: 3, 4: 2, 6: 1, 8: 3}},
   {"query": "How do plants capture light energy?",
    "rels": {1: 3, 9: 1}},
   {"query": "How are proteins made and packaged in a cell?",
    "rels": {5: 3, 7: 2}},
]
def dcg(rels):
   rels = np.asarray(rels, dtype=float)
   return np.sum((2**rels - 1) / np.log2(np.arange(2, rels.size + 2)))
def ndcg_at_k(ranked_doc_ids, rel_map, k=10):
   gains = [rel_map.get(d, 0) for d in ranked_doc_ids[:k]]
   ideal = sorted(rel_map.values(), reverse=True)[:k]
   idcg = dcg(ideal)
   return dcg(gains) / idcg if idcg > 0 else 0.0
base_scores, rr_scores = [], []
for ex in eval_set:
   q, rel_map = ex["query"], ex["rels"]
   q_emb = bi.encode(q, convert_to_tensor=True, normalize_embeddings=True)
   hits = util.semantic_search(q_emb, corpus_emb, top_k=len(corpus))[0]
   base_order = [h["corpus_id"] for h in hits]
   base_scores.append(ndcg_at_k(base_order, rel_map))
   rr = reranker.rank(q, [corpus[i] for i in base_order], convert_to_tensor=True)
   rr_order = [base_order[r["corpus_id"]] for r in rr]
   rr_scores.append(ndcg_at_k(rr_order, rel_map))
print(f"{'Query':45s} {'bi-encoder':>12s} {'+ zerank-2':>12s}")
for ex, b, r in zip(eval_set, base_scores, rr_scores):
   print(f"{ex['query'][:43]:45s} {b:12.4f} {r:12.4f}")
print("-"*72)
print(f"{'AVERAGE NDCG@10':45s} {np.mean(base_scores):12.4f} {np.mean(rr_scores):12.4f}")
print(f"\nReranking lift: {np.mean(rr_scores)-np.mean(base_scores):+.4f} NDCG@10")

Credit: Source link

ShareTweetSendSharePin

Related Posts

Sony Abruptly Shuts Down Online Multiplayer Game Destruction AllStars
AI & Technology

Sony Abruptly Shuts Down Online Multiplayer Game Destruction AllStars

May 26, 2026
DeepSWE blows up the AI coding leaderboard, crowns GPT-5.5, and finds Claude Opus exploiting a benchmark loophole
AI & Technology

DeepSWE blows up the AI coding leaderboard, crowns GPT-5.5, and finds Claude Opus exploiting a benchmark loophole

May 26, 2026
Stability AI Releases Stable Audio 3: A Family of Fast Latent Diffusion Models for Audio Generation and Editing
AI & Technology

Stability AI Releases Stable Audio 3: A Family of Fast Latent Diffusion Models for Audio Generation and Editing

May 26, 2026
The attack dominating financial services doesn’t steal passwords. It resets MFA and steals the token.
AI & Technology

The attack dominating financial services doesn’t steal passwords. It resets MFA and steals the token.

May 26, 2026
Next Post
Banpu Public Company Limited 2026 Q1 – Results – Earnings Call Presentation (OTCMKTS:BNPJY) 2026-05-26

Banpu Public Company Limited 2026 Q1 - Results - Earnings Call Presentation (OTCMKTS:BNPJY) 2026-05-26

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Creators Miss Out on AI Agentic Economy, Says Parallel CEO

Creators Miss Out on AI Agentic Economy, Says Parallel CEO

May 25, 2026
U.F.C. Fight Venue Takes Shape on the White House Lawn – The New York Times

U.F.C. Fight Venue Takes Shape on the White House Lawn – The New York Times

May 26, 2026
Battle Of The Telephoto Smartphones

Battle Of The Telephoto Smartphones

May 22, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!