Skip to content
Hacker News · AI· arsh9745774·· 29 days agoSelectedAI score75

Schema-guard 发布:防止 AI 智能体在编写 SQL 时虚构列名

Schema-guard, stop AI agents from inventing column names in SQL

Not yet translated; shown in Chinese.

AI guide

开源工具 Schema-guard 正式发布,通过在代码仓库中保存表与列名的结构快照,在 AI 智能体执行或落盘 SQL 前自动校验并纠正虚构字段。该工具基于 sqlglot 解析 SQL,无需智能体直接连接数仓,支持 dbt、DuckDB、Postgres、Snowflake 及 Databricks 等数据源,并适配 Claude Code hook、MCP、pre-commit 与 CI。

Why it matters

工具通过在仓库中保存结构快照并拦截错误 SQL,解决了编码智能体依赖过时文档容易虚构字段的问题。

Source:Hacker News · AI · github.com