Blog · RSS
Blog
Notes from the NLQueries maintainers on natural language to SQL, the knowledge base, connectors and the MCP server.
-
Text-to-SQL, explained: how a question becomes a query, and where it goes wrong
How text-to-SQL works end to end: schema extraction, the knowledge base, generation, validation, execution and the one correction after a database error.
text-to-sql knowledge-base validation
-
How to build a text-to-SQL knowledge base from query history
Query history shows an LLM the joins and filters your team actually uses. How process-history and export-kb build it into the text-to-SQL knowledge base.
knowledge-base query-history postgresql snowflake bigquery
-
Letting an LLM query production safely: read-only roles, statement policy and timeouts
LLM database security is defence in depth: a read-only identity, a SQL statement policy, timeouts and result caps, and an authenticated MCP server.
security postgresql mcp
-
Text to SQL is not the hard part
Getting a language model to emit SQL is close to solved. Getting an organisation to trust the answer is not, and that needs different solutions.
text-to-sql trust validation
-
Why we validate SQL before it runs
The difference between a query that parses, a query that executes, and a query that answers the question. Three separate checks, and only one of them is free.
validation text-to-sql cli
-
Your query history knows what your schema does not
Schema introspection tells you a column is called status and holds a varchar. Years of queries tell you which joins and filters anyone actually uses.
query-history knowledge-base text-to-sql
-
The join problem
Single-table questions are easy. Most real questions are not, and when a join goes wrong the result is a plausible number rather than an error.
joins text-to-sql knowledge-base
-
How to evaluate a text-to-SQL system on your own data
Public leaderboard scores do not predict how a system will do on your warehouse. Here is the evaluation we would build if we were buying rather than selling.
evaluation text-to-sql