Show HN: Text-to-SQL says "no records found" when it should say "denied" (github.com)

🤖 AI Summary
A new tool, SchemaGate, has been announced to enhance the process of converting natural language queries into SQL, specifically addressing issues related to data access and cost efficiency. Unlike traditional text-to-SQL models that expose all tables to users regardless of their permissions, SchemaGate intelligently restricts the schema presented to the model based on user roles before any SQL is generated. For example, if a user does not have payroll access, SchemaGate will exclude any related tables from the prompt, effectively preventing misleading "no records found" responses. This implementation is significant for the AI/ML community because it not only reduces the potential for incorrect conclusions drawn from securely filtered data but also optimizes costs associated with model calls. By ensuring only the relevant tables are included in queries, it can drastically lower token usage—by up to 97% in some test schemas—leading to substantial savings for organizations processing numerous queries daily. SchemaGate's browser-based demo, which requires no installation and operates solely against a bundled schema, makes it highly accessible for testing and integration, emphasizing its practical applicability in real-world database environments.
Loading comments...
loading comments...