2026/02/23 - Amazon Bedrock - 4 updated api methods
Changes Automated Reasoning checks in Amazon Bedrock Guardrails now support fidelity report generation. The new workflow type assesses policy coverage and accuracy against customer documents. The GetAutomatedReasoningPolicyBuildWorkflowResultAssets API adds support for the three new asset types.
{'buildWorkflowType': {'GENERATE_FIDELITY_REPORT'}}
Retrieves detailed information about an Automated Reasoning policy build workflow, including its status, configuration, and metadata.
See also: AWS API Documentation
Request Syntax
client.get_automated_reasoning_policy_build_workflow(
policyArn='string',
buildWorkflowId='string'
)
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow you want to retrieve.
string
[REQUIRED]
The unique identifier of the build workflow to retrieve.
dict
Response Syntax
{
'policyArn': 'string',
'buildWorkflowId': 'string',
'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED',
'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY'|'GENERATE_FIDELITY_REPORT',
'documentName': 'string',
'documentContentType': 'pdf'|'txt',
'documentDescription': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
policyArn (string) --
The Amazon Resource Name (ARN) of the Automated Reasoning policy.
buildWorkflowId (string) --
The unique identifier of the build workflow.
status (string) --
The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED).
buildWorkflowType (string) --
The type of build workflow being executed (e.g., DOCUMENT_INGESTION, POLICY_REPAIR).
documentName (string) --
The name of the source document used in the build workflow.
documentContentType (string) --
The content type of the source document (e.g., text/plain, application/pdf).
documentDescription (string) --
A detailed description of the document's content and how it should be used in the policy generation process.
createdAt (datetime) --
The timestamp when the build workflow was created.
updatedAt (datetime) --
The timestamp when the build workflow was last updated.
{'assetId': 'string',
'assetType': {'SOURCE_DOCUMENT', 'FIDELITY_REPORT', 'ASSET_MANIFEST'}}
Response {'buildWorkflowAssets': {'assetManifest': {'entries': [{'assetId': 'string',
'assetName': 'string',
'assetType': 'BUILD_LOG '
'| '
'QUALITY_REPORT '
'| '
'POLICY_DEFINITION '
'| '
'GENERATED_TEST_CASES '
'| '
'POLICY_SCENARIOS '
'| '
'FIDELITY_REPORT '
'| '
'ASSET_MANIFEST '
'| '
'SOURCE_DOCUMENT'}]},
'document': {'document': 'blob',
'documentContentType': 'pdf | txt',
'documentDescription': 'string',
'documentHash': 'string',
'documentName': 'string'},
'fidelityReport': {'accuracyScore': 'double',
'coverageScore': 'double',
'documentSources': [{'atomicStatements': [{'id': 'string',
'location': {'lines': ['integer']},
'text': 'string'}],
'documentContent': [{'content': [{'line': {'lineNumber': 'integer',
'lineText': 'string'}}],
'pageNumber': 'integer'}],
'documentHash': 'string',
'documentId': 'string',
'documentName': 'string'}],
'ruleReports': {'string': {'accuracyJustification': 'string',
'accuracyScore': 'double',
'groundingJustifications': ['string'],
'groundingStatements': [{'documentId': 'string',
'statementId': 'string'}],
'rule': 'string'}},
'variableReports': {'string': {'accuracyJustification': 'string',
'accuracyScore': 'double',
'groundingJustifications': ['string'],
'groundingStatements': [{'documentId': 'string',
'statementId': 'string'}],
'policyVariable': 'string'}}}}}
Retrieves the resulting assets from a completed Automated Reasoning policy build workflow, including build logs, quality reports, and generated policy artifacts.
See also: AWS API Documentation
Request Syntax
client.get_automated_reasoning_policy_build_workflow_result_assets(
policyArn='string',
buildWorkflowId='string',
assetType='BUILD_LOG'|'QUALITY_REPORT'|'POLICY_DEFINITION'|'GENERATED_TEST_CASES'|'POLICY_SCENARIOS'|'FIDELITY_REPORT'|'ASSET_MANIFEST'|'SOURCE_DOCUMENT',
assetId='string'
)
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow assets you want to retrieve.
string
[REQUIRED]
The unique identifier of the build workflow whose result assets you want to retrieve.
string
[REQUIRED]
The type of asset to retrieve (e.g., BUILD_LOG, QUALITY_REPORT, POLICY_DEFINITION, GENERATED_TEST_CASES, POLICY_SCENARIOS, FIDELITY_REPORT, ASSET_MANIFEST, SOURCE_DOCUMENT).
string
The unique identifier of the specific asset to retrieve when multiple assets of the same type exist. This is required when retrieving SOURCE_DOCUMENT assets, as multiple source documents may have been used in the workflow. The asset ID can be obtained from the asset manifest.
dict
Response Syntax
{
'policyArn': 'string',
'buildWorkflowId': 'string',
'buildWorkflowAssets': {
'policyDefinition': {
'version': 'string',
'types': [
{
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
},
],
'rules': [
{
'id': 'string',
'expression': 'string',
'alternateExpression': 'string'
},
],
'variables': [
{
'name': 'string',
'type': 'string',
'description': 'string'
},
]
},
'qualityReport': {
'typeCount': 123,
'variableCount': 123,
'ruleCount': 123,
'unusedTypes': [
'string',
],
'unusedTypeValues': [
{
'typeName': 'string',
'valueName': 'string'
},
],
'unusedVariables': [
'string',
],
'conflictingRules': [
'string',
],
'disjointRuleSets': [
{
'variables': [
'string',
],
'rules': [
'string',
]
},
]
},
'buildLog': {
'entries': [
{
'annotation': {
'addType': {
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
},
'updateType': {
'name': 'string',
'newName': 'string',
'description': 'string',
'values': [
{
'addTypeValue': {
'value': 'string',
'description': 'string'
},
'updateTypeValue': {
'value': 'string',
'newValue': 'string',
'description': 'string'
},
'deleteTypeValue': {
'value': 'string'
}
},
]
},
'deleteType': {
'name': 'string'
},
'addVariable': {
'name': 'string',
'type': 'string',
'description': 'string'
},
'updateVariable': {
'name': 'string',
'newName': 'string',
'description': 'string'
},
'deleteVariable': {
'name': 'string'
},
'addRule': {
'expression': 'string'
},
'updateRule': {
'ruleId': 'string',
'expression': 'string'
},
'deleteRule': {
'ruleId': 'string'
},
'addRuleFromNaturalLanguage': {
'naturalLanguage': 'string'
},
'updateFromRulesFeedback': {
'ruleIds': [
'string',
],
'feedback': 'string'
},
'updateFromScenarioFeedback': {
'ruleIds': [
'string',
],
'scenarioExpression': 'string',
'feedback': 'string'
},
'ingestContent': {
'content': 'string'
}
},
'status': 'APPLIED'|'FAILED',
'buildSteps': [
{
'context': {
'planning': {},
'mutation': {
'addType': {
'type': {
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
}
},
'updateType': {
'type': {
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
}
},
'deleteType': {
'name': 'string'
},
'addVariable': {
'variable': {
'name': 'string',
'type': 'string',
'description': 'string'
}
},
'updateVariable': {
'variable': {
'name': 'string',
'type': 'string',
'description': 'string'
}
},
'deleteVariable': {
'name': 'string'
},
'addRule': {
'rule': {
'id': 'string',
'expression': 'string',
'alternateExpression': 'string'
}
},
'updateRule': {
'rule': {
'id': 'string',
'expression': 'string',
'alternateExpression': 'string'
}
},
'deleteRule': {
'id': 'string'
}
}
},
'priorElement': {
'policyDefinitionVariable': {
'name': 'string',
'type': 'string',
'description': 'string'
},
'policyDefinitionType': {
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
},
'policyDefinitionRule': {
'id': 'string',
'expression': 'string',
'alternateExpression': 'string'
}
},
'messages': [
{
'message': 'string',
'messageType': 'INFO'|'WARNING'|'ERROR'
},
]
},
]
},
]
},
'generatedTestCases': {
'generatedTestCases': [
{
'queryContent': 'string',
'guardContent': 'string',
'expectedAggregatedFindingsResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION'
},
]
},
'policyScenarios': {
'policyScenarios': [
{
'expression': 'string',
'alternateExpression': 'string',
'expectedResult': 'VALID'|'INVALID'|'SATISFIABLE'|'IMPOSSIBLE'|'TRANSLATION_AMBIGUOUS'|'TOO_COMPLEX'|'NO_TRANSLATION',
'ruleIds': [
'string',
]
},
]
},
'assetManifest': {
'entries': [
{
'assetType': 'BUILD_LOG'|'QUALITY_REPORT'|'POLICY_DEFINITION'|'GENERATED_TEST_CASES'|'POLICY_SCENARIOS'|'FIDELITY_REPORT'|'ASSET_MANIFEST'|'SOURCE_DOCUMENT',
'assetName': 'string',
'assetId': 'string'
},
]
},
'document': {
'document': b'bytes',
'documentContentType': 'pdf'|'txt',
'documentName': 'string',
'documentDescription': 'string',
'documentHash': 'string'
},
'fidelityReport': {
'coverageScore': 123.0,
'accuracyScore': 123.0,
'ruleReports': {
'string': {
'rule': 'string',
'groundingStatements': [
{
'documentId': 'string',
'statementId': 'string'
},
],
'groundingJustifications': [
'string',
],
'accuracyScore': 123.0,
'accuracyJustification': 'string'
}
},
'variableReports': {
'string': {
'policyVariable': 'string',
'groundingStatements': [
{
'documentId': 'string',
'statementId': 'string'
},
],
'groundingJustifications': [
'string',
],
'accuracyScore': 123.0,
'accuracyJustification': 'string'
}
},
'documentSources': [
{
'documentName': 'string',
'documentHash': 'string',
'documentId': 'string',
'atomicStatements': [
{
'id': 'string',
'text': 'string',
'location': {
'lines': [
123,
]
}
},
],
'documentContent': [
{
'pageNumber': 123,
'content': [
{
'line': {
'lineNumber': 123,
'lineText': 'string'
}
},
]
},
]
},
]
}
}
}
Response Structure
(dict) --
policyArn (string) --
The Amazon Resource Name (ARN) of the Automated Reasoning policy.
buildWorkflowId (string) --
The unique identifier of the build workflow.
buildWorkflowAssets (dict) --
The requested build workflow asset. This is a union type that returns only one of the available asset types (logs, reports, or generated artifacts) based on the specific asset type requested in the API call.
policyDefinition (dict) --
The complete policy definition generated by the build workflow, containing all rules, variables, and custom types extracted from the source documents.
version (string) --
The version of the policy definition format.
types (list) --
The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types.
(dict) --
Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types.
name (string) --
The name of the custom type.
description (string) --
The description of what the custom type represents.
values (list) --
The possible values for this enum-based type, each with its own description.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) --
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
rules (list) --
The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable.
(dict) --
Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints.
id (string) --
The unique identifier of the rule within the policy.
expression (string) --
The formal logic expression of the rule.
alternateExpression (string) --
The human-readable form of the rule expression, often in natural language or simplified notation.
variables (list) --
The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation.
(dict) --
Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation.
name (string) --
The name of the variable. Use descriptive names that clearly indicate the concept being represented.
type (string) --
The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide.
description (string) --
The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation.
qualityReport (dict) --
A comprehensive report analyzing the quality of the generated policy, including metrics about rule coverage, potential conflicts, and unused elements.
typeCount (integer) --
The total number of custom types defined in the policy.
variableCount (integer) --
The total number of variables defined in the policy.
ruleCount (integer) --
The total number of rules defined in the policy.
unusedTypes (list) --
A list of custom types that are defined but not referenced by any variables or rules, suggesting they may be unnecessary.
(string) --
unusedTypeValues (list) --
A list of type values that are defined but never used in any rules, indicating potential cleanup opportunities.
(dict) --
Associates a type name with a specific value name, used for referencing type values in rules and other policy elements.
typeName (string) --
The name of the custom type that contains the referenced value.
valueName (string) --
The name of the specific value within the type.
unusedVariables (list) --
A list of variables that are defined but not referenced by any rules, suggesting they may be unnecessary.
(string) --
conflictingRules (list) --
A list of rules that may conflict with each other, potentially leading to inconsistent policy behavior.
(string) --
disjointRuleSets (list) --
Groups of rules that operate on completely separate sets of variables, indicating the policy may be addressing multiple unrelated concerns.
(dict) --
Represents a set of rules that operate on completely separate variables, indicating they address different concerns or domains within the policy.
variables (list) --
The set of variables that are used by the rules in this disjoint set.
(string) --
rules (list) --
The list of rules that form this disjoint set, all operating on the same set of variables.
(string) --
buildLog (dict) --
The complete build log containing detailed information about each step in the policy generation process.
entries (list) --
A list of log entries documenting each step in the policy build process, including timestamps, status, and detailed messages.
(dict) --
Represents a single entry in the policy build log, containing information about a specific step or event in the build process.
annotation (dict) --
The annotation or operation that was being processed when this log entry was created.
addType (dict) --
An operation to add a new custom type to the policy, defining a set of possible values for policy variables.
name (string) --
The name of the new custom type. This name will be used to reference the type in variable definitions and rules.
description (string) --
A description of what the custom type represents and how it should be used in the policy.
values (list) --
The list of possible values that variables of this type can take, each with its own description and identifier.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) --
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
updateType (dict) --
An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values.
name (string) --
The current name of the custom type to update.
newName (string) --
The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged.
description (string) --
The new description for the custom type, replacing the previous description.
values (list) --
The updated list of values for the custom type, which can include additions, modifications, or removals.
(dict) --
An annotation for managing values within custom types, including adding, updating, or removing specific type values.
addTypeValue (dict) --
An operation to add a new value to an existing custom type.
value (string) --
The identifier or name of the new value to add to the type.
description (string) --
A description of what this new type value represents and when it should be used.
updateTypeValue (dict) --
An operation to modify an existing value within a custom type.
value (string) --
The current identifier or name of the type value to update.
newValue (string) --
The new identifier or name for the type value, if you want to rename it.
description (string) --
The new description for the type value, replacing the previous description.
deleteTypeValue (dict) --
An operation to remove a value from an existing custom type.
value (string) --
The identifier or name of the value to remove from the type.
deleteType (dict) --
An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules.
name (string) --
The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules.
addVariable (dict) --
An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values.
name (string) --
The name of the new variable. This name will be used to reference the variable in rule expressions.
type (string) --
The type of the variable, which can be a built-in type (like string or number) or a custom type defined in the policy.
description (string) --
A description of what the variable represents and how it should be used in rules.
updateVariable (dict) --
An operation to modify an existing variable in the policy, such as changing its name, type, or description.
name (string) --
The current name of the variable to update.
newName (string) --
The new name for the variable, if you want to rename it. If not provided, the name remains unchanged.
description (string) --
The new description for the variable, replacing the previous description.
deleteVariable (dict) --
An operation to remove a variable from the policy. The variable must not be referenced by any rules.
name (string) --
The name of the variable to delete from the policy. The variable must not be referenced by any rules.
addRule (dict) --
An operation to add a new logical rule to the policy using formal mathematical expressions.
expression (string) --
The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types.
updateRule (dict) --
An operation to modify an existing rule in the policy, such as changing its logical expression or conditions.
ruleId (string) --
The unique identifier of the rule to update.
expression (string) --
The new formal logical expression for the rule, replacing the previous expression.
deleteRule (dict) --
An operation to remove a rule from the policy.
ruleId (string) --
The unique identifier of the rule to delete from the policy.
addRuleFromNaturalLanguage (dict) --
An operation to add a new rule by converting natural language descriptions into formal logical expressions.
naturalLanguage (string) --
The natural language description of the rule that should be converted into a formal logical expression.
updateFromRulesFeedback (dict) --
An operation to update the policy based on feedback about how specific rules performed during testing or validation.
ruleIds (list) --
The list of rule identifiers that the feedback applies to.
(string) --
feedback (string) --
The feedback information about rule performance, including suggestions for improvements or corrections.
updateFromScenarioFeedback (dict) --
An operation to update the policy based on feedback about how it performed on specific test scenarios.
ruleIds (list) --
The list of rule identifiers that were involved in the scenario being evaluated.
(string) --
scenarioExpression (string) --
The logical expression that defines the test scenario that generated this feedback.
feedback (string) --
The feedback information about scenario performance, including any issues or improvements identified.
ingestContent (dict) --
An operation to process and incorporate new content into the policy, extracting additional rules and concepts.
content (string) --
The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions.
status (string) --
The status of the build step (e.g., SUCCESS, FAILED, IN_PROGRESS).
buildSteps (list) --
Detailed information about the specific build steps that were executed, including any sub-operations or transformations.
(dict) --
Represents a single step in the policy build process, containing context about what was being processed and any messages or results.
context (dict) --
Contextual information about what was being processed during this build step, such as the type of operation or the source material being analyzed.
planning (dict) --
Indicates that this build step was part of the planning phase, where the system determines what operations to perform.
mutation (dict) --
Indicates that this build step involved modifying the policy structure, such as adding or updating rules, variables, or types.
addType (dict) --
A mutation to add a new custom type to the policy.
type (dict) --
The type definition that specifies the name, description, and possible values for the new custom type being added to the policy.
name (string) --
The name of the custom type.
description (string) --
The description of what the custom type represents.
values (list) --
The possible values for this enum-based type, each with its own description.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) --
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
updateType (dict) --
A mutation to modify an existing custom type in the policy.
type (dict) --
The updated type definition containing the modified name, description, or values for the existing custom type.
name (string) --
The name of the custom type.
description (string) --
The description of what the custom type represents.
values (list) --
The possible values for this enum-based type, each with its own description.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) --
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
deleteType (dict) --
A mutation to remove a custom type from the policy.
name (string) --
The name of the custom type to delete.
addVariable (dict) --
A mutation to add a new variable to the policy.
variable (dict) --
The variable definition that specifies the name, type, and description for the new variable being added to the policy.
name (string) --
The name of the variable. Use descriptive names that clearly indicate the concept being represented.
type (string) --
The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide.
description (string) --
The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation.
updateVariable (dict) --
A mutation to modify an existing variable in the policy.
variable (dict) --
The updated variable definition containing the modified name, type, or description for the existing variable.
name (string) --
The name of the variable. Use descriptive names that clearly indicate the concept being represented.
type (string) --
The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide.
description (string) --
The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation.
deleteVariable (dict) --
A mutation to remove a variable from the policy.
name (string) --
The name of the variable to delete.
addRule (dict) --
A mutation to add a new rule to the policy.
rule (dict) --
The rule definition that specifies the formal logical expression and metadata for the new rule being added to the policy.
id (string) --
The unique identifier of the rule within the policy.
expression (string) --
The formal logic expression of the rule.
alternateExpression (string) --
The human-readable form of the rule expression, often in natural language or simplified notation.
updateRule (dict) --
A mutation to modify an existing rule in the policy.
rule (dict) --
The updated rule definition containing the modified formal logical expression and any changed metadata for the existing rule.
id (string) --
The unique identifier of the rule within the policy.
expression (string) --
The formal logic expression of the rule.
alternateExpression (string) --
The human-readable form of the rule expression, often in natural language or simplified notation.
deleteRule (dict) --
A mutation to remove a rule from the policy.
id (string) --
The unique identifier of the rule to delete.
priorElement (dict) --
Reference to the previous element or step in the build process, helping to trace the sequence of operations.
policyDefinitionVariable (dict) --
A variable element within the policy definition that represents a concept used in logical expressions and rules.
name (string) --
The name of the variable. Use descriptive names that clearly indicate the concept being represented.
type (string) --
The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide.
description (string) --
The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation.
policyDefinitionType (dict) --
A custom type element within the policy definition that defines a set of possible values for variables.
name (string) --
The name of the custom type.
description (string) --
The description of what the custom type represents.
values (list) --
The possible values for this enum-based type, each with its own description.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) --
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
policyDefinitionRule (dict) --
A rule element within the policy definition that contains a formal logical expression used for validation.
id (string) --
The unique identifier of the rule within the policy.
expression (string) --
The formal logic expression of the rule.
alternateExpression (string) --
The human-readable form of the rule expression, often in natural language or simplified notation.
messages (list) --
A list of messages generated during this build step, including informational messages, warnings, and error details.
(dict) --
Represents a message generated during a build step, providing information about what happened or any issues encountered.
message (string) --
The content of the message, describing what occurred during the build step.
messageType (string) --
The type of message (e.g., INFO, WARNING, ERROR) indicating its severity and purpose.
generatedTestCases (dict) --
A comprehensive test suite generated by the build workflow, providing validation capabilities for automated reasoning policies.
generatedTestCases (list) --
Represents a collection of generated test cases.
(dict) --
Represents a generated test case, consisting of query content, guard content, and expected results.
queryContent (string) --
The input query or prompt that generated the content. This provides context for the validation.
guardContent (string) --
The output content that's validated by the Automated Reasoning policy. This represents the foundation model response that will be checked for accuracy.
expectedAggregatedFindingsResult (string) --
The expected results of the generated test case. Possible values include:
VALID - The claims are true. The claims are implied by the premises and the Automated Reasoning policy. Given the Automated Reasoning policy and premises, it is not possible for these claims to be false. In other words, there are no alternative answers that are true that contradict the claims.
INVALID - The claims are false. The claims are not implied by the premises and Automated Reasoning policy. Furthermore, there exists different claims that are consistent with the premises and Automated Reasoning policy.
SATISFIABLE - The claims can be true or false. It depends on what assumptions are made for the claim to be implied from the premises and Automated Reasoning policy rules. In this situation, different assumptions can make input claims false and alternative claims true.
IMPOSSIBLE - Automated Reasoning can’t make a statement about the claims. This can happen if the premises are logically incorrect, or if there is a conflict within the Automated Reasoning policy itself.
policyScenarios (dict) --
An entity encompassing all the policy scenarios generated by the build workflow, which can be used to validate an Automated Reasoning policy.
policyScenarios (list) --
Represents a collection of generated policy scenarios.
(dict) --
Represents a test scenario used to validate an Automated Reasoning policy, including the test conditions and expected outcomes.
expression (string) --
The logical expression or condition that defines this test scenario.
alternateExpression (string) --
An alternative way to express the same test scenario, used for validation and comparison purposes.
expectedResult (string) --
The expected outcome when this scenario is evaluated against the policy (e.g., PASS, FAIL, VIOLATION).
ruleIds (list) --
The list of rule identifiers that are expected to be triggered or evaluated by this test scenario.
(string) --
assetManifest (dict) --
A manifest listing all available artifacts produced by the build workflow. This provides a catalog of all assets that can be retrieved, including their types, names, and identifiers.
entries (list) --
The list of asset entries in the manifest, each describing an available artifact that can be retrieved.
(dict) --
Represents a single entry in the asset manifest, describing one artifact produced by the build workflow.
assetType (string) --
The type of asset (e.g., BUILD_LOG, QUALITY_REPORT, POLICY_DEFINITION, GENERATED_TEST_CASES, POLICY_SCENARIOS, FIDELITY_REPORT, ASSET_MANIFEST, SOURCE_DOCUMENT).
assetName (string) --
A human-readable name for the asset, if applicable. This helps identify specific documents or reports within the workflow results.
assetId (string) --
A unique identifier for the asset, if applicable. Use this ID when requesting specific assets through the API.
document (dict) --
A source document that was used as input during the build workflow. This allows you to retrieve the original documents that were processed to generate the policy.
document (bytes) --
The raw content of the source document as a binary blob.
documentContentType (string) --
The MIME type of the document (e.g., application/pdf, text/plain).
documentName (string) --
The name of the source document for identification purposes.
documentDescription (string) --
An optional description providing context about the document's content and purpose.
documentHash (string) --
A SHA-256 hash of the document content, used for verification and integrity checking.
fidelityReport (dict) --
A comprehensive fidelity report that measures how accurately the generated policy represents the source documents. The report includes coverage and accuracy scores, along with detailed grounding information for rules and variables.
coverageScore (float) --
A score from 0.0 to 1.0 indicating how well the policy covers the statements in the source documents. A higher score means more of the source content is represented in the policy.
accuracyScore (float) --
A score from 0.0 to 1.0 indicating how accurate the policy rules are relative to the source documents. A higher score means the policy rules more faithfully represent the source material.
ruleReports (dict) --
A mapping from rule identifiers to detailed fidelity reports for each rule, showing which source statements ground each rule and how accurate it is.
(string) --
(dict) --
Provides detailed fidelity analysis for a specific policy rule, including which source document statements support it and how accurate the rule is.
rule (string) --
The identifier of the policy rule being analyzed in this report.
groundingStatements (list) --
References to statements from the source documents that provide the basis or justification for this rule.
(dict) --
References a specific atomic statement within a source document, used to link policy elements back to their source material.
documentId (string) --
The unique identifier of the document containing the referenced statement.
statementId (string) --
The unique identifier of the specific atomic statement being referenced.
groundingJustifications (list) --
Explanations describing how the source statements support and justify this specific rule.
(string) --
accuracyScore (float) --
A score from 0.0 to 1.0 indicating how accurately this rule represents the source material.
accuracyJustification (string) --
A textual explanation of the accuracy score, describing why the rule received this particular accuracy rating.
variableReports (dict) --
A mapping from variable names to detailed fidelity reports for each variable, showing which source statements ground each variable and how accurate it is.
(string) --
(dict) --
Provides detailed fidelity analysis for a specific policy variable, including which source document statements support it and how accurate the variable definition is.
policyVariable (string) --
The name of the policy variable being analyzed in this report.
groundingStatements (list) --
References to statements from the source documents that provide the basis or justification for this variable.
(dict) --
References a specific atomic statement within a source document, used to link policy elements back to their source material.
documentId (string) --
The unique identifier of the document containing the referenced statement.
statementId (string) --
The unique identifier of the specific atomic statement being referenced.
groundingJustifications (list) --
Explanations describing how the source statements support and justify this specific variable definition.
(string) --
accuracyScore (float) --
A score from 0.0 to 1.0 indicating how accurately this variable represents concepts from the source material.
accuracyJustification (string) --
A textual explanation of the accuracy score, describing why the variable received this particular accuracy rating.
documentSources (list) --
A list of source documents with their content broken down into atomic statements and annotated with line numbers for precise referencing.
(dict) --
Represents a source document that was analyzed during fidelity report generation, including the document's metadata and its content broken down into atomic statements.
documentName (string) --
The name of the source document that was analyzed.
documentHash (string) --
A SHA-256 hash of the document content, used for verification and ensuring the document hasn't changed since analysis.
documentId (string) --
A unique identifier for this document within the fidelity report.
atomicStatements (list) --
The list of atomic statements extracted from this document, representing the fundamental units of meaning used for grounding.
(dict) --
Represents a single, indivisible statement extracted from a source document. Atomic statements are the fundamental units used to ground policy rules and variables to their source material.
id (string) --
A unique identifier for this atomic statement within the fidelity report.
text (string) --
The actual text content of the atomic statement as extracted from the source document.
location (dict) --
Information about where this statement appears in the source document, including line numbers.
lines (list) --
The line numbers in the source document where this statement appears.
(integer) --
documentContent (list) --
The document's content organized into annotated chunks with line number information for precise referencing.
(dict) --
Represents a portion of a source document with line number annotations. Chunks help organize document content for easier navigation and reference.
pageNumber (integer) --
The page number where this chunk begins, if the document is divided into pages.
content (list) --
The lines of text contained within this chunk, each annotated with its line number.
(dict) --
Represents a content element within an annotated chunk. This union type allows for different types of content elements to be included in document chunks, such as individual lines of text with their line numbers.
line (dict) --
An annotated line of text from the source document, including both the line number and the text content.
lineNumber (integer) --
The line number of this text within the source document.
lineText (string) --
The actual text content of this line from the source document.
{'automatedReasoningPolicyBuildWorkflowSummaries': {'buildWorkflowType': {'GENERATE_FIDELITY_REPORT'}}}
Lists all build workflows for an Automated Reasoning policy, showing the history of policy creation and modification attempts.
See also: AWS API Documentation
Request Syntax
client.list_automated_reasoning_policy_build_workflows(
policyArn='string',
nextToken='string',
maxResults=123
)
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflows you want to list.
string
A pagination token from a previous request to continue listing build workflows from where the previous request left off.
integer
The maximum number of build workflows to return in a single response. Valid range is 1-100.
dict
Response Syntax
{
'automatedReasoningPolicyBuildWorkflowSummaries': [
{
'policyArn': 'string',
'buildWorkflowId': 'string',
'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED',
'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY'|'GENERATE_FIDELITY_REPORT',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
automatedReasoningPolicyBuildWorkflowSummaries (list) --
A list of build workflow summaries, each containing key information about a build workflow including its status and timestamps.
(dict) --
Provides a summary of a policy build workflow, including its current status, timing information, and key identifiers.
policyArn (string) --
The Amazon Resource Name (ARN) of the Automated Reasoning policy associated with this build workflow.
buildWorkflowId (string) --
The unique identifier of the build workflow.
status (string) --
The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED).
buildWorkflowType (string) --
The type of build workflow (e.g., DOCUMENT_INGESTION, POLICY_REPAIR).
createdAt (datetime) --
The timestamp when the build workflow was created.
updatedAt (datetime) --
The timestamp when the build workflow was last updated.
nextToken (string) --
A pagination token to use in subsequent requests to retrieve additional build workflows.
{'buildWorkflowType': {'GENERATE_FIDELITY_REPORT'},
'sourceContent': {'workflowContent': {'generateFidelityReportContent': {'documents': [{'document': 'blob',
'documentContentType': 'pdf '
'| '
'txt',
'documentDescription': 'string',
'documentName': 'string'}]}}}}
Starts a new build workflow for an Automated Reasoning policy. This initiates the process of analyzing source documents and generating policy rules, variables, and types.
See also: AWS API Documentation
Request Syntax
client.start_automated_reasoning_policy_build_workflow(
policyArn='string',
buildWorkflowType='INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY'|'GENERATE_FIDELITY_REPORT',
clientRequestToken='string',
sourceContent={
'policyDefinition': {
'version': 'string',
'types': [
{
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
},
],
'rules': [
{
'id': 'string',
'expression': 'string',
'alternateExpression': 'string'
},
],
'variables': [
{
'name': 'string',
'type': 'string',
'description': 'string'
},
]
},
'workflowContent': {
'documents': [
{
'document': b'bytes',
'documentContentType': 'pdf'|'txt',
'documentName': 'string',
'documentDescription': 'string'
},
],
'policyRepairAssets': {
'annotations': [
{
'addType': {
'name': 'string',
'description': 'string',
'values': [
{
'value': 'string',
'description': 'string'
},
]
},
'updateType': {
'name': 'string',
'newName': 'string',
'description': 'string',
'values': [
{
'addTypeValue': {
'value': 'string',
'description': 'string'
},
'updateTypeValue': {
'value': 'string',
'newValue': 'string',
'description': 'string'
},
'deleteTypeValue': {
'value': 'string'
}
},
]
},
'deleteType': {
'name': 'string'
},
'addVariable': {
'name': 'string',
'type': 'string',
'description': 'string'
},
'updateVariable': {
'name': 'string',
'newName': 'string',
'description': 'string'
},
'deleteVariable': {
'name': 'string'
},
'addRule': {
'expression': 'string'
},
'updateRule': {
'ruleId': 'string',
'expression': 'string'
},
'deleteRule': {
'ruleId': 'string'
},
'addRuleFromNaturalLanguage': {
'naturalLanguage': 'string'
},
'updateFromRulesFeedback': {
'ruleIds': [
'string',
],
'feedback': 'string'
},
'updateFromScenarioFeedback': {
'ruleIds': [
'string',
],
'scenarioExpression': 'string',
'feedback': 'string'
},
'ingestContent': {
'content': 'string'
}
},
]
},
'generateFidelityReportContent': {
'documents': [
{
'document': b'bytes',
'documentContentType': 'pdf'|'txt',
'documentName': 'string',
'documentDescription': 'string'
},
]
}
}
}
)
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to start the build workflow.
string
[REQUIRED]
The type of build workflow to start (e.g., DOCUMENT_INGESTION for processing new documents, POLICY_REPAIR for fixing existing policies).
string
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.
This field is autopopulated if not provided.
dict
[REQUIRED]
The source content for the build workflow, such as documents to analyze or repair instructions for existing policies.
policyDefinition (dict) --
An existing policy definition that serves as the starting point for the build workflow, typically used in policy repair or update scenarios.
version (string) --
The version of the policy definition format.
types (list) --
The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types.
(dict) --
Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types.
name (string) -- [REQUIRED]
The name of the custom type.
description (string) --
The description of what the custom type represents.
values (list) -- [REQUIRED]
The possible values for this enum-based type, each with its own description.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) -- [REQUIRED]
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
rules (list) --
The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable.
(dict) --
Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints.
id (string) -- [REQUIRED]
The unique identifier of the rule within the policy.
expression (string) -- [REQUIRED]
The formal logic expression of the rule.
alternateExpression (string) --
The human-readable form of the rule expression, often in natural language or simplified notation.
variables (list) --
The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation.
(dict) --
Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation.
name (string) -- [REQUIRED]
The name of the variable. Use descriptive names that clearly indicate the concept being represented.
type (string) -- [REQUIRED]
The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide.
description (string) -- [REQUIRED]
The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation.
workflowContent (dict) --
The actual content to be processed in the build workflow, such as documents to analyze or repair instructions to apply.
documents (list) --
The list of documents to be processed in a document ingestion workflow.
(dict) --
Represents a source document used in the policy build workflow, containing the content and metadata needed for policy generation.
document (bytes) -- [REQUIRED]
The actual content of the source document that will be analyzed to extract policy rules and concepts.
documentContentType (string) -- [REQUIRED]
The MIME type of the document content (e.g., text/plain, application/pdf, text/markdown).
documentName (string) -- [REQUIRED]
A descriptive name for the document that helps identify its purpose and content.
documentDescription (string) --
A detailed description of the document's content and how it should be used in the policy generation process.
policyRepairAssets (dict) --
The assets and instructions needed for a policy repair workflow, including repair annotations and guidance.
annotations (list) -- [REQUIRED]
Specific annotations or modifications to apply during the policy repair process, such as rule corrections or variable updates.
(dict) --
Contains the various operations that can be performed on an Automated Reasoning policy, including adding, updating, and deleting rules, variables, and types.
addType (dict) --
An operation to add a new custom type to the policy, defining a set of possible values for policy variables.
name (string) -- [REQUIRED]
The name of the new custom type. This name will be used to reference the type in variable definitions and rules.
description (string) -- [REQUIRED]
A description of what the custom type represents and how it should be used in the policy.
values (list) -- [REQUIRED]
The list of possible values that variables of this type can take, each with its own description and identifier.
(dict) --
Represents a single value within a custom type definition, including its identifier and description.
value (string) -- [REQUIRED]
The actual value or identifier for this type value.
description (string) --
A human-readable description explaining what this type value represents and when it should be used.
updateType (dict) --
An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values.
name (string) -- [REQUIRED]
The current name of the custom type to update.
newName (string) --
The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged.
description (string) --
The new description for the custom type, replacing the previous description.
values (list) -- [REQUIRED]
The updated list of values for the custom type, which can include additions, modifications, or removals.
(dict) --
An annotation for managing values within custom types, including adding, updating, or removing specific type values.
addTypeValue (dict) --
An operation to add a new value to an existing custom type.
value (string) -- [REQUIRED]
The identifier or name of the new value to add to the type.
description (string) --
A description of what this new type value represents and when it should be used.
updateTypeValue (dict) --
An operation to modify an existing value within a custom type.
value (string) -- [REQUIRED]
The current identifier or name of the type value to update.
newValue (string) --
The new identifier or name for the type value, if you want to rename it.
description (string) --
The new description for the type value, replacing the previous description.
deleteTypeValue (dict) --
An operation to remove a value from an existing custom type.
value (string) -- [REQUIRED]
The identifier or name of the value to remove from the type.
deleteType (dict) --
An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules.
name (string) -- [REQUIRED]
The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules.
addVariable (dict) --
An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values.
name (string) -- [REQUIRED]
The name of the new variable. This name will be used to reference the variable in rule expressions.
type (string) -- [REQUIRED]
The type of the variable, which can be a built-in type (like string or number) or a custom type defined in the policy.
description (string) -- [REQUIRED]
A description of what the variable represents and how it should be used in rules.
updateVariable (dict) --
An operation to modify an existing variable in the policy, such as changing its name, type, or description.
name (string) -- [REQUIRED]
The current name of the variable to update.
newName (string) --
The new name for the variable, if you want to rename it. If not provided, the name remains unchanged.
description (string) --
The new description for the variable, replacing the previous description.
deleteVariable (dict) --
An operation to remove a variable from the policy. The variable must not be referenced by any rules.
name (string) -- [REQUIRED]
The name of the variable to delete from the policy. The variable must not be referenced by any rules.
addRule (dict) --
An operation to add a new logical rule to the policy using formal mathematical expressions.
expression (string) -- [REQUIRED]
The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types.
updateRule (dict) --
An operation to modify an existing rule in the policy, such as changing its logical expression or conditions.
ruleId (string) -- [REQUIRED]
The unique identifier of the rule to update.
expression (string) -- [REQUIRED]
The new formal logical expression for the rule, replacing the previous expression.
deleteRule (dict) --
An operation to remove a rule from the policy.
ruleId (string) -- [REQUIRED]
The unique identifier of the rule to delete from the policy.
addRuleFromNaturalLanguage (dict) --
An operation to add a new rule by converting natural language descriptions into formal logical expressions.
naturalLanguage (string) -- [REQUIRED]
The natural language description of the rule that should be converted into a formal logical expression.
updateFromRulesFeedback (dict) --
An operation to update the policy based on feedback about how specific rules performed during testing or validation.
ruleIds (list) --
The list of rule identifiers that the feedback applies to.
(string) --
feedback (string) -- [REQUIRED]
The feedback information about rule performance, including suggestions for improvements or corrections.
updateFromScenarioFeedback (dict) --
An operation to update the policy based on feedback about how it performed on specific test scenarios.
ruleIds (list) --
The list of rule identifiers that were involved in the scenario being evaluated.
(string) --
scenarioExpression (string) -- [REQUIRED]
The logical expression that defines the test scenario that generated this feedback.
feedback (string) --
The feedback information about scenario performance, including any issues or improvements identified.
ingestContent (dict) --
An operation to process and incorporate new content into the policy, extracting additional rules and concepts.
content (string) -- [REQUIRED]
The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions.
generateFidelityReportContent (dict) --
The content configuration for generating a fidelity report workflow. This can include source documents to analyze or an existing fidelity report to update with a new policy definition.
documents (list) --
Source documents to analyze for generating a new fidelity report. The documents will be processed to create atomic statements and grounding information.
(dict) --
Represents a source document used in the policy build workflow, containing the content and metadata needed for policy generation.
document (bytes) -- [REQUIRED]
The actual content of the source document that will be analyzed to extract policy rules and concepts.
documentContentType (string) -- [REQUIRED]
The MIME type of the document content (e.g., text/plain, application/pdf, text/markdown).
documentName (string) -- [REQUIRED]
A descriptive name for the document that helps identify its purpose and content.
documentDescription (string) --
A detailed description of the document's content and how it should be used in the policy generation process.
dict
Response Syntax
{
'policyArn': 'string',
'buildWorkflowId': 'string'
}
Response Structure
(dict) --
policyArn (string) --
The Amazon Resource Name (ARN) of the Automated Reasoning policy.
buildWorkflowId (string) --
The unique identifier of the newly started build workflow. Use this ID to track the workflow's progress and retrieve its results.