WhoBuilt

Information Retrieval from the Ground Up

Jul 27, 2025· 1 h 48 min· 5.6K views·Watch on YouTube

Speaker

Philipp Krenn of Elastic gives a hands-on AI Engineer session on information retrieval, from lexical search to vectors and hybrid ranking.

How lexical search works

Krenn shows how tokenization and analysis prepare text for retrieval, using “These are not the droids you're looking for.” as an example. Lowercasing, stop word removal, and stemming turn the phrase into searchable tokens, while token positions support phrase queries and offsets support highlighting.

Trade-offs in keyword search

An inverted index maps terms to documents and their positions, making exact matches fast. Krenn demonstrates phrase search, slop, fuzziness, stemming, and n-grams, explaining that these tools can help with variation but may produce surprises or increase storage and query costs. BM25 ranks matches using term frequency, term rarity, and field length; its scores are for ordering results within a query, not percentages.

Dense and sparse retrieval

Krenn compares dense embeddings, which represent text as floating-point vectors, with learned sparse representations such as SPLADE, which expand text into weighted terms. In his three-document demo, dense search returns a result for every query, even when matches are weak, while the small 128-dimension model gives closely ranked results. He stresses that model quality and relevance need evaluation against the actual data and queries.

Combining retrieval methods

Krenn maps lexical search, dense and sparse retrieval, hard filters, and ranking signals such as product ratings or margin. He describes hybrid search as combining retrieval approaches, with reciprocal rank fusion blending result positions when the systems' scores are difficult to compare. Reranking can apply a more expensive method to an initial candidate set.

Evaluate for the use case

Krenn says vector search alone may miss exact terms such as brand names, while hybrid search can combine exact matching with semantic retrieval. The right balance depends on the domain: an e-commerce site may prefer returning somewhat related products, while legal case search may require stricter relevance. Evaluation can use a human-rated dataset, user click behavior, or LLM-assisted review.

Takeaways

  • Treat vector search as one retrieval option; combine it with keyword search when exact terms matter.
  • Choose analyzers and tokenizers for the language and data, since ingestion choices shape what queries can find.
  • Use BM25 scores to rank results within a query, not as comparable relevance percentages.
  • Evaluate embedding models on representative queries and documents; vector search can return weak matches as well as strong ones.
  • Set retrieval and reranking behavior around the consequences of a bad or empty result in your domain.

Mentioned in this talk

Search inside this talk

What was claimed 6

Related talks