Earlier quoted context omitted.
This is a very simple case that doesn’t reflect the complexity of a real project. Like so many attempts before to produce code, using a little effort, it degrades when the complexity level increases even slightly. Once there are more tables, ones that have names which cannot be easily translated from English, it breaks down quickly. These types of tools work ok for brand new projects, but work on existing projects wi…
Here's a more extreme example, using SQL as an API to give model access to game world state to reason about it. https://gist.github.com/int19h/4f5b98bcb9fab124d308efc19e530... Note that in this case it isn't even asked to write specific queries for specific tasks - it's just given one high-level task and the schema to work with. You're right, though, that the effectiveness of this approach depends very much on schema…
This may end up being a feature of some high level frameworks … “compatible with ChatGPT” or “designed to work with xxx LLM”.