create_automated_reasoning_policy¶
Operation¶
create_automated_reasoning_policy
async
¶
create_automated_reasoning_policy(input: CreateAutomatedReasoningPolicyInput, plugins: list[Plugin] | None = None) -> CreateAutomatedReasoningPolicyOutput
Creates an Automated Reasoning policy for Amazon Bedrock Guardrails. Automated Reasoning policies use mathematical techniques to detect hallucinations, suggest corrections, and highlight unstated assumptions in the responses of your GenAI application.
To create a policy, you upload a source document that describes the rules that you're encoding. Automated Reasoning extracts important concepts from the source document that will become variables in the policy and infers policy rules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateAutomatedReasoningPolicyInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateAutomatedReasoningPolicyOutput
|
An instance of |
Input¶
CreateAutomatedReasoningPolicyInput
dataclass
¶
Dataclass for CreateAutomatedReasoningPolicyInput structure.
Attributes¶
client_request_token
class-attribute
instance-attribute
¶
client_request_token: str | None = None
A unique, case-sensitive identifier to ensure that the operation completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error.
description
class-attribute
instance-attribute
¶
description: str | None = field(repr=False, default=None)
A description of the Automated Reasoning policy. Use this to provide context about the policy's purpose and the types of validations it performs.
kms_key_id
class-attribute
instance-attribute
¶
kms_key_id: str | None = None
The identifier of the KMS key to use for encrypting the automated reasoning policy and its associated artifacts. If you don't specify a KMS key, Amazon Bedrock uses an KMS managed key for encryption. For enhanced security and control, you can specify a customer managed KMS key.
name
class-attribute
instance-attribute
¶
name: str | None = field(repr=False, default=None)
A unique name for the Automated Reasoning policy. The name must be between 1 and 63 characters and can contain letters, numbers, hyphens, and underscores.
policy_definition
class-attribute
instance-attribute
¶
policy_definition: AutomatedReasoningPolicyDefinition | None = None
The policy definition that contains the formal logic rules, variables, and custom variable types used to validate foundation model responses in your application.
Output¶
CreateAutomatedReasoningPolicyOutput
dataclass
¶
Dataclass for CreateAutomatedReasoningPolicyOutput structure.
Attributes¶
definition_hash
class-attribute
instance-attribute
¶
definition_hash: str | None = None
The hash of the policy definition. This is used as a concurrency token for creating policy versions that you can use in your application.
description
class-attribute
instance-attribute
¶
description: str | None = field(repr=False, default=None)
The description of the Automated Reasoning policy.
name
class-attribute
instance-attribute
¶
name: str = field(repr=False)
The name of the Automated Reasoning policy.
policy_arn
instance-attribute
¶
policy_arn: str
The Amazon Resource Name (ARN) of the Automated Reasoning policy that you created.
updated_at
instance-attribute
¶
updated_at: datetime
The timestamp when the policy was last updated.
version
instance-attribute
¶
version: str
The version number of the newly created Automated Reasoning policy. The initial version is always DRAFT.