learning=True enables capture and recall. 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.
Choose how learning happens
Each store takes a mode. For a data agent, you usually want errors captured automatically and schema changes proposed for review.| Mode | Behavior | Use for |
|---|---|---|
ALWAYS | Capture runs automatically after each response | Query-error corrections |
AGENTIC | The agent decides what is worth saving | Nuanced domain insights |
PROPOSE | The agent proposes, a human approves before it persists | Anything that changes how numbers are computed |
Audit what it learned
A data agent’s learnings change the numbers it reports, so they need to be inspectable. Read the Learned Knowledge store to see the corrections it captured, and the Decision Log for the reasoning behind a changed query shape.| Store | Why a data agent wants it |
|---|---|
| Learned Knowledge | Corrections that transfer across users |
| Decision Log | An audit trail of why a query shape changed |
Next steps
| Task | Guide |
|---|---|
| Feed it curated context too | Grounding in context |
| Gate writes behind approval | Safe data access |