You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 29, 2026. It is now read-only.
When the LLM generates SQL and executes it successfully, save_question_tool_args
is called automatically — even if the result is semantically wrong.
A query can execute without any SQL error but still return incorrect data
(e.g. summing order_count instead of revenue). This incorrect behavior
gets saved to Tool Memory and reused for all future similar questions,
reinforcing errors over time.
Steps to Reproduce
Ask a question that generates new SQL
The SQL executes without error but returns incorrect data
save_question_tool_args is called automatically
Ask a similar question → the wrong SQL is retrieved and reused
Expected Behavior
SQL should only be saved to Tool Memory after a human confirms the result is correct.
Proposed Fix
Add an optional require_human_approval_for_memory flag.
When enabled, show a "👍 Save to memory" button and only persist
the SQL after explicit user approval.
Bug Description
When the LLM generates SQL and executes it successfully,
save_question_tool_argsis called automatically — even if the result is semantically wrong.
A query can execute without any SQL error but still return incorrect data
(e.g. summing
order_countinstead ofrevenue). This incorrect behaviorgets saved to Tool Memory and reused for all future similar questions,
reinforcing errors over time.
Steps to Reproduce
save_question_tool_argsis called automaticallyExpected Behavior
SQL should only be saved to Tool Memory after a human confirms the result is correct.
Proposed Fix
Add an optional
require_human_approval_for_memoryflag.When enabled, show a "👍 Save to memory" button and only persist
the SQL after explicit user approval.