Adding LLM Descriptions to 1,245 Database Tables Made Search Retrieval Worse
A developer catalogued a 1,245-object database schema by generating LLM descriptions for every table, expecting improved search retrieval, but instead saw recall drop significantly. The problem stemmed from BM25 scoring mechanics: when a term like 'contact' appears in over 1,000 of 1,245 documents, its inverse document frequency collapses to near zero, stripping it of ranking power. Compounding this, BM25's length normalisation penalised the most important tables — which naturally have the most columns — pushing them further down rankings. Attempts to fix this by down-weighting prose fields helped marginally but sacrificed retrieval of rare, valuable terms like obscure view names. The author's solution was to maintain three separate BM25 indexes — one for identifiers, one for prose descriptions, and one combined — then fuse their rankings using reciprocal rank fusion.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in