ml-commons
ml-commons copied to clipboard
add tutorial for Bedrock Guardrails
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List
- [ ] New functionality includes testing.
- [ ] All tests pass
- [ ] New functionality has been documented.
- [ ] New functionality has javadoc added
- [ ] Commits are signed per the DCO using --signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Suggest also add how to use the guardrail model for input_guardrail output_guardrail, like this test example
POST /_plugins/_ml/models/_register?deploy=true
{
"name": "Bedrock Claude V2 model with openai guardrails model",
"function_name": "remote",
"model_group_id": "ppSmpo8Bi-GZ0tf1i7cD",
"description": "Bedrock Claude V2 model with openai guardrails model",
"connector_id": "xnJjDZABNFJeYR3IPvTO",
"guardrails": {
"input_guardrail": {
"model_id": "o3JaDZABNFJeYR3I2fRV",
"response_accept": "^\\s*\"[Aa]ccept\"\\s*$"
},
"output_guardrail": {
"model_id": "o3JaDZABNFJeYR3I2fRV",
"response_accept": "^\\s*\"[Aa]ccept\"\\s*$"
},
"type": "model"
}
}
@kolchfa-aws , could you help have another review?