Semantic Integrity Constraints: Declarative Guardrails for AI-Augmented Data Processing Systems
Alexander W. Lee, Justin Chan, Michael Fu, Nicolas Kim, Akshay Mehta, Deepti Raghavan, Uğur Çetintemel · 2025
Read Semantic Integrity Constraints: Declarative Guardrails for AI-Augmented Data Processing Systems by Alexander W. Lee, Justin Chan, Michael Fu, Nicolas Kim, Akshay Mehta, Deepti Raghavan, Uğur Çetintemel (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-00600.txt.
Introduction
Alexander Lee and co-authors propose declarative guardrails for data systems that let language models touch the data. Their 2025 paper names the trust problem: model errors inside query pipelines block use in critical domains. Semantic integrity constraints extend classic database rules into the semantic realm.
Users declare correctness conditions over model output, like grounding, soundness, and exclusion. Enforcement runs in two modes, catching bad output after the fact or steering generation ahead of it. A system design folds the checks into query planning and runtime. Design goals span expressiveness, speed, integration, and enterprise scale. The authors frame the constraints as the audit layer that AI-augmented data systems need before serious deployment.
Catalog record
| CREATOR | Alexander W. Lee, Justin Chan, Michael Fu, Nicolas Kim, Akshay Mehta, Deepti Raghavan, Uğur Çetintemel |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 40 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-00600
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Semantic Integrity Constraints: Declarative Guardrails for AI-Augmented Data Processing Systems Alexander W. Lee, Justin Chan, Michael Fu, Nicolas Kim, Akshay Mehta, Deepti Raghavan, Uğur Çetintemel Abstract . AI-augmented data processing systems (DPSs) integrate large language models (LLMs) into query pipelines, allowing powerful semantic operations on structured and unstructured data. However, the reliability (a.k.a. trust) of these systems is fundamentally challenged by the potential for LLMs to produce errors, limiting their adoption in critical domains. To help address this reliability bottleneck, we introduce semantic integrity constraints (SICs) —a declarative abstraction for specifying and enforcing correctness conditions over LLM outputs in semantic queries. SICs generalize traditional database integrity constraints to semantic settings, supporting common types of constraints, such as grounding, soundness, and exclusion, with both reactive and proactive enforcement strategies. We argue that SICs provide a foundation for building reliable and auditable AI-augmented data systems. Specifically, we present a system design for integrating SICs into query planning and runtime execution and discuss its realization in AI-augmented DPSs. To guide and evaluate our vision, we outline several design goals—covering criteria around expressiveness, runtime semantics, integration, performance, and enterprise-scale applicability—and discuss how our framework addresses each, along with open research challenges. 1. Introduction Large language models (LLMs) have transformed the field of data management in the last couple of years, extending traditional systems with semantic processing capabilities over structured and unstructured data. In particular, several projects have integrated semantic operators into database and data flow systems by augmenting traditional operators with LLMs ( Patel et al., 2024 ; Anderson et al., 2025 ; Liu et al., 2025b ; Lu et al., 2025 ; Shankar et al., 2024a ; Dai et al., 2024 ; Wang and Li, 2025 ; Urban and Binnig, 2024 ; Russo et al., 2025 ; Agarwal and Huang, 2025 ; Madden et al., 2024 ) . We broadly refer to these systems as AI-augmented data processing systems (DPSs) . While AI-augmented DPSs introduce novel ways to process data, their use of LLMs lead to potential reliability issues that manifest into phenomena like hallucinations. These reliability issues hinder the adoption of AI-augmented DPSs in high-stakes sectors, such as healthcare, law, and finance. Without guardrails, it will be difficult to adopt these systems fully. LLM assertions have actively been explored for offline evaluations ( TruLens, 2021 ; Zheng et al., 2023 ; Shankar et al., 2024b ; Shankar et al., 2024c ; AI, 2023b ; Index, 2023 ) and runtime guardrails ( AI, 2023a ; Rebedea et al., 2023 ; Dong et al., 2024a ; Singhvi et al., 2024 ; Liu et al., 2024 ; Loula et al., 2025 ) . These assertions invoke custom code, ML classifiers, or LLM judges to check an LLM’s output with respect to various criteria. A related technique is constrained decoding, where constraints are applied during the LLM’s generation to ensure that the output adheres to a specified structure ( OpenAI, 2024 ; Dong et al., 2024b ; Willard and Louf, 2023 ; Zheng et al., 2024 ; Beurer-Kellner et al., 2023 ; guidance, 2022 ; Koo et al., 2024 ; Kuchnik et al., 2023 ) . While these approaches have proven their utility in enhancing LLM reliability, they are imperative and fragmented, limiting their usability. To address these limitations, we propose semantic integrity constraints (SICs) as a declarative, unified abstraction that extends traditional database integrity constraints to support AI-augmented DPSs. Unlike traditional integrity constraints that prevent invalid modifications to the database, SICs protect against erroneous outputs from semantic operators. Similar to their traditional counterparts, SICs make defining constraints for predominant use cases easy and more advanced cases possible, aligning with recent work that argues for specifications on LLM-based system components ( Stoica et al., 2024 ) . Table 1. Success criteria and design goals for SICs Success Criterion Description Expressiveness SICs support a range of constraint types—including domain, grounding, and soundness—through a declarative interface ( Section 3 ) Executable Semantics Each constraint has precise execution semantics—including what is checked, when it is enforced, and what actions are taken on failure—ensuring semantically consistent system behavior and predictable outcomes for users ( Section 4 ) System Integration SICs integrate with query interfaces, optimizers, and execution engines in AI-augmented DPSs ( Section 2 ) Performance Awareness Enforcement strategy is selected based on cost and reliability across reactive and proactive methods ( Section 4.2 ) Enterprise-Scale Applicability SICs support observability, reuse, and auditability across workflows, with mechanisms for conflict detection and policy-driven enforcement at organizational scale ( Sections 5 and 6 ) This paper presents our vision for SICs and sketches a general framework for integrating them into AI-augmented DPSs. To evaluate the feasibility and impact of this vision, we define a set of design goals and success criteria: (1) expressiveness , to capture a broad range of common constraint types; (2) executable semantics , with well-defined runtime behavior; (3) system integration , via seamless support within data flow and query processing pipelines; (4) performance-aware enforcement , balancing reliability and cost; and (5) enterprise-scale applicability , including observability, constraint reuse, conflict detection, and auditability. These criteria, outlined in Table 1 , were defined through our partnership with the Rhode Island Hospital. They guide our design and are reflected in the structure of the paper. Section 2 outlines the proposed system architecture. Section 3 introduces the SIC interface and categorizes SICs across key enforcement classes aligned with real-world LLM use cases. Section 4 explores enforcement strategies, spanning logical and physical planning, and outlines cost-aware mechanisms. Section 5 discusses observability components. Finally, Section 6 presents open challenges in large-scale constraint management. 2. System Architecture We begin with an overview of the system architecture ( Figure 1 ) for supporting SICs and defer a more detailed discussion of the core components to later sections. First, the user expresses their semantic query along with SICs via the query interface ( Section 3.1 ). This interface forwards the query’s text to the query parser , which produces a corresponding logical query plan. Next, the logical optimizer ( Section 4.1 ) applies logical rewrite rules to the initial plan, yielding an optimized logical plan. This plan is then passed to the physical optimizer ( Section 4.2 ), which considers different physical implementations of the plan and selects the optimal one. The resulting optimized physical plan is then executed by the execution engine . To enable performance monitoring, an observability stack is integrated with the execution engine ( Section 5 ). Finally, the constraint store recommends and analyzes SICs ( Section 6 ). 3. Constraint Specification We suggest defining SICs declaratively, allowing users to focus on constraint logic while the optimizer determines the best execution method. We outline the main components of our proposed interface and detail classes of constraints relevant to semantic data processing. Additional surveys should be conducted to ensure usability. 3.1. Interface To provide a unified interface for queries and SICs, users declare constraints in the query language. We present a relational interface that extends pipe SQL syntax ( Shute et al., 2024 ) with semantic operators (e.g., map, aggregate, filter, join, top- k ) and SICs; however, SICs are compatible with any declarative AI-augmented DPS. Declaring Constraints. SICs specify predicates either on generated