Search, Retrieval & RankingLevel: FoundationalStudy Battlecard

Okapi BM25

Probabilistic Information Retrieval with Term Saturation & Document Length Normalization

#Search#Inverted Index#BM25#Elasticsearch#Information Retrieval#Lucene
Choose Presentation Mode:
STAGE 1 / 7— Anti-Pattern
Section 1: The LLM Anti-Pattern vs Right-Sized Model
The Naive Generative LLM Approach:

Prompting an LLM with 200 documents in context to answer: "Which of these documents best mentions model number XJ-9042 and SKU 8812?".

Why It Fails in Production:

LLMs suffer from the "Lost in the Middle" phenomenon, hallucinate SKU digits, cost massive input tokens, and cannot scale past a few hundred documents.

Targeted Algorithm (Okapi BM25)
Latency:0.8ms (Lucene / Inverted Index)
Cost / 1M Ops:$0.00
Determinism:100% Exact Keyword Match
Generative LLM Alternative
Latency:3,000ms
Cost / 1M Ops:$15,000
Determinism:Hallucinated Product Numbers