Get the latest tech news
Getting AI to write good SQL
Learn about text-to-SQL techniques like context building and table retrieval, LLM-as-a-judge, and LLM prompting and post-processing.
But what happens when you move beyond this trivial example, and use Gemini for text-to-SQL against a real world database and on real-world user questions? Just like data analysts or engineers, LLMs need significant amounts of knowledge or "context" to generate accurate SQL. If the user is a technical analyst or a developer asking a vague question, giving them a reasonable, but perhaps not 100% correct SQL query is a good starting point.
Or read this on Hacker News