Natural-Language Data Analyst
Ask SQLite questions in plain language, with Jev checking proposed SQL before execution.
Ask SQLite questions in plain language, with Jev checking proposed SQL before execution.
Before executing a proposed SQLite SELECT, the agent sends Jev the user's question, the validated SQL, and the inspected database schema. Jev returns a Choice verdict of relevant or mismatch and a Choice issue: none, wrong_metric, wrong_filter, wrong_grouping, or wrong_entities. The review is actionable only for a confident mismatch with a specific issue; an actionable review blocks execution. Low-confidence, inconsistent, or unavailable reviews do not become an actionable block.
Judge whether the SQL metric, filters, grouping, entities, and requested detail match the question and schema.
The state passed to Jev has question, sql, and databaseSchema fields. The code supplies two questions over that state.
Choose the single most important mismatch, or none.
The state passed to Jev has question, sql, and databaseSchema fields. The code supplies two questions over that state.
The run_sql tool validates the proposed SQL, binds it to the current user question and database, and inspects the selected database schema.
The tool calls reviewSqlRelevance with the question, safe SQL, and schema. A confident mismatch with a specific issue is marked actionable and blocks the query.
When the review is not actionable, the tool runs the read-only query and returns rows plus the review. The tool also enforces approval for broad queries without a WHERE filter and caps returned rows.
The project places a bounded semantic check directly before a real query execution step. It names common ways generated SQL can diverge from the user's request and makes confidence and inconsistent answers explicit in the review result.