Exam Room · AI Practitioner

Pop Quiz: Rolling Back a Prompt

· 2 min read

Exam-style

An insurer runs five customer-facing services on Amazon Bedrock, and all five send the same system wording ahead of the customer's question, because the tone and the refusal rules have to match wherever a customer lands. Last Tuesday somebody edited that wording. Since then the answers have been vaguer and two services have started hedging on claim timelines. Nobody can say what the wording said before the edit, and putting it back means a code change and a deploy in each of the five services. What should the team put in place?

Reveal the answer

C. Put the wording in Amazon Bedrock Prompt Management as a prompt resource with input variables, an attached model and inference configuration, and numbered versions each service invokes by identifier

Amazon Bedrock Prompt Management holds a prompt as a resource of its own rather than as a string that belongs to one application. The resource carries the message text with input variables marked in it (the customer’s question, the policy number, the retrieved passages), the model it runs against, and the inference configuration it was tested with, such as temperature and maximum output tokens. Saving a version numbers it and freezes it: version 6 stays version 6 for ever, and later editing of the draft does not touch it. Each of the five services invokes the prompt by identifier and names a version, so restoring last Monday’s behaviour is repointing at the previous version number. That is a configuration change in five places rather than five code changes, five reviews and five releases. Two habits come with it. Pin a version in every environment where a customer is on the other end, rather than invoking the draft, because the draft is whatever somebody happened to be editing thirty seconds ago and its behaviour is not reproducible. And test the draft against a fixed set of real questions before saving the version, so the number that ships is a number somebody looked at. The library option is the closest wrong answer, and it is genuinely better than a string literal. Source control gives an author, a timestamp, a diff a reviewer can read, and a tag to revert to, which covers most of what prompt versioning asks for. Where it falls down is the restore. The wording is shipped inside the application, so a rollback is a new library release plus five service deploys, which is exactly the cost this scenario is trying to remove. It also carries only the text; the model and the inference settings that the wording was tuned against live somewhere else, so a version of the file does not describe the behaviour it produced. The shared JSON file in Amazon S3 fixes the deploy and loses the history. Overwrite the object and the previous wording is gone, unless somebody thought to turn on versioning for the bucket, and even then nobody reviews the change before all five services pick it up at their next restart. It answers “change it fast” and not “what was it running last Monday”. AWS Secrets Manager stores credentials, keys and connection strings, the values that must not be read by the wrong principal. A system prompt is not a secret. It goes into the context window of every request, it wants review rather than concealment, and putting it there buys secret rotation and an audit trail for something that needed neither, at a per-secret charge. A guardrail is a separate control that does separate work. Amazon Bedrock Guardrails filters input and output at invocation, blocking denied topics, catching personal data, and checking an answer against the retrieved passages. None of that recovers wording nobody kept a copy of, and vague answers about claim timelines are a prompt problem rather than a safety one.

AI Fundamentals · part of The Exam Room

Q. Five services share one system prompt, last Tuesday’s edit made the answers worse, and reverting it means a deploy each. What goes in?

A. Amazon Bedrock Prompt Management: the wording becomes a prompt resource with input variables, an attached model and inference configuration, and numbered immutable versions that each service invokes by identifier.

Why? A rollback becomes a version pointer, not five releases. The resource holds what the wording needs to behave the same way twice: the text with its variables marked, the model, and the inference settings it was tested at. Versions are numbered and frozen, so version 6 still answers the way it answered in review. Pin a version per environment rather than invoking the draft, or the history stops matching what customers are told. The near miss is keeping prompt templates in source control as a shared library: that gives real prompt versioning, with authors, diffs and a tag to revert to, and still charges a deploy per consumer to restore, and still says nothing about which model and temperature the wording was written for. A JSON file in Amazon S3 makes the change fast and forgets the old value. AWS Secrets Manager is for credentials, and a system prompt travels in every request rather than being kept from anyone. A guardrail filters what goes in and comes out; it cannot bring back wording nobody saved.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.