AWS bedrock medium security documentation change
Summary
Restructured and expanded documentation for Automated Reasoning checks, including new sections on functionality, use cases, limitations, workflow, and technical considerations. Added explicit security limitations regarding prompt injection protection.
Security assessment
The change explicitly states that Automated Reasoning checks do not protect against prompt injection attacks ('No prompt injection protection') and recommends using Content Filters instead. This documents a specific security limitation and provides mitigation guidance, addressing potential security vulnerabilities in LLM applications.
Diff
diff --git a/bedrock/latest/userguide/guardrails-automated-reasoning-checks.md b/bedrock/latest/userguide/guardrails-automated-reasoning-checks.md index 7f686bbf3..e8f199f60 100644 --- a//bedrock/latest/userguide/guardrails-automated-reasoning-checks.md +++ b//bedrock/latest/userguide/guardrails-automated-reasoning-checks.md @@ -5 +5 @@ -Limitations and considerationsBest practicesPricingCross-region inference for policy operationsPoliciesRulesVariables +What Automated Reasoning checks doWhen to use Automated Reasoning checksWhat Automated Reasoning checks don't doEnd-to-end workflow overviewAvailability and language supportLimitations and considerationsPricingCross-region inference for policy operations @@ -7 +7 @@ Limitations and considerationsBest practicesPricingCross-region inference for po -# Improve accuracy by adding Automated Reasoning checks in Amazon Bedrock Guardrails +# What are Automated Reasoning checks in Amazon Bedrock Guardrails? @@ -9 +9 @@ Limitations and considerationsBest practicesPricingCross-region inference for po -Automated Reasoning checks in Amazon Bedrock Guardrails mathematically verify natural language content against your defined policies, ensuring strict compliance with your guardrails. These checks can help to systematically block harmful or non-compliant content before it reaches your users. Unlike pattern-matching approaches, Automated Reasoning delivers higher accuracy with fewer false positives, particularly for complex policy requirements. For customers prioritizing precision, policy rules can be customized to enhance guardrail effectiveness through clear logic statements. +## What Automated Reasoning checks do @@ -11 +11 @@ Automated Reasoning checks in Amazon Bedrock Guardrails mathematically verify na -A key challenge with large language models (LLMs) is ensuring the accuracy of their responses. Without validation, LLMs can sometimes produce hallucinations or inaccurate information that undermines trust. +A key challenge with large language models (LLMs) is ensuring the accuracy of their responses. Without validation, LLMs can produce hallucinations or inaccurate information that undermines trust. Automated Reasoning checks in Amazon Bedrock Guardrails help solve this problem by using mathematical techniques to validate natural language content against policies you define. @@ -13 +13 @@ A key challenge with large language models (LLMs) is ensuring the accuracy of th -Automated Reasoning checks in Amazon Bedrock Guardrails solve this problem by using mathematical techniques to: +Unlike traditional guardrail components that block or filter content based on pattern matching, Automated Reasoning checks uses formal logic to provide structured feedback about _why_ a response is correct or incorrect. This feedback can be used to steer an LLM towards generating content that is provably consistent with your policy. Specifically, Automated Reasoning checks can: @@ -15 +15 @@ Automated Reasoning checks in Amazon Bedrock Guardrails solve this problem by us - * Detect hallucinations in LLM responses + * **Detect factually incorrest statements** in LLM responses by mathematically proving that generated content contradicts your policy rules. @@ -17 +17 @@ Automated Reasoning checks in Amazon Bedrock Guardrails solve this problem by us - * Highlight unstated assumptions + * **Highlight unstated assumptions** where a response is consistent with your policy but doesn't address all relevant rules, indicating the response may be incomplete. @@ -19 +19 @@ Automated Reasoning checks in Amazon Bedrock Guardrails solve this problem by us - * Provide explanations for why accurate statements are correct + * **Provide mathematically verifiable explanations** for why accurate statements are correct, citing the specific policy rules and variable assignments that support the conclusion. @@ -24 +24 @@ Automated Reasoning checks in Amazon Bedrock Guardrails solve this problem by us -This feature is especially valuable when you need to demonstrate the factual basis for an LLM's response in: +These capabilities make Automated Reasoning checks different from other Amazon Bedrock Guardrails components. Content filters and topic policies act as binary gates — they block or allow content. Automated Reasoning checks act as a verification layer that provides detailed, actionable feedback you can use to improve responses programmatically. @@ -26 +26 @@ This feature is especially valuable when you need to demonstrate the factual bas - * Regulated industries like healthcare and human resources +## When to use Automated Reasoning checks @@ -28 +28 @@ This feature is especially valuable when you need to demonstrate the factual bas - * Applications with complex rules (mortgage approvals, zoning laws) +Automated Reasoning checks are most valuable when you need to demonstrate the factual basis for an LLM's response. Consider using them when your application involves: @@ -30 +30 @@ This feature is especially valuable when you need to demonstrate the factual bas - * Compliance scenarios requiring auditable AI responses + * **Regulated industries** such as healthcare, human resources, and financial services, where incorrect information can have legal or compliance consequences. @@ -31,0 +32 @@ This feature is especially valuable when you need to demonstrate the factual bas + * **Complex rule sets** such as mortgage approvals, zoning laws, insurance eligibility, or employee benefits, where multiple conditions interact to determine an outcome. @@ -32,0 +34 @@ This feature is especially valuable when you need to demonstrate the factual bas + * **Compliance scenarios** that require auditable AI responses with mathematically verifiable proof that the response is consistent with your policies. @@ -33,0 +36 @@ This feature is especially valuable when you need to demonstrate the factual bas + * **Customer-facing applications** where incorrect guidance could erode trust, such as chatbots that answer questions about company policies, product eligibility, or service terms. @@ -35 +37,0 @@ This feature is especially valuable when you need to demonstrate the factual bas -Automated Reasoning checks in Amazon Bedrock Guardrails will not protect against prompt injection attacks. These checks validate exactly what you send them - if malicious or manipulated content is provided as input, the validation will be performed on that content as-is (garbage-in, garbage-out). To detect and block prompt injection attacks, use [Content filters](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-components.html#guardrails-content-filters) in combination with Automated Reasoning checks. @@ -37 +38,0 @@ Automated Reasoning checks in Amazon Bedrock Guardrails will not protect against -Automated Reasoning only analyzes and detects text that is relevant to the Automated Reasoning policy. It will ignore the rest of the content and cannot tell developers whether the answer is off-topic or not. If you need to detect off-topic responses, use other guardrail components such as [topic policies](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-components.html#guardrails-topic-policies). @@ -39 +39,0 @@ Automated Reasoning only analyzes and detects text that is relevant to the Autom -###### Note @@ -41 +41 @@ Automated Reasoning only analyzes and detects text that is relevant to the Autom -Automated Reasoning checks in Amazon Bedrock Guardrails is generally available in US (N. Virginia, Oregon, and Ohio) and EU (Frankfurt, Paris, Ireland) Regions. +## What Automated Reasoning checks don't do @@ -43 +43 @@ Automated Reasoning checks in Amazon Bedrock Guardrails is generally available i -###### Note +To set the right expectations, be aware of the following limitations: @@ -45 +45 @@ Automated Reasoning checks in Amazon Bedrock Guardrails is generally available i -Automated Reasoning checks in Amazon Bedrock Guardrails complement other Amazon Bedrock Guardrails features like content filters and topic policies. For more information, see [Guardrail components](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-components.html). + * **No prompt injection protection.** Automated Reasoning checks validate exactly what you send them. If malicious or manipulated content is provided as input, the validation is performed on that content as-is. To detect and block prompt injection attacks, use [Content filters](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-components.html#guardrails-content-filters) in combination with Automated Reasoning checks. @@ -47 +47 @@ Automated Reasoning checks in Amazon Bedrock Guardrails complement other Amazon -Automated Reasoning checks in Amazon Bedrock Guardrails currently support English (US) only. + * **No off-topic detection.** Automated Reasoning only analyzes text that is relevant to the policy. It ignores unrelated content and cannot tell you whether a response is off-topic. To detect off-topic responses, use [topic policies](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-components.html#guardrails-topic-policies). @@ -49 +49 @@ Automated Reasoning checks in Amazon Bedrock Guardrails currently support Englis -Automated Reasoning checks in Amazon Bedrock Guardrails does not support streaming APIs. + * **No streaming support.** Automated Reasoning checks do not support streaming APIs. You must validate complete responses. @@ -51,9 +51 @@ Automated Reasoning checks in Amazon Bedrock Guardrails does not support streami -## Limitations and considerations - -Before implementing Automated Reasoning checks, be aware of these important limitations: - - * **Document complexity:** Source documents should be well-structured with clear, unambiguous rules. Highly complex documents with nested conditions or contradictory statements may not extract cleanly into formal logic. Input documents are limited to 5Mb in size and 50,000 characters. You can split larger documents and merge each section into your policy. Images and tables in documents also impact the number of input characters. - - * **Processing time:** Automated Reasoning validation adds latency to your application responses. Plan for additional processing time, especially for complex policies with many rules. - - * **Policy scope:** Each policy should focus on a specific domain (for example, HR, finance, legal) rather than trying to cover multiple unrelated areas in a single policy. + * **English only.** Automated Reasoning checks currently support English (US) only. @@ -61 +53 @@ Before implementing Automated Reasoning checks, be aware of these important limi - * **Variable limits:** Policies with excessive numbers of variables or overly complex rule interactions may hit processing limits or return TOO_COMPLEX results. + * **Scope limited to your policy.** A `VALID` result guarantees validity only for the parts of the input captured through policy variables. Statements that fall outside the scope of your policy's variables are not validated. For example, "I can submit my homework late because I have a fake doctor's note" might be deemed valid if the policy has no variable to capture whether the doctor's note is fake. @@ -63 +54,0 @@ Before implementing Automated Reasoning checks, be aware of these important limi - * **Natural language dependency:** The accuracy of validation depends heavily on how well natural language in user prompts and model responses can be translated to your policy's formal logic variables. @@ -65 +55,0 @@ Before implementing Automated Reasoning checks, be aware of these important limi - * **Non-linear arithmetic:** Automated Reasoning checks might timeout or return TOO_COMPLEX if constraints involve reasoning with non-linear arithmentic (for example, irrational numbers or exponents) @@ -67,0 +58 @@ Before implementing Automated Reasoning checks, be aware of these important limi +Automated Reasoning checks complement other Amazon Bedrock Guardrails features like content filters and topic policies. For the best protection, use them together. For more information, see [Guardrail components](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-components.html). @@ -68,0 +60 @@ Before implementing Automated Reasoning checks, be aware of these important limi +## End-to-end workflow overview @@ -70 +62 @@ Before implementing Automated Reasoning checks, be aware of these important limi -## Best practices +Using Automated Reasoning checks involves four phases: creating a policy, testing it, deploying it in a guardrail, and integrating it into your application. @@ -72 +63,0 @@ Before implementing Automated Reasoning checks, be aware of these important limi -Follow these best practices to maximize the effectiveness of your Automated Reasoning policies: @@ -74 +65,3 @@ Follow these best practices to maximize the effectiveness of your Automated Reas - * **Start simple:** Begin with a focused policy covering core rules, then gradually add complexity. Test thoroughly at each stage. + Source Document ──► Extracted Policy ──► Testing ──► Deployment ──► Integration + (rules) (formal logic) (verify) (guardrail) (validate responses + and act on feedback) @@ -76 +68,0 @@ Follow these best practices to maximize the effectiveness of your Automated Reas - * **Write comprehensive variable descriptions:** Include how users might naturally refer to concepts, not just technical definitions from your source document. @@ -78 +70 @@ Follow these best practices to maximize the effectiveness of your Automated Reas - * **Test edge cases:** Create tests that specifically target boundary conditions, exceptions, and unusual scenarios your users might encounter. + 1. **Create a policy.** Upload a source document that contains the rules you want to enforce. Automated Reasoning extracts formal logic rules and a schema of variables from your document. Review the extracted policy to ensure it captures your rules correctly. For more information, see [Create your Automated Reasoning policy](./create-automated-reasoning-policy.html). @@ -80 +72 @@ Follow these best practices to maximize the effectiveness of your Automated Reas - * **Monitor confidence thresholds:** Start with higher confidence thresholds (0.8-0.9) and adjust based on your tolerance for false positives vs. false negatives. + 2. **Test and refine.** Tests helps ensure that your policy can accurately validate generated content even while you make changes to the policy itself. Create tests that mimic the questions your users will ask and the responses your LLM might generate. Automated Reasoning checks uses foundational models to translation natural language to logic. Use generated scenarios to validate rule correctness and QnA tests to validate the natural language to logic translation accuracy. Refine your policy based on test results. For more information, see [Test an Automated Reasoning policy](./test-automated-reasoning-policy.html). @@ -82 +74 @@ Follow these best practices to maximize the effectiveness of your Automated Reas - * **Regular policy maintenance:** Review and update your policies as business rules change or as you identify gaps through testing and production use. + 3. **Deploy.** Save an immutable version of your tested policy and attach it to a guardrail. You can automate deployment using CloudFormation or CI/CD pipelines. For more information, see [Deploy your Automated Reasoning policy in your application](./deploy-automated-reasoning-policy.html). @@ -84 +76 @@ Follow these best practices to maximize the effectiveness of your Automated Reas - * **Document your annotations:** Keep track of policy modifications and the reasoning behind them for future reference and team knowledge sharing. + 4. **Integrate.** At runtime, Automated Reasoning findings are returned through APIs that supports a Amazon Bedrock Guardrails configuration: `Converse`, `InvokeModel`, `InvokeAgent`, and `RetrieveAndGenerate`, as well as the standalone `ApplyGuardrail` API. Inspect the findings to decide whether to serve the response, rewrite it using the feedback, or ask the user for clarification. Automated Reasoning checks operate in _detect mode_ only — they return findings and feedback rather than blocking content. For more information on how to integrate Automated Reasoning checks in your application, see [Integrate Automated Reasoning checks in your application](./integrate-automated-reasoning-checks.html). For more information on the permissions required to enable Automated Reasoning checks, see [Permissions for Automated Reasoning policies with ApplyGuardrail](./guardrail-automated-reasoning-permissions.html). @@ -89,5 +81 @@ Follow these best practices to maximize the effectiveness of your Automated Reas -## Pricing - -Automated Reasoning checks in Amazon Bedrock Guardrails are charged based on the number of validation requests processed. For current pricing information, see the [Amazon Bedrock pricing page](https://aws.amazon.com/bedrock/pricing/). - -Charges are incurred for each validation request, regardless of the result (for example, VALID, INVALID, TRANSLATION_AMBIGUOUS). To optimize costs: +## Availability and language support @@ -95 +83 @@ Charges are incurred for each validation request, regardless of the result (for - * Use appropriate confidence thresholds to balance accuracy with processing requirements +Automated Reasoning checks in Amazon Bedrock Guardrails is generally available in the following Regions: @@ -97 +85 @@ Charges are incurred for each validation request, regardless of the result (for - * Consider caching validation results for identical or similar queries when appropriate for your use case + * US East (N. Virginia) @@ -99 +87 @@ Charges are incurred for each validation request, regardless of the result (for - * Monitor usage patterns and adjust policies to reduce unnecessary validation requests + * US West (Oregon) @@ -100,0 +89 @@ Charges are incurred for each validation request, regardless of the result (for + * US East (Ohio) @@ -101,0 +91 @@ Charges are incurred for each validation request, regardless of the result (for + * EU (Frankfurt) @@ -102,0 +93 @@ Charges are incurred for each validation request, regardless of the result (for + * EU (Paris) @@ -104 +95 @@ Charges are incurred for each validation request, regardless of the result (for -## Cross-region inference for policy operations + * EU (Ireland) @@ -106 +96,0 @@ Charges are incurred for each validation request, regardless of the result (for -Automated Reasoning utilizes cross-region inference to optimize the performance and availability of policy creation and testing operations. Specific API operations automatically distribute processing across AWS Regions within your geographic boundary to ensure reliable service delivery. @@ -108 +97,0 @@ Automated Reasoning utilizes cross-region inference to optimize the performance -The following Automated Reasoning API operations employ cross-region inference: @@ -110 +98,0 @@ The following Automated Reasoning API operations employ cross-region inference: - * `StartAutomatedReasoningPolicyBuildWorkflow` \- Invoked during policy creation and compilation from source documents @@ -112 +100 @@ The following Automated Reasoning API operations employ cross-region inference: - * `StartAutomatedReasoningPolicyTestWorkflow` \- Invoked during policy validation and testing procedures +Automated Reasoning checks currently support English (US) only. @@ -113,0 +102 @@ The following Automated Reasoning API operations employ cross-region inference: +## Limitations and considerations @@ -114,0 +104 @@ The following Automated Reasoning API operations employ cross-region inference: +Before implementing Automated Reasoning checks, be aware of these technical limitations: @@ -115,0 +106 @@ The following Automated Reasoning API operations employ cross-region inference: + * **Document complexity.** Source documents should be well-structured with clear, unambiguous rules. Highly complex documents with nested conditions or contradictory statements may not extract cleanly into formal logic. Input documents are limited to 5 MB in size and 50,000 characters. You can split larger documents and merge each section into your policy. Images and tables in documents also impact the number of input characters. @@ -117 +108 @@ The following Automated Reasoning API operations employ cross-region inference: -These operations invoke large language models to extract formal logic rules from source documents and translate natural language constructs into structured logical representations. To ensure optimal performance and availability, request processing is distributed according to the following geographic routing: + * **Processing time.** Automated Reasoning checks validation adds latency to your application responses. Plan for additional processing time, especially for complex policies with many variables. The number of variables in a policy directly contributes to increases in validation latency. @@ -119 +110 @@ These operations invoke large language models to extract formal logic rules from - * **United States Regions:** API requests originating from US East (N. Virginia), US West (Oregon), or US East (Ohio) may be processed in any supported US Region. + * **Policy scope.** To create policies that are easier to maintain, each policy should focus on a specific domain (for example, HR, finance, legal) rather than trying to cover multiple unrelated areas in a single policy. @@ -121 +112 @@ These operations invoke large language models to extract formal logic rules from - * **European Union Regions:** API requests originating from EU (Frankfurt), EU (Paris), or EU (Ireland) may be processed in any supported EU Region. + * **Variable and rules limits.** Policies with excessive numbers of variables or overly complex rule interactions may hit processing limits or return TOO_COMPLEX results. See [Amazon Bedrock limits documentation](https://docs.aws.amazon.com/hgeneral/latest/gr/bedrock.html#limits_bedrock) and [Validation results reference](./automated-reasoning-checks-concepts.html#ar-concept-validation-results). @@ -122,0 +114 @@ These operations invoke large language models to extract formal logic rules from + * **Natural language dependency.** The accuracy of validation depends on how well natural language in user prompts and model responses can be translated to your policy's formal logic variables. Automated Reasoning checks use foundational models to translate natural language into logic representations. Variable descriptions influence the quality of this translation. @@ -123,0 +116 @@ These operations invoke large language models to extract formal logic rules from + * **Non-linear arithmetic.** Automated Reasoning checks might timeout or return TOO_COMPLEX if constraints involve reasoning with non-linear arithmetic (for example, irrational numbers or exponents). @@ -126 +118,0 @@ These operations invoke large language models to extract formal logic rules from -###### Important @@ -128 +119,0 @@ These operations invoke large language models to extract formal logic rules from -Customer data remains within the originating geographic boundary (United States or European Union) and is processed in accordance with AWS data residency commitments. Cross-region inference routes requests exclusively within the same geographic Region to optimize performance and service availability. @@ -130,7 +121 @@ Customer data remains within the originating geographic boundary (United States -Cross-region inference operates transparently without requiring customer configuration. API functionality remains consistent regardless of the specific Region that processes the request. - -**To use Automated Reasoning checks in Amazon Bedrock Guardrails, follow these steps:** - - 1. **Upload a source document** that contains the rules you want to enforce - - 2. **Review the extracted policy** with automatically identified concepts and rules +## Pricing @@ -138 +123 @@ Cross-region inference operates transparently without requiring customer configu - 3. **Test and refine** the policy to ensure it works correctly +Automated Reasoning checks in Amazon Bedrock Guardrails are charged based on the number of validation requests processed. For current pricing information, see the [Amazon Bedrock pricing page](https://aws.amazon.com/bedrock/pricing/). @@ -140 +125 @@ Cross-region inference operates transparently without requiring customer configu - 4. **Deploy the policy** to validate your foundation model's responses +Charges are incurred for each validation request, regardless of the result (for example, VALID, INVALID, TRANSLATION_AMBIGUOUS). To optimize costs: @@ -141,0 +127 @@ Cross-region inference operates transparently without requiring customer configu + * Use appropriate confidence thresholds to balance accuracy with processing requirements. @@ -142,0 +129 @@ Cross-region inference operates transparently without requiring customer configu + * Consider caching validation results for identical or similar queries when appropriate for your use case. @@ -143,0 +131 @@ Cross-region inference operates transparently without requiring customer configu + * Monitor usage patterns and adjust policies to reduce unnecessary validation requests. @@ -145 +132,0 @@ Cross-region inference operates transparently without requiring customer configu -The workflow can be visualized as: @@ -148,2 +134,0 @@ The workflow can be visualized as: - Source Document → Extracted Policy → Testing → Deployment → Runtime Validation - (rules) (formal logic) (verify) (activate) (check responses) @@ -150,0 +136 @@ The workflow can be visualized as: +## Cross-region inference for policy operations @@ -152 +138 @@ The workflow can be visualized as: -## Policies