Lesson 4 of 4 Resilient Foundation Model Architectures

Designing Graceful Degradation and Fallbacks

This lesson describes fallback strategies that give users a useful partial response instead of an error when the best response cannot be produced.

Learning outcomes

After completing this lesson, you will be able to:

  • Configure fallback models.
  • Serve cached, retrieved or static responses.
  • Design a degradation ladder.

Fallback models

The simplest fallback calls a different model when the primary fails or is throttled: a smaller model in the same family, a model from another provider, or the same model through a cross-Region inference profile. Because the Converse API uses one format, the fallback only changes the model ID; prompts may need light adjustment, so fallback prompts should be tested in advance. The fallback's quality must still meet a minimum bar for the use case; otherwise another degradation level is more honest.

True or false

Fallback models

Exam skills 1.2.3

Check four claims about falling back to a different model.

Log in to try this activity Interactive activities are free with an account.

Cached, retrieved and static responses

Other degradation levels avoid generation altogether. A cached response for the same or a similar question serves common queries during an outage. For RAG applications, returning the retrieved passages with links, without a generated summary, still helps the user find the answer. A static response explains that the feature is temporarily limited and offers an alternative, such as a human agent or a form.

For non-interactive work, the best fallback is often to defer: put the request in an SQS queue or dead-letter queue and process it when the dependency recovers, notifying the user when the result is ready.

Designing a degradation ladder

Graceful degradation means that when part of a generative AI application fails, users receive a reduced but still useful response instead of an error. A degradation ladder defines the possible responses from best to most basic, and for each level the condition that moves a request down to it, such as throttling of the primary model, a circuit breaker opening after repeated failures, or the retrieval service timing out.

The ladder is designed with product owners, because each level is a business decision about what quality is acceptable: a smaller model's answer may be acceptable for a support assistant, but a fixed message directing users to a human may be the only acceptable fallback for regulated advice. Each level is tested deliberately, for example with fault injection, so that it works when it is needed. Metrics record how often each level is used; a rising share of degraded responses reveals capacity or reliability problems that should be fixed at the source rather than absorbed indefinitely. The following table shows a ladder for a customer support assistant.

LevelResponseTriggered when
1Primary model with RAGNormal operation
2Same model through cross-Region inferenceThrottling in the source Region
3Smaller fallback model with RAGPrimary model failing or circuit open
4Retrieved articles without generationAll generation unavailable
5Static message and hand-off to a humanRetrieval also unavailable

The following diagram shows the assistant's degradation ladder.

The travel assistant's degradation ladder. The primary model serves through a geographic inference profile; on repeated failure a circuit breaker switches to a smaller model; if generation is unavailable, the Retrieve API returns the top knowledge base articles with links; a static response is the last level. Frequent questions are served from a cache, and each level is logged as a metric.
Each level is tested with fault injection before it is needed.
Put in order

A degradation ladder

Exam skills 1.2.3 · 2.4.3

Put the responses of a RAG assistant's degradation ladder in order, from best to most basic.

Log in to try this activity Interactive activities are free with an account.
Worked example

Keeping a chat assistant useful

A travel company's assistant must keep helping customers during a model outage. Most questions are about baggage rules and cancellations, documented in a knowledge base.

An error page fails users, and a self-hosted duplicate model is expensive. A sensible ladder is: primary model through a geographic inference profile; on repeated failure, a circuit breaker switches to a smaller model; if generation is unavailable, the assistant calls the knowledge base Retrieve API and shows the top articles with links; frequent questions are served from a cache. Each level is logged as a metric.

Check yourself

The model is unavailable. How should non-interactive work, such as nightly summaries, be handled?

Show answer

Defer it through a queue and process it when the model is available again, instead of failing it.

Exam Tips

Remember for the exam

  • Fallback order: alternative Region, smaller model, cache, retrieved documents, static message.
  • RAG without generation: return retrieved passages with links.
  • Non-interactive work: defer through a queue.
  • Track how often each degradation level is used.