AI Agents & Agentic Engineering
  • Context Engineering
  • Building AI Agents
  • Agentic Engineering Best Practices
  • Auto-Research and Self-Improving Agents
  • Self-Maintaining Agents
  • Scaling Long-Running Autonomous Coding
  • Data Agents
  • Agent Memory and Harness Ownership
LLM Internals & Training
  • Reinforcement Learning for LLMs
  • Cursor Composer 2
  • Training-Free GRPO
  • Prompt Repetition for Non-Reasoning LLMs
  • LLM Quantization
  • LLM Knowledge Bases
AI Safety & Security
  • Constitutional Classifiers
  • Project Glasswing
Graphics & Low-Level Programming
  • Shaders and GPU Programming
Personal Development & Mindset
  • Deep Focus and Productivity
  • Identity and Life Design
  • Self-Competition and Entrepreneurship

Data Agents

Data agents are AI systems that translate natural language questions into SQL queries, execute them, and deliver insights. They are grounded in layered context to avoid hallucination. OpenAI built one internally, and Ashpreet Bedi open-sourced a version called Dash that implements the same architecture.

Source: Ashpreet Bedi / Dash

The Problem

Most Text-to-SQL agents are stateless. They make mistakes, you fix them, and they make the same mistake again because every session starts fresh. Without context, even strong models hallucinate column names, miss type quirks, and ignore tribal knowledge.

Dash Architecture

Dash is a self-learning data agent that grounds answers in 6 layers of context and improves with every run.

The Six Layers of Context

See context-engineering for the broader theory. Dash implements these six layers:

  1. Table Usage: Schema, columns, relationships
  2. Human Annotations: Metrics, definitions, gotchas
  3. Query Patterns: SQL that's known to work
  4. Institutional Knowledge: External docs, research
  5. Memory: Error patterns, discovered fixes
  6. Runtime Context: Live schema when things change

The agent retrieves relevant context at runtime via hybrid search, generates grounded SQL, then uses results to deliver insights.

The Self-Learning Loop

Instead of fine-tuning or retraining, Dash learns through two complementary systems:

Static Knowledge: Validated queries, business context, table schemas, data quality notes, metric definitions, tribal knowledge, gotchas. Curated by the team and maintained alongside Dash. It also auto-updates successful queries as it discovers them.

Continuous Learning ("GPU-poor continuous learning"): Patterns Dash discovers through trial and error:

  • Columns named state in one table map to status in another
  • The team is preparing for an IPO, so S-1 metrics live in a separate dataset
  • "Revenue" means ARR not bookings
  • The board wants cohort retention broken out by enterprise vs SMB

Every learning becomes a data point that improves Dash. Implementation is simple: about 5 lines of configuration using a LearningMachine with agentic user profile, user memory, and learned knowledge.

Practical Setup

Dash ships as a Docker container with:

  • Sample F1 racing data (1950-2020)
  • Knowledge base (table metadata, validated queries, business rules)
  • Evaluation suite (string matching, LLM grading, golden SQL comparison)
  • UI via Agno (os.agno.com)

GitHub: github.com/agno-agi/dash

The Enterprise Case

"Data agents are one of the best enterprise use cases for AI right now. Every company (over a certain size) should have one." Vercel has d0, OpenAI built one internally, Dash makes it accessible to everyone.

Related Topics

  • context-engineering - The six layers of context in depth
  • llm-knowledge-bases - Karpathy's related approach to building persistent knowledge
  • auto-research - Self-improvement through experimentation loops