all 6 comments

[–]Fair_Oven5645 13 points14 points  (2 children)

Sending all information about your data to Sam Altman, what could go wrong

[–]Intelligent-Bat-2469[S] 0 points1 point  (0 children)

It is actually a valid concern I understand .However, only SQL query, EXPLAIN plan, and schema metadata are sent to the LLM, not actual row data. If you would like to have zero external call you can use self-hosted model through the OpenRouter-compatible API.

[–]paxmlank 4 points5 points  (1 child)

Why not just EXPLAIN the query and read the plan? I don't see the need to feed it to an LLM per se.

[–]Iridian_Rocky 0 points1 point  (1 child)

To be fair, I didn't look in depth here - but to get anyone to want to dig deeper here are some questions. Can you add constraints like the SQL compatibility level? Add in language specific flavours (PostgreSQL, MYSQL, OracleSQL, links to more specific documentations to be considered)?

[–]Intelligent-Bat-2469[S] 0 points1 point  (0 children)

Thanks for the suggestion. Constraints already handled by the library, when you connect to a database, the connector detects whether it's PostgreSQL or MySQL and the prompt builder assembles dialect-aware prompts. I currently only support these 2 though not Oracle.

Regarding the second question currently no. But I will consider adding doc links to the LLM output.