---
id: 17225
lang: en
title: "AWS explains how to write Denied Topics in Bedrock Guardrails without blocking too much"
published_at: "2026-11-21 02:02:23"
source_name: "AWS Machine Learning Blog"
source_url: "https://aws.amazon.com/blogs/machine-learning/best-practices-for-writing-denied-topics-in-amazon-bedrock-guardrails/"
canonical_url: "https://news.hamidun.com/en/news/17225"
categories: ["llm", "ethics"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# AWS explains how to write Denied Topics in Bedrock Guardrails without blocking too much

> **Краткая суть (BLUF):** The "Finance" topic in Amazon Bedrock Guardrails blocks even the question "When will my direct deposit post?" because the filter works by meaning, not by keywords. Using a fictional bank, AWS showed that topics should be named after the user's action, for example "Investment Recommendations." The bot then refuses to advise on buying stocks but still answers questions about statements and payments.  • Topic: name up to 100 characters, definition up to 1,000, up to 5 examples • Start the definition with an action: "Asking for...", "Requests to..." • Five paraphrases of one question leave the topic's boundaries unprotected

If you have run a chatbot with topic restrictions, you know the pain: the filter either lets through what it should have stopped or cuts perfectly harmless questions. The AWS team has published a practical guide to Denied Topics in Amazon Bedrock Guardrails. It explains why this happens and how to write topic descriptions so that protection triggers precisely.

## Why the filter blocks too much

Denied Topics let you prohibit a category of content by describing it in plain language. The guardrail applies that description to each request by meaning, not by keywords. The approach has a downside: anything semantically close to the topic can end up blocked. AWS gives an example: a "Finance" topic, created to stop the assistant from giving investment advice, also halts the question "When will my direct deposit post?"

The authors identify four common mistakes. First: the topic is named after a subject area (Finance, Legal, Compensation) rather than the user's intent. Second: the definition is built from a list of keywords, so the filter misses paraphrases with different vocabulary and fires on unrelated requests that share the same words. Third: the examples teach the wrong thing, for instance five versions of the same phrase. Fourth: topics overlap, compete for the same request, and together block what each would have let through on its own.

## A bank that blocked its own customers

To illustrate, AWS invented AnyCompany Bank. Its assistant answers questions about accounts, statements, transfers, cards, and mortgages, and hands complex cases to a human. The policy needs to prohibit personal investment advice, legal consultations on disputes with the bank, insider trading advice, weapons instructions, prompt-injection attempts, and mentions of specific competitors. At the same time, the bot must answer questions about balances, mortgage restructuring, a lost card, and general financial terms such as "What is a certificate of deposit?"

The first version of the policy failed: "Legal" blocked a request for help changing mortgage terms, "Fraud" got in the way of a customer whose card data had been stolen by a skimmer, and "Competitors" muted any product comparison. The common cause: each name describes the area the bot works in, not what it should refuse.

## What to change: name, definition, examples

First rule: phrase the topic around the user's intent. The name is best built as a concrete action of 2–5 words: "Investment Recommendations," "Suing for Damages." Single-word categories such as Banking or Security are a sign of a mistake. So "Legal" became "Litigation and Non-Servicing Legal Advice," and "Fraud" became "Fraud Investigation Requests." The bot still accepts a fraud report and hands it to a human, but it does not take on the investigation itself.

Second: the definition starts with an action ("Asking for...", "Requests to...", "Generating..."), not with "Anything related to...". It should list specific objects (stocks, bonds, ETFs, cryptocurrencies) rather than "financial products." It should also add a qualifier that excludes educational questions, for example "for the user's own returns." A definition of 100–300 characters is considered optimal, although up to 1,000 is allowed. An overly long text makes the topic sensitive to the wording of neighboring topics.

Third: examples should mark the boundary, not paraphrase. Five versions of "Should I buy stocks?" guarded one point, and the question "Is it time to move my portfolio from stocks into bonds?" slipped through. After the rewrite, the examples covered different cases (a specific stock, a shift between asset classes, a cryptocurrency share, timing a sale, picking securities) and different phrasings: a question, a command, a narrative. It is also best not to include country, company, or product names in the examples unless the topic is about them, or the bot will start associating those names with the topic.

## What to keep in mind in practice

The guide contains eight practices; here we cover the first four. The authors go on to address conflicts between topics and cases where exceptions in a definition cause harm. They explicitly warn that Denied Topics results are not fully deterministic, so one successful wording is not enough.

The takeaway for developers: write topics as refusal rules based on action, not as thematic labels. Build two lists of requests: what the bot must block and what it must let through. Run both after every change. Pay attention to a test of requests that are similar in vocabulary, since that is where false positives usually hide. For banking, insurance, and HR bots, where legitimate questions sit next to prohibited ones, this discipline determines whether the assistant is useful to customers or starts refusing every second message.

---
- **Первоисточник:** [AWS Machine Learning Blog](https://aws.amazon.com/blogs/machine-learning/best-practices-for-writing-denied-topics-in-amazon-bedrock-guardrails/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/17225
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
