Skip to content

Commit a374be4

Browse files
Amazon Q Connect: Added guardrail assessment results to inference spans in the ListSpans API. You can now see which AI Guardrail policies were evaluated, whether content was blocked or masked, and per-policy details for each Bedrock Converse call
1 parent 7020465 commit a374be4

2 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Q Connect",
4+
"contributor": "",
5+
"description": "Added guardrail assessment results to inference spans in the ListSpans API. You can now see which AI Guardrail policies were evaluated, whether content was blocked or masked, and per-policy details for each Bedrock Converse call"
6+
}

services/qconnect/src/main/resources/codegen-resources/service-2.json

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6346,6 +6346,15 @@
63466346
"type":"list",
63476347
"member":{"shape":"GroupingValue"}
63486348
},
6349+
"GuardrailAction":{
6350+
"type":"string",
6351+
"documentation":"<p>The outcome of a guardrail assessment.</p>",
6352+
"enum":[
6353+
"NONE",
6354+
"BLOCKED",
6355+
"MASKED"
6356+
]
6357+
},
63496358
"GuardrailContentFilterConfig":{
63506359
"type":"structure",
63516360
"required":[
@@ -6523,6 +6532,46 @@
65236532
],
65246533
"sensitive":true
65256534
},
6535+
"GuardrailPolicyResult":{
6536+
"type":"structure",
6537+
"required":[
6538+
"policyType",
6539+
"action"
6540+
],
6541+
"members":{
6542+
"policyType":{
6543+
"shape":"GuardrailPolicyType",
6544+
"documentation":"<p>The type of guardrail policy that was evaluated.</p>"
6545+
},
6546+
"action":{
6547+
"shape":"GuardrailAction",
6548+
"documentation":"<p>Outcome of this specific policy.</p>"
6549+
},
6550+
"details":{
6551+
"shape":"NonEmptyString",
6552+
"documentation":"<p>Policy-specific detail.</p>"
6553+
}
6554+
},
6555+
"documentation":"<p>Per-policy guardrail assessment result. Captures which policy triggered, its outcome, and a policy-specific detail string.</p>"
6556+
},
6557+
"GuardrailPolicyResultList":{
6558+
"type":"list",
6559+
"member":{"shape":"GuardrailPolicyResult"},
6560+
"max":50,
6561+
"min":0
6562+
},
6563+
"GuardrailPolicyType":{
6564+
"type":"string",
6565+
"documentation":"<p>Classification of a guardrail policy.</p>",
6566+
"enum":[
6567+
"CONTENT_FILTER",
6568+
"TOPIC",
6569+
"WORD",
6570+
"SENSITIVE_INFORMATION_PII",
6571+
"SENSITIVE_INFORMATION_REGEX",
6572+
"CONTEXTUAL_GROUNDING"
6573+
]
6574+
},
65266575
"GuardrailRegexConfig":{
65276576
"type":"structure",
65286577
"required":[
@@ -6585,6 +6634,14 @@
65856634
],
65866635
"sensitive":true
65876636
},
6637+
"GuardrailSource":{
6638+
"type":"string",
6639+
"documentation":"<p>Content source for a guardrail assessment.</p>",
6640+
"enum":[
6641+
"INPUT",
6642+
"OUTPUT"
6643+
]
6644+
},
65886645
"GuardrailTopicConfig":{
65896646
"type":"structure",
65906647
"required":[
@@ -11231,6 +11288,10 @@
1123111288
"timeToFirstTokenMs":{
1123211289
"shape":"Integer",
1123311290
"documentation":"<p>Time to first token in milliseconds, measured from when Amazon Bedrock was invoked to when the first token was returned</p>"
11291+
},
11292+
"guardrailAssessments":{
11293+
"shape":"SpanGuardrailAssessmentList",
11294+
"documentation":"<p>Guardrail assessments for the inference span. Absent on other span types and when no AI Guardrail is attached to the AI Agent.</p>"
1123411295
}
1123511296
},
1123611297
"documentation":"<p>Contextual attributes capturing operation details, LLM configuration, usage metrics, and conversation data</p>"
@@ -11279,6 +11340,44 @@
1127911340
"max":10,
1128011341
"min":0
1128111342
},
11343+
"SpanGuardrailAssessment":{
11344+
"type":"structure",
11345+
"required":[
11346+
"guardrailId",
11347+
"guardrailName",
11348+
"source",
11349+
"action"
11350+
],
11351+
"members":{
11352+
"guardrailId":{
11353+
"shape":"NonEmptyString",
11354+
"documentation":"<p>Unique AI Guardrail identifier.</p>"
11355+
},
11356+
"guardrailName":{
11357+
"shape":"NonEmptyString",
11358+
"documentation":"<p>Customer-defined display name of the AI Guardrail resource.</p>"
11359+
},
11360+
"source":{
11361+
"shape":"GuardrailSource",
11362+
"documentation":"<p>Content source the guardrail was evaluated against.</p>"
11363+
},
11364+
"action":{
11365+
"shape":"GuardrailAction",
11366+
"documentation":"<p>Outcome of the guardrail assessment.</p>"
11367+
},
11368+
"policies":{
11369+
"shape":"GuardrailPolicyResultList",
11370+
"documentation":"<p>Per-policy assessment results. Absent or empty when action is NONE.</p>"
11371+
}
11372+
},
11373+
"documentation":"<p>Result of a single guardrail assessment, covering either the input (customer/user message) or the output (LLM response) of a Bedrock Converse call.</p>"
11374+
},
11375+
"SpanGuardrailAssessmentList":{
11376+
"type":"list",
11377+
"member":{"shape":"SpanGuardrailAssessment"},
11378+
"max":10,
11379+
"min":0
11380+
},
1128211381
"SpanList":{
1128311382
"type":"list",
1128411383
"member":{"shape":"Span"},

0 commit comments

Comments
 (0)