Exams / AIF-C01 / D5 Guidelines for Responsible AI
D5.1
Guidelines for Responsible AI (part 1 of 3)
- Exam domain: Guidelines for Responsible AI
Dimensions of responsible AI
| Dimension | Meaning |
|---|---|
| Fairness | "Considering impacts on different groups of stakeholders." |
| Explainability | "Understanding and evaluating system outputs." |
| Veracity and robustness | "Achieving correct system outputs, even with unexpected or adversarial inputs." |
| Governance | "Incorporating best practices into the AI supply chain, including providers and deployers." |
| Transparency | "Enabling stakeholders to make informed choices about their engagement with an AI system." |
Privacy and security (encryption, private networks, access control) is a separate dimension.
Bias and data
- Bias in a model usually comes from the data: diversity, balanced classes and representative collection are the first fixes.
- Class imbalance: a group with fewer training samples puts the model at risk of biased predictions. Never drop minority records and never oversample the majority.
- SageMaker Clarify computes pre-training bias metrics on a dataset (before training) and post-training metrics on a trained model's predictions.
- A biased fine-tuned LLM: improve the data and fine-tune again (cheaper than pre-training). RAG does not remove learned bias.
Explainability and transparency
| Need | Tool |
|---|---|
| Per-prediction feature contributions | SageMaker Clarify (Shapley values) |
| Document intended use, training, evaluation, limitations | SageMaker Model Cards |
| Simpler model | Easier to interpret; deep networks are black boxes |
Safeguards for generative AI
Bedrock Guardrails evaluate both user inputs and model outputs. Content filters cover predefined categories (Hate, Insults, Sexual, Violence, Misconduct); text and images are supported. Other subjects (politics, gambling, religion) are handled with denied topics. Sensitive information filters block or mask PII.
Post-processing control for bias and toxicity: human-in-the-loop review of outputs. Same input giving different outputs is nondeterminism (temperature).
Exam traps
- Model Cards document; they do not compute bias metrics. The tool that does is Clarify (the exam may misspell it "Clarity").
- Pre-training metrics = dataset; post-training metrics = trained model.
- Politics, Gambling, Religion are not predefined content filter categories: use denied topics.
- Secrecy of the model contradicts transparency; more layers reduce explainability.
- Trusted Advisor, Inspector and Rekognition do not provide responsible-AI controls for LLMs.
Docs
- https://docs.aws.amazon.com/wellarchitected/latest/generative-ai-lens/responsible-ai.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-how.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-mmfilter.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-model-explainability.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-shapley-values.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-measure-data-bias.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-bias-metric-class-imbalance.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/inference-parameters.html