How to retrieve relevant columns from 100+-column tables in a Text-to-SQL agent

Beginning_Letter3742 · reddit · 2026-11-27

A developer building a Text-to-SQL agent for executives describes the column-selection challenge: some tables have 100+ columns, and since they can't predict every possible question, they can't permanently exclude any column—yet passing all columns bloats context and adds noise.

Proposed approach: semantic column retrieval

Open concerns

Original post →

More from coding & agent

coding & agent channel →