SShortSingh.
Back to feed

Adding LLM Descriptions to 1,245 Database Tables Made Search Retrieval Worse

0
·2 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Researcher Finds OpenSea Undocumented Server Leaking API Keys and Usernames

A security researcher discovered an undocumented MCP server at mcp.opensea.io/mcp while manually exploring OpenSea's internal tooling. Two exposed endpoints allowed anyone to generate a valid API key without authentication and then resolve any Ethereum wallet address linked to an OpenSea profile to its owner's username. The flaw raised serious privacy concerns, as pseudonymous wallet holders could potentially be identified and targeted through phishing or doxxing. Sensitive tools on the same server, such as order cancellation, were properly protected behind a wallet JWT, suggesting the exposure was limited to the discovery layer rather than a systemic architectural failure. The researcher reported the issue to OpenSea's Bugcrowd bug bounty program, where it currently awaits official severity triage.

0
ProgrammingDEV Community ·

Study finds all major text-to-SQL benchmarks ignore role-based access control

A new research paper titled 'Benchmarking Text-to-SQL under Role-Based Access Control' by Yang Fei and colleagues reveals that widely used benchmarks like Spider, BIRD, and LiveSQLBench evaluate AI systems without any user permission constraints. The researchers built a dataset spanning 53 databases, 399 tables, and over 21,500 role-annotated query instances with access policies defined at the individual column level. Testing existing text-to-SQL systems against this dataset showed significant performance degradation, with many generating SQL queries that are technically correct but violate access control rules — a category the paper terms 'RBAC-rejected' queries. The core problem identified is that standard AI pipelines apply database access controls only at query execution, meaning restricted tables and columns are still visible to the model during SQL generation. The paper argues that access control must be enforced earlier, at the schema-selection stage, so that restricted objects are never presented to the model at all.

0
ProgrammingDEV Community ·

YINI Syntax Highlighting Extension Hits v1.0.0 on VS Code Marketplace

The official YINI Syntax Highlighting extension for Visual Studio Code has reached version 1.0.0 and is now publicly available on the Visual Studio Marketplace. Published by yini-lang, the extension targets YINI Specification 1.0.0 RC 6 and brings syntax highlighting support for .yini configuration files within VS Code. It covers a range of syntax elements including sections, keys, values, strings, numbers, comments, lists, objects, and directives. Developers can install it directly from VS Code by searching for 'YINI Syntax Highlighting' in the extensions panel. The release is described as one part of the broader YINI ecosystem, aimed at making .yini files easier to read and work with during everyday development.

0
ProgrammingDEV Community ·

Decorator Pattern: How to Add Features to Objects Without Subclass Sprawl

The Decorator is a structural design pattern from the Gang of Four (GoF) catalog that lets developers add behavior to individual objects dynamically without modifying their source code or creating excessive subclasses. It works by wrapping the original object in additional layers that each contribute a single, focused responsibility, keeping code clean and modular. A DEV Community article explains the pattern using a Java example involving graphical components like buttons, borders, and shadows. The abstract decorator holds a reference to a base Component interface and calls the original behavior before appending new functionality, enabling runtime composition of behaviors. The pattern is recommended when inheritance feels too rigid and when multiple behavior combinations would otherwise require an unmanageable number of subclasses.