DevTrends开发者趋势
主题色

shrsv /

dbctx

Hi HN, I've been finding increasing need for helping our users chat with the underlying application data in postgresql directly using LLMs, visualize results and so on. A major obstacle to this is -- traditional sql…

DT数据与运维DT命令行工具DT库 / SDKDT终端

关于

Hi HN, I've been finding increasing need for helping our users chat with the underlying application data in postgresql directly using LLMs, visualize results and so on. A major obstacle to this is -- traditional sql schema doesn't contain enough information for an LLM to easily query things in one shot. For example, traditional schema doesn't say what is the expected/allowed value set in a state field, or what are the paths available embedded in a jsonb field. Also -- given a user query -- only a small fraction of the whole schema is relevant for an LLM to construct SQL queries. So filtering parts of schema relevant to construct a prompt is important. dbctx solves all these by inspecting a postgresql database and turning the results into an sqlite backed ".dtx" file. You can pass your natural language query to dtx, and get relevant tables in a compressed schema format along with field/json intelligence embedded in it. This leads to much better responses from the LLM from the getgo. I have a CLI, library and tiny UI embedded in a single go binary. Do give it a go, and any feedback welcome.

收录记录

  1. Show HN

    2026年8月11日 · 1 次收录

讨论这个产品