Topic

Semantic Analysis

All digests tagged Semantic Analysis

The Data Context Layer for Agents — Yoni Michael & Brandon Callender, Typedef thumbnail

· 1:46:21

The Data Context Layer for Agents — Yoni Michael & Brandon Callender, Typedef

This technical workshop details the necessity and implementation of a 'Context Layer' for empowering AI agents to operate reliably within complex data and code systems. The core argument is that model capability is not the bottleneck; rather, the lack of structured, queryable context leads to failure. For data systems, the layer computes lineage, grain, and join safety to ensure agents understand the true meaning of data, even when SQL compiles. For codebases, it builds a traversible graph of symbols and relationships, moving beyond ambiguous text search (`grep`) to provide deterministic, reliable context for code agents.

Key takeaways

  1. The Context Gap: Beyond Syntax 10:29

    Agents fail not because they can't write SQL or code, but because they lack semantic understanding. For data, valid SQL is insufficient if the agent doesn't know the data's 'grain' (what one row represents) or if an upstream change alters the metric's meaning. For code, text search is ambiguous; a graph is required to resolve symbol identities and dependencies.

  2. The Four Facts of Data Context 15:02

    To enable reliable data agents, the context layer must compute and expose four key facts: 1) The data grain (what a row represents); 2) Join safety (preventing unintended row multiplication); 3) Metric dependencies (understanding what relates to what); and 4) Model relationships (clustering assets into business domains).

  3. Deterministic Context Engineering 20:00

    The most reliable context is derived deterministically. The process involves parsing transformation logic (e.g., `dbt` project) down to the AST, verifying join safety by profiling tables, and using LLMs only for summarizing or resolving ambiguity, keeping the core facts tied to the implementation itself.

  4. Evaluation is Paramount (Evals) 28:20

    Building reliable agents requires rigorous evaluation. Benchmarks must measure determinism and consistency (Pass@K) across multiple runs, not just single-shot accuracy. The goal is to prove that the new context layer significantly improves the agent's ability to maintain correctness and consistency over time.

Watch on YouTube Full article