Text2SQL Agent Prototype and Access Checks
The prototype takes a natural-language data question, checks whether it needs clarification, retrieves the schema, and generates candidate SQL. It validates the query before using a read-only database account and presenting the results.
My contribution
I built on a shared training-program LangGraph workflow and tightened SQL validation to allow a single read-only query. Execution stops when the validator is unavailable. The database account can only read the sample tables.
Verified query safeguards
- 11 of 11 offline safety tests passed. They cover valid read-only queries and blocked requests such as multiple statements, writes, and system-table access.
- 2 of 2 local MySQL permission tests passed. A customer and order aggregation returned the expected result. The database rejected a direct DELETE issued by the read-only account.
These checks cover a local sample database. SQL generation accuracy and end-to-end task completion from natural-language inputs remain unverified.
Schema evaluation
A separate experiment compares two schema selection strategies against fixed reference SQL. It checks required columns, join paths, permission limits, and known failures.
Try the schema evaluation ↗