Better HN
topnewbestaskshowjobs
Log inSign up

hawthorns

5 karma · joined Apr 15, 2025 (1y ago) · 2 submissions

Submissions

comment 1y ago · link · parent

The main point didn't get hit on by the responses. Re-ranking is just a mini-LLM (for latency/cost reasons) that does a double heck. Embedding model finds the closest M documents in R^N space. Re-ranker picks the top K documents from the M documents. In theory, if we just used Gemini 2.5 Pro or GPT 5 as the re-ranker, the performance would even be better than whatever small re-ranker people choose to use.

comment 1y ago · link · parent

It's dead simple. Here is the simplified version that returns the quantiles for '100 / 2 ~ 4'.

  import numpy as np
  
  def monte_carlo(formula, iterations=100000):
    res = [formula() for _ in range(iterations)]
    return np.percentile(res, [0, 2.5, \*range(10, 100, 10), 
    97.5, 100])

  def uncertain_division():
    return 100 / np.random.uniform(2, 4)

  monte_carlo(uncertain_division, iterations=100000)