knowledge to the LearningMachine enables the Learned Knowledge store, where corrections live. decision_log=True records the reasoning behind each change. The agent accumulates corrections across runs and pulls the relevant ones into context on future questions.
The loop
- The agent writes SQL and runs it.
- It errors, or returns a number a human flags as wrong.
- The agent diagnoses the cause (wrong column, stale table, a join that double-counts).
- The fix is saved as a learning.
- The next similar question retrieves that learning before generating SQL.