AI Cloud Architect

Cut generative AI costs: Code for rules, models for judgment

AWSBlog post by Meghan Kothari, Krishna Aswani, Pranav Patankar and Vineet KamdarAWS Artificial Intelligence Blog

The biggest cost lever in a generative AI system is whether you call a model at all. Learn how to decide whether each workflow step needs a model, and map each option to AWS: deterministic code, a constrained decision call, or a right-sized model on Amazon Bedrock.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Explains how to decide whether each workflow step needs a model, using rules in code, constrained decision calls, or a right-sized Bedrock model to cut cost and latency.

Who it is for

Architects running high-volume LLM workflows on Amazon Bedrock who want to cut model calls for validation, routing and formatting steps.

Key points

  • Decision order: rule check first, then rule written once by a model, then fixed-list decision call, else a right-sized model.
  • Four options for constrained decisions: Bedrock structured outputs, embedding similarity, Strands Decider (experimental, Apache 2.0), SageMaker AI classifier.
  • Strands Decider README claims about 95 percent accuracy at confidence 0.9 or more on short classification; AWS says validate on your own data.

The same at other vendors

Different approach

GoogleBlog post

Why we built ADK 2.0

AI:AWS also argues for code-based rules with models only for judgment, to cut cost and latency