|
| 1 | +--- |
| 2 | +title: Intelligent Assessment Guardrails |
| 3 | +sidebar_label: Intelligent Assessment |
| 4 | +--- |
| 5 | + |
| 6 | +# Intelligent Assessment Guardrails |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +**Intelligent Assessment** introduces an AI-powered way to define and evaluate governance policies in Turbot Guardrails. |
| 11 | + |
| 12 | +Instead of crafting complex calculated policies, you can describe the check you want — in plain natural language — and let Guardrails interpret and check it. |
| 13 | + |
| 14 | +This unlocks flexible, free-form compliance use cases that would otherwise require significant coding or multiple traditional guardrails. |
| 15 | + |
| 16 | +Intelligent Assessment is complementary to existing controls (e.g., **Approved** and **Active**). |
| 17 | + |
| 18 | +Where those controls rely on structured sub-policies, Intelligent Assessment excels when you need bespoke logic, conditional checks, or multi-step reasoning. |
| 19 | + |
| 20 | +The primary Intelligent Assessment policy has a consistent form: |
| 21 | +`{provider} > {service} > {resource} > Intelligent Assessment` |
| 22 | + |
| 23 | +<div className="example"> |
| 24 | + <ul> |
| 25 | + <li><code>AWS > S3 > Bucket > Intelligent Assessment</code></li> |
| 26 | + <li><code>AWS > SNS > Topic > Intelligent Assessment</code></li> |
| 27 | + <li><code>AWS > EC2 > Instance > Intelligent Assessment</code></li> |
| 28 | + </ul> |
| 29 | +</div> |
| 30 | + |
| 31 | +The Intelligent Assessment guardrail and policy have a number of sub-settings to determine the |
| 32 | +attributes of the assessment. The format of these policy types is |
| 33 | +`{provider} > {service} > {resource} > Intelligent Assessment > {Items}`: |
| 34 | + |
| 35 | +``` |
| 36 | +{provider} > {service} > {resource} > Intelligent Assessment > Context |
| 37 | +{provider} > {service} > {resource} > Intelligent Assessment > User Prompt |
| 38 | +``` |
| 39 | + |
| 40 | +The `Context` sub-policy includes the resource metadata by default but can be updated to include additional data. |
| 41 | +The `User Prompt` sub-policy is where you would define a prompt to assess the resource. |
| 42 | + |
| 43 | +As part of the evaluation, the AI provider will respond with `State` and `Reason`. |
| 44 | + |
| 45 | +The `State` attribute is either: |
| 46 | + |
| 47 | +- `OK` - Evaluation matches the given user prompt |
| 48 | +- `Alarm` - Evaluation does not match the given user prompt |
| 49 | +- `Error` - User prompt is empty or AI cannot determine the outcome based on the user prompt and context |
| 50 | + |
| 51 | +### Example Guardrail: AWS > S3 > Bucket > Intelligent Assessment |
| 52 | + |
| 53 | +The `AWS > S3 > Bucket > Intelligent Assessment` policy determines the action to take on a resource. You can set the policy to skip (don't run at all), or to check whether the resource is compliant per the user prompt. |
| 54 | + |
| 55 | +The Intelligent Assessment sub-policies allow you to set the context and the user prompt: |
| 56 | + |
| 57 | +<div className="example"> |
| 58 | + <ul> |
| 59 | + <li><code>AWS > S3 > Bucket > Intelligent Assessment > Context</code></li> |
| 60 | + <li><code>AWS > S3 > Bucket > Intelligent Assessment > User Prompt</code></li> |
| 61 | + </ul> |
| 62 | +</div> |
| 63 | + |
| 64 | +Let's assume that an S3 bucket has tags `"Environment": "Non-Compliant Tag"`, and has versioning disabled. |
| 65 | + |
| 66 | +```yaml |
| 67 | +Tags: |
| 68 | + - Key: Environment |
| 69 | + Value: Non-Compliant Tag |
| 70 | +Versioning: |
| 71 | + MFADelete: Disabled |
| 72 | + Status: Suspended |
| 73 | +``` |
| 74 | +
|
| 75 | +To check if the bucket has the correct `Environment` tag value and has versioning enabled: |
| 76 | + |
| 77 | +- Set `AWS > S3 > Bucket > Intelligent Assessment > User Prompt`: `The bucket must have an Environment tag value of staging and versioning must be enabled` |
| 78 | + |
| 79 | +The control will then evaluate the result using AI, and go to alarm with the response `The current tag Environment has a value of Non-Compliant Tag which is incorrect. Versioning is not enabled and set to Suspended`. |
0 commit comments