AWS Urges Developers to Keep Rule-Based Tasks Out of LLMs

AWS recommends using deterministic code for checkable tasks, constrained decisions for fixed choices and right-sized models for open-ended work.
What happened
An AWS Machine Learning Blog post published November 17 sets out a way to decide whether each step in an AI workflow needs a model. Its central recommendation is to use deterministic code for tasks with checkable rules, constrained decision methods for choices from a fixed set, and a model sized to the task when work is genuinely open-ended. The advice is AWS’s own guidance, focused on systems built with services such as Lambda, Step Functions and Amazon Bedrock. AWS source
The post says model calls used for routine validation, formatting and routing can add spending as request volume grows, along with latency and variable outputs. It proposes asking whether a rule can settle a task, whether a model could help write a rule that is then reviewed and committed, and whether the task is simply choosing from a known set of answers. Open-ended tasks that remain after those checks are candidates for a model. AWS source
For example, AWS maps order-number format checks to request validation or code, and customer-reply drafting to a right-sized model. For message routing, it suggests resolving clear cases with rules and sending the unresolved remainder to a constrained decision call. AWS source
Why it matters
The approach shifts cost decisions earlier than choosing between model providers or sizes: first consider whether a model is needed at all. AWS argues that removing avoidable calls can also reduce response time and make behavior easier to test and audit. The post contrasts rule execution—which it describes as stable until changed—with model outputs that may vary and model versions that can change or be retired. These are AWS’s general claims, not independently verified measurements in the article. AWS source
For a high-volume workflow, even a small reduction in calls could matter to operating costs. AWS illustrates this with a hypothetical case in which rules handle 95% of requests, leaving one in 20 for a model; it explicitly labels that calculation illustrative, not a benchmark. AWS source
Practical impact
Developers can apply the guidance by tagging workflow steps as code, constrained decisions or model calls, then tracking cost per successful outcome. A team might move schema and range checks into code, use a fixed-choice classifier for queue selection, and reserve generative models for tasks such as drafting. AWS also recommends evaluating candidate models against labeled examples and setting quality, cost, latency and compliance requirements before switching. AWS source
For users, the potential benefit is faster handling of routine requests if those requests can be resolved without waiting for a model call. Developers, however, need to maintain the rules and define what happens when a request does not match them. AWS recommends escalating uncertain fixed-choice decisions rather than treating them as certain. AWS source
Limitations
Rules work best when requirements are explicit; they do not replace judgment for ambiguous or generative tasks. A fast path can also misroute requests if its conditions are too broad or incomplete. AWS advises testing rules against known examples, checking escalation thresholds against labeled data, and keeping authorization decisions in rules. It cautions that a model’s own “unsure” response is not necessarily a calibrated confidence score. AWS source
This report relies on a single AWS source, so its claims and recommendations cannot be independently corroborated from the provided material. The post does not provide measured savings from a deployed customer workflow; its 95% example is illustrative. Actual cost, quality and latency effects will depend on the application and its data. AWS source
Sources
- AWS Machine Learning Blog: “Cut generative AI costs: Code for rules, models for judgment” — published November 17, 2026. This is the sole source for this report.
Sources & Citations
- Cut generative AI costs: Code for rules, models for judgment·Published 17 November 2026