[
  {
    "startMs": 12660,
    "text": "So great being here. Uh, I'm Jo Kristian Bergum. I'm the CEO of, uh, Hornet.dev, and I'm here today to talk about the unreasonable effectiveness of BM25 for agentic search. So how many of you heard about BM25 before? Is it new, or is it... Oh, quite a few, so that's great. Uh, I'm also watching the World Cup. Norway is playing their, uh, against Ivory Coast second half. Norway is leading, so that's good. So yeah. And at Hornet, we are building"
  },
  {
    "startMs": 42660,
    "text": "retrieval infrastructure for agents, and, uh, I've been working on search and retrieval problems for a long time. As you can tell, I'm gray-haired. Uh, been working in this space for more than twenty years. Um, and in the talk today, I'll talk about why this kind of thirty-year-old lexical scoring function is, uh, making a strong comeback. First, I will talk a little bit about what I mean by agentic search or agentic retrieval and kind of"
  },
  {
    "startMs": 72600,
    "text": "define that for, for you, all of you. Um, my definition is that agentic search is essentially search inside a agent loop. So you have an agent that is trying to accomplish a task, write a coding or, uh, do some deep research or whatever task. And inside that, you have some kind of information need for the agent, right, in order to get that task done successfully. And you essentially need three things, uh, to kind of build a good agentic"
  },
  {
    "startMs": 102540,
    "text": "search system, and that is you need a capable model, a model that is able to use tools and is able to formulate queries. You also need a harness around the model in how you kind of expose the retrieval and the search functions to the model. There's different ways to do that. It could be through tool calling, or it could be through code mode. Um, Edo here, uh, demonstrated what I call code mode for exposing retrieval"
  },
  {
    "startMs": 132340,
    "text": "infrastructure. So that's the harness part. And then you also need, uh, a retrieval engine to be able to do searches efficiently, potentially over billion-scaled, uh, document sets."
  },
  {
    "startMs": 147920,
    "text": "And to define BM25. So BM25 actually stands for Best Match 25. So there were some researchers doing plenty of different experiments, and experiment number twenty-five turned out to be the best one.  So that's, that's the background of the name. It's essentially a scoring function. So you can imagine you have a query, and you have a document, and you calculate some kind of score by interaction between the query terms and the document terms, and you come up with a score, and you hope that this score kind of is"
  },
  {
    "startMs": 177920,
    "text": "a good proxy for the relevancy of the document with regards to the query. Right. So one way to calculate BM25 would be to take all the documents and score each of them, you know, and then figure out what are the top K documents. And then there's, like, thirty or forty years of interest in how you accelerate that type of retrieval. Top K, lots of different algorithms. We also invest a lot in that. I'll show something in this direction, but BM25 is the scoring function, and there is a"
  },
  {
    "startMs": 207920,
    "text": "way to kind of accelerate top-K retrieval. Uh, BM25 hasn't changed. It's the same scoring function. But the change here is really that we got a more powerful user. Uh, Edo talked about general knowledge. The LLMs today have a lot of general knowledge. They know about entities. They know about companies. They know about dates. They know a lot, right? And by using that kind of implicit knowledge that is built into the parametric model,"
  },
  {
    "startMs": 238000,
    "text": "uh, they essentially become very good at search. Um, and that's the really change, uh, here now that we're-- is kind of making BM25 more relevant. And BM25 used to be a kind of a baseline function. Any information retrieval research would include a BM25 baseline, and then you would put something fancy, advanced, neural, fancy stuff, and then you would compare it with BM25. I also think it's interesting in how we evaluate search"
  },
  {
    "startMs": 267860,
    "text": "before, because you will simply look at ten blue links, and you, like how scan it, and you compute some metrics. A lot of that is now going away because the agent is not really... It's kind of powerful in the way that it can type out a lot more queries than a human can do, so it's less relevant to think about, uh, evaluating these systems just by a single-shot query."
  },
  {
    "startMs": 293860,
    "text": "And this is one of my kind of favorite benchmarks out there. I like to talk about benchmarks. So BrowseComp+ is a deep research benchmark, uh, published in a paper last year. And it has almost or exactly eight hundred and twen- thirty questions. These are riddle-like. Think about it like a pub quiz. Do you have pub quizzes in the US? Yeah. Okay, great. So like kind of a riddle type of questions, quite long."
  },
  {
    "startMs": 324120,
    "text": "And the agent, the harness of this kind of-- or the protocol of this benchmark is that you have a model, and it gets a very simple tool called Search, and it accepts a query string, and you return some snippets back to the model. And the corpus is about hundred and five thousand or a hundred thousand documents, so that's kind of tiny, and these are web documents. And the end-to-end accuracy, um, all of these questions have a golden reference answer, and you can"
  },
  {
    "startMs": 354060,
    "text": "kind of check if the model and the entire loop produces that exact answer."
  },
  {
    "startMs": 361860,
    "text": "Um, but why kind of, why do we need retrieval? I like to compare context windows with floppy disks because I'm old. In the '80s, right, we installed these kind of games on our computers using floppy disks. So one kind of... You guys are so young, so you don't probably have this kind of nostalgia, but one floppy disk could fit about one point four megabytes of data. And the current models, before they start degrading in quality, that's I-"
  },
  {
    "startMs": 391920,
    "text": "in my opinion, around three hundred and fifty thousand tokens. So that's one floppy disk of data, right? Um, so you need retrieval in order to, um, to fetch the information that you actually need to put into the context window. And BrowseComp+ really demonstrate how, uh, retrieval quality affects the end-to-end accuracy of the task, right? The end-to-end accuracy here is essentially, is the model equipped with this"
  },
  {
    "startMs": 421760,
    "text": "search tool able to answer the question, right, the riddle-like question? And if you artificially just stuff the evidence documents that is needed to answer this question into the context window of the model, the accuracy is really high, right? So reasoning is not the bottleneck. The model, given the evid-evidence up front, answers the question with a very high accuracy rate, even GPT-4."
  },
  {
    "startMs": 453080,
    "text": "Um, but if you expose the model with the harness, with a retrieval tool, uh, that accuracy falls because it now depends on the harness, it depends on the model's ability to formulate queries, and the retrieval quality of the retriever. Um, so for me, this is also quite important because even if we get perfect models, like models that are kind of AGI, you don't have to append, \"Make no mistakes,\" you still will be limited to a context window that"
  },
  {
    "startMs": 483040,
    "text": "is approximately a floppy disk, right? So you have to decide what goes into that context window, and I think retrieval is still very relevant as the previous slide showed."
  },
  {
    "startMs": 494200,
    "text": "And in this BrowseComp+ data set, one of these riddle-like questions become a search trajectory because the model execute the query, gets some response back, reads it, reformulates the query, and continues until it has kind of filled up the context window or found the answer, whatever comes first."
  },
  {
    "startMs": 517100,
    "text": "And we spent some time to investigate these trajectories, uh, to see how GPT-5 is formulating queries, and we found a lot of interesting aspects with that. Uh, we described it in a recent blog post as well. You can find it on Hornet.dev. And we like to compare it with, uh, AOL query logs. So AOL, AOL was like a service back in the day, had some"
  },
  {
    "startMs": 547140,
    "text": "search interface, and they accidentally published, um, a very large sample of what people were searching for on the web, and they were quite short. And I have seen more recent query logs as well, and the user-human pattern are still searching with just a few terms. GPT-5, on the other hand, it's a much more powerful user. It has the general knowledge, and it can like, bam, write out very long queries. It can use"
  },
  {
    "startMs": 577140,
    "text": "a lot of syntax operators that are kind of useful from... It has learned from web search or site operator phrases, et cetera. And this is a new type of workload."
  },
  {
    "startMs": 592500,
    "text": "And on BM25. BM25 has essentially two hyperparameters that controls various aspects of the scoring function. And I talked about having a baseline, and BM25 was usually a baseline, and BrowseComp+ as well has a baseline with BM25, but it turns out that that baseline is terrible. So when you look at fancier techniques, embedding models, what have you, um, it stands out"
  },
  {
    "startMs": 622500,
    "text": "as a much better retrieval paradigm than BM25 if you look at the or-original paper. But more recent research shows that the parameters that were used in the BrowseComp+ research paper was not really adequate to handle these kind of long documents. So I like this, \"Which BM25 do you mean?\" Uh, because it has a quite dramatic impact on that specific benchmarks on the overall accuracy."
  },
  {
    "startMs": 650940,
    "text": "And why is BM25 now more powerful with the new user? So I mentioned the general knowledge of the user and that he can type faster and more, be more specific as a more powerful user. And exact matching is still relevant, right? Because the model knows names, entities, uh, zip codes, uh, SKUs, what have you, that is not so easy to represent with an embedding model which kind of encodes all the tokens into a fixed vocabulary."
  },
  {
    "startMs": 681600,
    "text": "Uh, it's also relatively cheap, especially if you take into consideration the cost of doing embedding inference, right? Some of these embedding models have like eight billion parameters, and you encode text, and you have to stand up infrastructure for this and what have you. So it's quite simple, and also the tooling, uh, in the overall ecosystem is quite good. Um, so it's, it's readily available. And it's also very easy for the model to inspect the results and understand why a certain query"
  },
  {
    "startMs": 711420,
    "text": "formulation returned the result it did, right? Because you're matching literal terms and phrases and things like that, which can hi- help it kind of reformulate the query. So these are the three key things. And now into more hot topics on, like, what is all you need. Um, and this is a very recent research that came out from Waterloo, from Jimmy Lin's group up there. They are doing a great job at the information retrieval research and"
  },
  {
    "startMs": 741444,
    "text": "also on agentic search. They have a recent paper that I love. Uh, it's called Scaling Direct Corpus Interaction via Dynamic Workspace Expansion. So I'll spend some time on expanding this. So imagine you want to stand up web search infrastructure for agents. A lot of companies are doing that at the moment. We are also working with some of these companies to help them build infrastructure for powering that kind of use case. And there you have potentially billions of documents,"
  },
  {
    "startMs": 772604,
    "text": "right? So that doesn't fit into the context window, so you obviously need retrieval, and BM25 is a good baseline. So you can retrieve information over that, and the results of this is, um, you can imagine this as a search engine result per page, SERP, for agents because you can place these documents that are retrieved from the retriever into a workspace. And if you"
  },
  {
    "startMs": 802324,
    "text": "organize this workspace as a file system, you can, uh, play into the same things that you have around skills. You can have progressive disclosure because you can have the document, like the title of the document and a small snippet of the document, and expose that to the model, and the model can then also decide, \"Oh, I need to read more of the document.\" And when it's doing that, it can use all the primitive tools that it's really good at using. You all use coding agents, so you all seen grep, and ripgrep, and sed,"
  },
  {
    "startMs": 832384,
    "text": "and awk, and whatever it's doing to kind of manage context. So here you get the benefits of both worlds, and also you get to combine sandbox infrastructure, retrieval infrastructure, so, and VFS, and just Bash, and whatever. So it's also quite exciting, right? Because it combines all of these new type of paradigms that is happening at the moment. So I'm really excited about this type of direction. And it's also kind of a hack, right? To optimize for what the models are good at at the moment, right? Because all the frontier LLM companies are"
  },
  {
    "startMs": 862084,
    "text": "optimizing their model for co- for coding, for Bash, for tool use. So if you put your kind of end-to-end task on the trajectory of that, you kind of, whatever, there's a new model, you know there's gonna be better at this as well, right? Right. So might be that when we get AGI, they can just use the browser. We'll see. But currently, this is a very powerful way to, to build, uh, retrieval infrastructure and a whole agentic search experience."
  },
  {
    "startMs": 893364,
    "text": "And when it comes to evaluation, right? I talked about this earlier as well. In traditional information retrieval, we were used to having just one query, one ranked list, compute nDCG, and compare it. That is no longer very relevant when the new user is a agent, because that agent can reformulate queries and do more queries and do expansion and all, all kinds of different stuff, right? So a lot of the classical information retrieval evaluation is now kind of dead."
  },
  {
    "startMs": 923804,
    "text": "Instead, look at, like, see if the model can perform the task it's, it's set to. And for example, for question answering, does it get the answer right?"
  },
  {
    "startMs": 935684,
    "text": "And we at Hornet, we are betting on BM25 as one of the primitives, and we have set out on a vision to kind of have the best, most efficient way to evaluate, uh, BM25, because I think it's such a strong, fundamental primitive. And this illustration compares some anonymized engines comparing with Hornet on the same type of, um, same type of hardware with, um, web documents, hundred"
  },
  {
    "startMs": 965664,
    "text": "million web documents on a single node. And as you can see, Hornet has a much more efficient implementation than the other engines and can do more throughput for the same type of bucks, which for a lot of companies that are building infrastructure at the moment for web search, et cetera, means a lot in savings. What is the Y-axis? The Y-axis is QPS. Sorry."
  },
  {
    "startMs": 993044,
    "text": "What's the X-axis? The Y-axis is... Oh, sorry. The Y-axis is latency. I'm sorry."
  },
  {
    "startMs": 1000424,
    "text": "So four claims to take away from this talk. There's a new user. It's more powerful. It's able to type faster. It's able to read faster. It's able to reformulate queries, and it has a lot of general knowledge, which makes simple tools like grep and BM25 more powerful."
  },
  {
    "startMs": 1023424,
    "text": "That's number one. Number two, which BM25 do you mean? Uh, there are differences in implementation, in performance, in parameters, so think about that. And also, why is it effective for agentic search? It's simply because it's explainable for the model, so the model can see and also use it in combination with grep, right? Because you have literal matches, and grep is almost about literal matches as well. And the combination of these two is a very"
  },
  {
    "startMs": 1053004,
    "text": "strong agentic search or agentic retrieval paradigm."
  },
  {
    "startMs": 1059644,
    "text": "There's a lot of references. I think I will publish a talk, uh, or the talk will be published and also the, the slides. And if you hated it, you can, uh, tweet at me."
  },
  {
    "startMs": 1075624,
    "text": "Um, there is not, I was told that there's not a room for, for questions, but happy to chat about retrieval. You will find me around the conference. Uh, probably best way to reach me is through my X account, and that's it."
  }
]
