Topic

Semantic Layering

All digests tagged Semantic Layering

· 21:37

Let's integrate AI Agents in Event-Sourced Systems — Divakar Kumar, FlyersSoft

The presentation outlines an advanced architectural pattern for integrating AI agents into existing enterprise systems, specifically targeting real-time fraud detection. Instead of replacing established Rule-Based Engines or ML models, the approach layers agentic intelligence to resolve 'gray zone' transactions—cases where current deterministic systems lack sufficient context. The architecture leverages Event Sourcing and Domain-Driven Design (DDD) principles by building a centralized semantic layer that aggregates data from multiple bounded contexts (e.g., Transaction, Device, Account). Agents then consume this enriched context via an orchestration layer in a saga pattern to reach a final verdict.

Key takeaways

  1. AI Agents Augment, Not Replace, Existing Systems

    The primary value of AI agents is not replacing existing systems (like rule-based or ML engines) but rather adding an agentic layer to handle ambiguous cases—the 'gray zone' where current models lack necessary context. The goal is to enhance business workflows using the state and history already captured by event sourcing.

  2. Context Aggregation via Semantic Layer 17:37

    To provide sufficient context for agents, data from disparate bounded contexts (Transaction, Device, Account, Payment) must be aggregated into a semantic layer or materialized view. This is achieved by propagating domain events using Change Data Capture (CDC) mechanisms or message brokers.

  3. Saga Orchestration and Agentic Decision Making

    The system uses an orchestration layer to manage the process. This layer employs a fan-out pattern, sending events simultaneously to multiple specialized agents (e.g., Risk Analyzer Agent, Behavior Analyzer Agent). A final Verdict Agent then analyzes these responses to reach a consensus event.

Watch on YouTube Full article

· 1:59:10

AI on Your Lakehouse: Context Comes in Shapes, Not Queries — Zach Blumenfeld, Neo4j

The presentation introduces a methodology for enhancing AI agent capabilities when querying large lakehouse environments (BigQuery, Databricks, Snowflake). The core argument is that standard vector search or Text2SQL methods often fail due to insufficient global context. The solution involves building three reusable 'graph shapes'—Trees, Communities, and Connections—on top of the data metadata using Neo4j. These shapes create a semantic layer that allows agents to understand complex relationships, patterns, and document hierarchies, enabling them to answer high-level, estate-wide questions.

Key takeaways

  1. Context is in Shapes, Not Queries

    AI agents need more than just data access; they require a structured understanding of how data elements relate. Graph shapes provide this necessary context to prevent the agent from being 'confidently wrong' when dealing with massive datasets.

  2. The Three Core Shapes 10:25

    1) **Trees (Table of Contents):** Provides a containment tree structure for unstructured data, allowing agents to navigate document hierarchies and sections. 2) **Communities (Themes):** Surfaces global, unknown patterns by clustering highly interconnected nodes using algorithms like Leiden. 3) **Connections (Semantic Layer):** Builds a metadata graph over structured warehouse schemas, guiding the agent on how tables join without requiring full ETL.

  3. Agentic Workflow and Tooling 25:00

    The process relies heavily on agents (e.g., Claude Code) utilizing specialized tools like the NeoForj CLY, which allows the agent to write custom Cypher queries based on the provided graph schema/specs.

Watch on YouTube Full article