Discussion about this post

User's avatar
Qing Ye's avatar

The three-gap framing, connectivity, semantic, and institutional, is the cleanest articulation of this problem I've seen. It also maps surprisingly well to what's enforceable in code:

- Connectivity gap → an allowlist of tables/columns the agent may query, checked at query time (not just in the prompt).

- Semantic gap → metric definitions sourced from dbt or Cube so the agent answers "revenue" the same way the BI layer does.

- Institutional gap → forbidden operations, row-level filters, and resource limits encoded as YAML and version-controlled alongside the rest of the stack.

I've been building exactly this as an open-source library — YAML-first contracts validated via sqlglot + EXPLAIN dry-runs before a query ever hits the warehouse: https://github.com/flyersworder/agentic-data-contracts

Your line about "versioning organizational context like code" is essentially the design thesis. Would love your take on whether the three gaps feel exhaustive in practice, or if there's a fourth one lurking.

Kevin S's avatar

More and more people are realizing this by the day.

Thanks for calling it out, Vivek.

Once the challenge is acknowledged, it can be addressed.

1 more comment...

No posts

Ready for more?