Blog

How to Do Data Modeling for AI Agents: 8 Practical Rules

nao · April 1, 2026 · 3 min read

Originally published on the nao blog

Why traditional modeling patterns break for AI agents

Most data models were designed for humans, which made sense for BI dashboards and analyst workflows. However, “an analytics agent is not a human analyst.”

Human-first modeling typically prefers:

  • Fewer, wider concepts
  • Hidden intermediate logic
  • Semantic shortcuts optimized for manual exploration

Agent-first modeling requires the opposite:

  • Explicit fields for business meaning
  • Lower ambiguity at column level
  • Minimal derivation required at query time

“Agents do best when the model says exactly what it means.”

Rule 1: Optimize for precision, not elegance

A model that feels elegant to humans can be under-specified for an analytics agent. For example, a single status field mixing lifecycle, billing, and fulfillment states is readable in a dashboard but ambiguous for an agent.

Instead, split meaning into:

  • lifecycle_status
  • billing_status
  • fulfillment_status

“The model becomes more verbose, but far more reliable.”

Rule 2: Keep derivations in the model, not in the prompt

If a business metric requires logic, define it in SQL models, not ad hoc instructions. In practice:

  • Create explicit metric-ready columns in your curated layer
  • Avoid asking the agent to infer logic from raw columns
  • Document formulas in dbt descriptions so they are queryable context

“If your team is still maturing this layer,” reference materials on dbt setup and data stack architecture can help.

Rule 3: Prefer explicit columns over compressed abstractions

For human readers, abstraction reduces cognitive load. For an analytics agent, abstraction can remove signal.

A common mistake is collapsing many useful dimensions into one pre-aggregated table and dropping original explanatory fields. “The agent can answer fewer question variants and fails on edge cases.”

As a default, keep high-value dimensions explicit unless there is a clear cost reason not to.

Rule 4: Model grain and time semantics explicitly

Agents frequently fail on time windows and entity grain mismatches. Reduce failure by using clear modeling patterns:

  • One stable grain per fact table
  • Explicit timestamp semantics (created_at, booked_at, paid_at)
  • Explicit date helper fields (order_date, order_week, order_month)
  • Clear timezone policy in documentation

“When grain is unclear, the agent guesses joins and aggregations.”

Rule 5: Use naming conventions that encode intent

Naming is a modeling interface for the model. Choose names that reduce ambiguity:

  • is_refunded instead of refund_flag
  • net_revenue_usd instead of revenue
  • customer_first_paid_at instead of start_date

“These naming decisions compound across your analytics agent performance.”

Rule 6: Add “decision columns,” not only reporting columns

Human BI emphasizes reporting outputs. Analytics agents need decision-friendly context fields that explain why a number changes:

  • Lifecycle transition columns
  • Attribution flags
  • Quality status fields
  • Source-system provenance columns

“These fields increase column count, but they reduce reasoning errors.”

Rule 7: Model for join reliability first

Many wrong answers come from wrong joins, not wrong arithmetic. Your agent-ready model should make joins hard to misuse:

  • Consistent primary key naming
  • Explicit foreign keys in curated models
  • Bridge tables where many-to-many is expected
  • Docstrings that call out safe join paths

“Treat join clarity as a product requirement for chat with data.”

Rule 8: Test the model with real agent questions

Do not stop at SQL correctness tests. Add question-driven evaluation:

  • Pick 30 to 50 real stakeholder prompts
  • Define expected result tables
  • Run the same set after every model or context change

“This closes the loop between data modeling and agent behavior.”

A simple architecture that works

For most teams, a robust baseline includes:

  • Raw and staging models for ingestion cleanup
  • Curated fact and dimension models with explicit semantics
  • dbt documentation and tests as context inputs
  • Evaluation harness tied to business questions
  • Open source tooling where transparency and control matter

Final takeaway

“With humans, we often simplify models for readability. With AI agents, you should simplify ambiguity, not structure.”

More explicit fields, clearer grain, and better documented semantics usually beat minimalist modeling every time. Precision-first data modeling is the foundation for trustworthy chat with data.

This article was first published on the nao blog. Read it at the source for the latest version.