Skip to content
Edition 002 · Wednesday, November 18, 2026 · Nov 18 Published by 06:00 ET daily Every claim sourced · checked by code
FERN.news

AWS outlines how to cut generative AI costs with code

An AWS post recommends checking whether a deterministic rule can handle a workflow step before calling a large language model.

Confirmed 1 publisher Nov 18, 2026 2 min read
Why it mattersEach unnecessary workflow step routed through an LLM inflates production spend, latency, and audit complexity when deterministic code can handle rule-based tasks.

AWS published guidance advising teams to check whether a workflow step needs a model before selecting one 1. According to the post, sending every task such as input validation, formatting, and routing through a large language model (LLM) turns cheap prototype calls into one of the largest line items in production 1.

At production scale, unnecessary model calls raise spending with request count, add hundreds of milliseconds of latency per call, and introduce output variation that slows audits and complicates testing 1. Even a temperature of 0 does not guarantee identical outputs for the same input, whereas deterministic code delivers single-digit millisecond latency or less and remains stable in source control until modified 1.

The post outlines a three-question sequence to classify each workflow step, stopping at the first option that meets requirements 1. Teams first ask whether a deterministic rule can check success via a format, schema, keyword, or range, and next ask whether a model can write that rule once, such as a regular expression or JSON schema, for human review and code commit 1. If neither applies, teams check whether the step picks one answer from a fixed list using a constrained decision call, leaving open-ended tasks for a right-sized Amazon Bedrock model 1.

To illustrate the framework, the post maps five steps of a customer support assistant to specific AWS services 1. Order number validation runs in Amazon API Gateway REST API request validation or an AWS Lambda function, while intent routing uses an AWS Step Functions Choice state with JSONata on a fast path before escalating residuals 1. Extracting carrier tracking numbers relies on a model-drafted regular expression committed to AWS Lambda, picking one of four support queues uses a constrained decision call, and drafting customer replies goes to the smallest Amazon Bedrock model that meets requirements 1.

AWS notes that Amazon Bedrock model evaluation and Amazon Bedrock Guardrails can help measure and contain hallucinations and varied answers when models are required 1. If an acceptance test can be written as a rule, the post states the step itself can usually be written as a rule 1.

Analysis. In production pipelines, default model calls reflect prototype convenience rather than discipline. A workflow that reserves models for open-ended tasks limits token spend and latency while keeping rule-based logic auditable in source control.

What we don't know yet

The post does not include specific dollar savings, benchmark figures from customer deployments, or the full text of the truncated reference at the end of the post.

Corroboration
Single source

Only one source reports this so far — treat it as uncorroborated until more arrive.

1 independent source

Level counted from the independent publishers cited in this story. An assessed level replaces this count when the newsroom has one. How corroboration works.

Sources

1 fetched · 1 cited
  1. 1
    Cut generative AI costs: Code for rules, models for judgment
    AWS Machine Learning Nov 17, 4:14 PM ET snapshot dac3e7e600