AI Asks, Rules Decide: AWS's Adjudicated Query Pattern

AWS showed the pattern: the model conducts the dialogue, while a rules engine makes the decision. Why this approach suits AI for contracts, 1C, and PIM — a KT.Team analysis.

  • What AWS demonstrated
  • Why the verdict cannot be left to the model
  • How the seam works
  • Where this pattern works in CIS companies

Trigger

AWS published five analyses on its machine learning blog.

The language model talks to the person and gathers context

Decisions for which the company is accountable to a regulator or customer are made by deterministic code. AWS calls this pattern Adjudicated Query.

At KT.Team, we build AI integrations on the same principle: in regulated processes, it is the most reliable way we know to take a model into production.

What AWS demonstrated

The first analysis covers a task that cannot be completed manually within a reasonable time. The company has tens of thousands of residential lease contracts. U.S. states regularly change landlord–tenant laws. The compliance team must check contracts against the current law and prove that none were missed.

The architecture divides the work into two parts

A business user asks a question in Amazon Quick chat, for example: “Which contracts fail to meet the new security-deposit limit?”

The model translates the question into a query for the rules engine. The engine issues

Verdict

Pass/fail for each contract without AI involvement. The model then restates the result in plain language and answers follow-up questions. The second analysis addresses a different problem. Claude Desktop on Amazon Bedrock knows only the data on which the model was trained: it has no access to up-to-date documentation, current prices, or today's events. AWS connects the Web Search tool through AgentCore Gateway, allowing the model to access the internet only through this controlled point.

Why the verdict cannot be left to the model

A language model is probabilistic: two runs on the same contract can produce different answers. That is acceptable for a draft mailing, but not for compliance. A reviewer will ask why the contract was deemed compliant and will not accept “the model decided so” as an answer.

It needs a reproducible trail: the rule version, contract field, value, and result. The second problem is completeness. The phrase “we checked all contracts”

makes sense only when there is a contract register and every row has a status. RAG provides no such guarantee: retrieval returns several of the most similar fragments for the prompt. A contract left out of the sample remains unchecked, and the model will not report that. The third problem is the cost of error. A false “compliant” result in a lease contract can lead to a fine or lawsuit. The manager who launched the system without a deterministic layer will be held responsible.

Assess where AI can deliver impact in your process

How the seam works

  1. ### The model translates The model parses the natural-language question, turns it into a structured query, and explains the result.

  2. The user does not need to know the data schema or query language, so the model is more convenient in this role than a report builder. ### The rules engine makes the decision

  3. Rules are stored as code or tables, with versions and tests.

  4. The lawyer changes a rule, the engine rechecks the entire register, and the log records which rule version assigned which status to which contract.

  5. The layer is unglamorous, but its result is what the lawyer presents to the reviewer. ###

  6. The gateway controls outbound access. In AWS’s analysis, AgentCore Gateway performs standard LLM-gateway functions: authenticating calls, logging requests, and limiting the tools available to the agent. In our architecture, LLM & Security Gateway and MCP servers perform this role.

  7. Through them, the model accesses 1C, EDI, or PIM within its granted permissions, while the security team can see every call.

Where this pattern works in CIS companies

Contracts in EDI and internal policies. The model extracts deadlines, amounts, and penalty terms from a scan; the engine checks them against company policy, and the lawyer receives a list of deviations with reasons. Prices and discounts in 1C. A manager asks in chat which shipments were made below the contractual price. The model builds the query, and the answer is calculated from accounting-system data. Product cards in PIM. In our Akeneo and Pimcore projects, the model writes item descriptions and suggests facet values.

A validator lets an item card into the catalog only when required attributes are filled in, length limits are met, the category matches the taxonomy, and no prohibited wording is present. Generative tools make the content team faster, while validator rules guarantee catalog quality.

When the model can decide on its own

The third analysis from the same collection describes the opposite case

Amazon Payments used contextual bandits: at each impression, the algorithm selects a content variant for a specific user and learns from their response.

Here, the machine makes the decision, and that is justified: an error costs one failed impression, and the result is immediately visible in conversion. This leads to a practical rule.

If an error is inexpensive to fix and visible in a metric, the decision can be delegated to the model.

If an error is costly to fix and must be explained to an external reviewer, the model remains the interface and the code makes the decision.

Verdict

From the outside, Adjudicated Query looks simple: a chat where a manager writes “check the contracts.” Behind the chat are versioned rules, a fully covered register, a gateway with logs, and tests for every change in the law. The scale of this engineering work determines when the company gets its first trustworthy result. An AI pilot in which the model issues verdicts itself may look good in a demo, but an auditor has nothing to verify. A system where the model translates and the rules decide can be presented to an auditor.

Discuss the article: AI asks, rules decide: the pattern…

Enter your email or phone number so we can get back to you.

Send via: