Skip to content

Persistent Learning

NeuBird gets smarter the more you use it. It accumulates two types of knowledge across sessions, stored locally in ~/.config/neubird/.


SQL Learnings

When a SQL query fails — for example, because a specific function isn't supported by your database's Foreign Data Wrapper — NeuBird saves a rule about what doesn't work. On subsequent sessions, these rules are injected into the system prompt so NeuBird avoids repeating the same mistakes.

Example: If SELECT date_trunc('hour', timestamp) fails on a particular FDW, NeuBird learns to use an alternative like date_trunc with a different syntax or a workaround. Next time it encounters a similar query, it gets it right on the first try.

Learnings are saved automatically when queries fail. View accumulated learnings with /learnings.


Table Learnings

At the end of each successful investigation, NeuBird records which tables contained the most useful data for that type of question. On future investigations, it can skip the schema exploration phase and go directly to the relevant tables.

Example: After investigating "What services have the highest error rates?", NeuBird learns that trace_grafana_tempo.service_map and log_grafana_loki.logs were the key tables. Next time someone asks about error rates, it queries those tables first instead of searching the entire schema.

Table learnings are saved automatically. A maximum of 50 entries are kept, with older entries rotated out.


How it improves over time

Session Behavior
First use Full schema exploration on every question. Some queries may fail on FDW limitations.
After a few sessions NeuBird skips known-bad SQL patterns. Starts going directly to useful tables for repeat investigation types.
Regular use Investigations are faster and more accurate. Schema exploration is minimal. FDW quirks are fully mapped.

Managing learnings

Command Description
/learnings View all accumulated SQL learnings
/reset Clear conversation history (does not clear learnings)

Learnings persist across sessions and are stored in ~/.config/neubird/learnings/ and ~/.config/neubird/table_learnings/. Delete these directories to reset all learned knowledge.