Sweep Thousands of Leases Using Amazon Quick and Adjudicated Query
A new architectural pattern combines conversational AI tools with a deterministic rules engine to evaluate large volumes of leases for regulatory compliance without sacrificing accuracy or auditability.

Tackling High-Volume Compliance Challenges
Checking tens of thousands of apartment leases against constantly changing state landlord-tenant laws has historically stretched compliance teams to their limits. When compliance teams handle small volumes, a paralegal can manually read through documents. However, past a certain threshold, the workload shifts to software, introducing a critical verification challenge. To address this, developers and engineers can look to artificial intelligence developments featured on the Artificial Intelligence blog for architectural inspiration.
To solve this issue, teams can implement a design pattern called Adjudicated Query. Business users interact through a chat interface using Amazon Quick, while all actual pass and fail decisions remain strictly within a deterministic, non-AI rules engine. This separation ensures that compliance outcomes are both provably complete and fully defensible during audits or regulatory examinations.

The Limitations of Traditional Search and RAG
Standard enterprise search tools and Retrieval-Augmented Generation (RAG) models address information accessibility gaps, but they fall short in high-stakes regulatory environments. Similarity search cannot guarantee that every single record in a massive dataset was evaluated, and ranked samples often omit crucial data points without leaving an audit trail. Furthermore, Text-to-SQL approaches carry category-level risks, such as a hallucinated predicate quietly reducing the active population while producing an exact-looking number.
The Adjudicated Query pattern overcomes these obstacles by using a bounded conversational layer over a deterministic rules engine. The language model's responsibilities are strictly limited to translating natural-language questions into calls on a fixed set of typed operations and narrating the returned results. It never writes custom database queries, alters the target population, or makes final compliance determinations.

Reference Architecture and Core Components
The reference architecture relies on several integrated AWS services to ensure security, scalability, and data integrity. Compliance officers interact with two primary surfaces within Amazon Quick: a chat agent for exploratory questions and an Amazon Quick Sight dashboard for browsing comprehensive result sets. Security and authentication are handled seamlessly through Amazon Cognito, which issues OAuth tokens via a client credentials flow.
Requests from the conversational layer pass through an Amazon API Gateway HTTP API that validates JSON Web Tokens before forwarding traffic to an AWS Lambda function. This function hosts both the Model Context Protocol (MCP) server and the underlying rule engine. Data persistence and rule storage are managed efficiently by Amazon Aurora Serverless v2, which connects directly to the system components to maintain a single source of truth.

Ensuring Completeness and Defensibility
Every compliance sweep executed through this architecture generates a formal completeness receipt. This mechanism asserts an invariant where the sum of compliant, in-breach, ambiguous, and unreadable records must equal the total scanned population. If a run fails to fully account for its population, it cannot finish, thereby eliminating the risk of silently skipped records.
Because the conversational surface displays summarized counts and compliance receipts while dashboards provide granular access to thousands of individual rows, users gain robust visibility without sacrificing performance. Developers interested in deploying this reference architecture can examine the sample repository provided by AWS to explore the complete infrastructure and codebase.
Sources
- AWS Machine Learning BlogSweep thousands of leases for compliance using Amazon Quick and the Adjudicated Query pattern
Continue chronologically





