• bitcoinBitcoin(BTC)$63,888.00-2.50%
  • ethereumEthereum(ETH)$1,854.68-2.20%
  • tetherTether(USDT)$1.000.00%
  • binancecoinBNB(BNB)$565.14-0.80%
  • usd-coinUSDC(USDC)$1.000.00%
  • rippleXRP(XRP)$1.09-2.40%
  • solanaSolana(SOL)$73.95-2.90%
  • tronTRON(TRX)$0.329645-0.60%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.02-2.20%
  • whitebitWhiteBIT Coin(WBT)$55.72-2.10%
  • HyperliquidHyperliquid(HYPE)$57.18-2.90%
  • dogecoinDogecoin(DOGE)$0.069531-0.80%
  • USDSUSDS(USDS)$1.000.00%
  • RainRain(RAIN)$0.0140490.80%
  • leo-tokenLEO Token(LEO)$9.701.10%
  • zcashZcash(ZEC)$475.82-7.30%
  • moneroMonero(XMR)$366.562.20%
  • chainlinkChainlink(LINK)$8.29-3.20%
  • cardanoCardano(ADA)$0.162299-3.70%
  • stellarStellar(XLM)$0.177000-4.00%
  • daiDai(DAI)$1.000.00%
  • CantonCanton(CC)$0.117507-3.90%
  • bitcoin-cashBitcoin Cash(BCH)$209.92-1.40%
  • USD1USD1(USD1)$1.000.00%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.47-0.50%
  • Ethena USDeEthena USDe(USDE)$1.000.00%
  • litecoinLitecoin(LTC)$45.79-2.30%
  • Global DollarGlobal Dollar(USDG)$1.000.00%
  • hedera-hashgraphHedera(HBAR)$0.070073-1.80%
  • Circle USYCCircle USYC(USYC)$1.130.00%
  • suiSui(SUI)$0.70-5.50%
  • avalanche-2Avalanche(AVAX)$6.26-0.80%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • crypto-com-chainCronos(CRO)$0.056527-1.20%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • shiba-inuShiba Inu(SHIB)$0.0000040.70%
  • tether-goldTether Gold(XAUT)$4,049.770.10%
  • nearNEAR Protocol(NEAR)$1.79-6.00%
  • uniswapUniswap(UNI)$3.62-4.90%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.14-0.30%
  • OndoOndo(ONDO)$0.377794-6.60%
  • BittensorBittensor(TAO)$189.68-2.50%
  • pax-goldPAX Gold(PAXG)$4,047.920.20%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.0566510.70%
  • okbOKB(OKB)$82.15-0.30%
  • AsterAster(ASTER)$0.63-0.60%
  • HTX DAOHTX DAO(HTX)$0.000002-1.10%
  • Ripple USDRipple USD(RLUSD)$1.000.00%
  • MemeCoreMemeCore(M)$1.192.60%
  • usddUSDD(USDD)$1.000.00%
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

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse

Datalab Marker v2 vs MinerU, Docling, and Liteparse: Benchmark Breakdown

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

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse
AI & Technology

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse

July 25, 2026
Datalab Marker v2 vs MinerU, Docling, and Liteparse: Benchmark Breakdown
AI & Technology

Datalab Marker v2 vs MinerU, Docling, and Liteparse: Benchmark Breakdown

July 25, 2026
Datalab’s Marker 2 vs MinerU, Docling and LiteParse: 76.0 on olmOCR-bench at 5× MinerU’s Throughput
AI & Technology

Datalab’s Marker 2 vs MinerU, Docling and LiteParse: 76.0 on olmOCR-bench at 5× MinerU’s Throughput

July 25, 2026
Meta Has Pulled Out Of A Renewable Energy Initiative As It Relies More On Natural Gas For Data Centers
AI & Technology

Meta Has Pulled Out Of A Renewable Energy Initiative As It Relies More On Natural Gas For Data Centers

July 24, 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
Andy Burnham becomes the 7th British prime minister in a decade.

Andy Burnham becomes the 7th British prime minister in a decade.

July 22, 2026
4 more Ford workers fired over alleged snack theft after .95 cookie fiasco with wrongfully canned electrician

4 more Ford workers fired over alleged snack theft after $1.95 cookie fiasco with wrongfully canned electrician

July 21, 2026
Inversion Space is testing orbital cargo for faster global deliveries

Inversion Space is testing orbital cargo for faster global deliveries

July 25, 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!