GitHub user musaabhasan added a comment to the discussion: [KPIP] Data Agent 
Engine — AI-Powered Autonomous Data Analysis for Kyuubi

The proposal is promising, but I would make the execution boundary very 
explicit before the engine becomes autonomous. A data agent that can inspect 
schemas, generate SQL, execute queries, and self-correct needs different 
controls from a stateless chat engine.

A few areas seem important for the first implementation:

- default to read-only execution, with write/DDL/DML disabled unless a 
deployment explicitly enables them;
- enforce row limits, timeouts, cost limits, and query complexity limits before 
execution;
- add a pre-execution SQL review layer that detects cross joins, unbounded 
scans, suspicious functions, and dialect-specific risky constructs;
- preserve an evidence trail: user question, schema context used, generated 
SQL, execution engine, result sample, verification outcome, and final answer;
- separate “answer confidence” from “query executed successfully”; a 
syntactically valid query can still answer the wrong business question.

For evaluation, BIRD-style accuracy is useful, but production readiness also 
needs safety metrics: prevented unsafe queries, empty-result recovery, 
join-error recovery, hallucinated-column rate, dialect error rate, and whether 
the final answer cites the SQL/results that support it.

The self-correction loop should also have a strict attempt budget. Otherwise 
the agent can turn one vague question into repeated expensive scans while 
trying to repair its own uncertainty.

GitHub link: 
https://github.com/apache/kyuubi/discussions/7373#discussioncomment-16860857

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to