Loadingโฆ
Loadingโฆ
Practical articles and engineering guides about SQL + AI.
Build an MCP server in C#: read-only SQL Server tools, a T-SQL parser gate, cost and row limits, and setup for Claude Desktop, VS Code and Claude Code.
Read article โHow to prevent SQL injection in AI-generated SQL: a least-privilege database user, a real T-SQL parser with an allow-list, cost limits, safe tool queries and a prompt that is never the security boundary. With code for ASP.NET Core and SQL Server.
Read article โBuild Text-to-SQL in C# for SQL Server: least-privilege execution, schema-aware prompts, ScriptDom validation and a repair loop. 53% to 88%, same model.
Read article โThe baseline every Text-to-SQL demo starts from โ table names in, SQL out โ measured against 32 real questions. 53% correct, seven silently wrong answers, and an UPDATE and a DROP TABLE sent to the database.
Read article โGive the model what a human analyst would look at โ types, keys, join paths, column descriptions, allowed values, business rules โ as annotated DDL. Accuracy goes from 53% to 81%, and unsafe SQL executed drops to zero.
Read article โTreat model-generated SQL as untrusted input: parse it with Microsoft's ScriptDom, check it against an allow-list and the real schema, estimate its cost, and feed exact errors back for repair. 88% correct, zero failures, zero unsafe SQL.
Read article โValid, safe SQL can still answer the wrong question. V4 retrieves a versioned business glossary from Qdrant โ term match plus dense search โ and lifts held-out accuracy from 50% to 75%.
Read article โGive the agent tools to inspect tables, search the glossary, sample values and test queries. Measured honestly: a pure agent scores 42% held-out, the model rarely calls a tool when it has context, and it rubber-stamps its own wrong answers.
Read article โOpenTelemetry traces and metrics across the whole pipeline, an audit log in a separate database, and a hardened container. Then a 132-question workload: the model is 96% of the time, and the first trace found a 2-second IPv6 localhost penalty on every new connection.
Read article โ