Responsible AI: bias, fairness, explainability and the AWS tools that measure them
What responsible AI means in practice: the eight dimensions AWS names, where bias enters a system and what it does to different groups, the fairness metrics that put a number on it, the AWS tools that measure it (SageMaker Clarify, Model Monitor, Amazon A2I, Bedrock Guardrails), the legal risks of generative AI, and how to tell a transparent model from a black box.
On this page
A model that is accurate on average can still be wrong about the same people every time, confident when it should not be, and impossible to question when it is. Responsible AI is the set of habits that catch those failures before users do: measure who the model gets wrong, say why it decided what it decided, keep a human where the stakes are high, and write down what the model is for and where it breaks. This article covers Domain 4 of the exam, which is fourteen percent of the questions: the vocabulary (bias, fairness, veracity, explainability), the eight dimensions AWS uses to organise it, the types of bias and the metrics that expose them, and the AWS tools that do the measuring. It leans on the Bedrock article for how Guardrails work and on the evaluation article for the metrics that judge model quality; here the question is not "is the model good" but "is it good for everyone, and can we show it".
The map
Read this first when short on time. Every branch is a section below.
The features: what a responsible system has to be
Responsible AI is the practice of building systems that are fair to the people they affect, robust to inputs they did not expect, safe in what they say and do, and truthful, and of being able to demonstrate each of those claims rather than assert them.
The exam guide names six features, and it is worth having a one-line definition of each ready, because questions often describe a failure and ask which feature was missing.
| Feature | What it means | The failure that shows it was missing |
|---|---|---|
| Bias (the absence of it) | A systematic error that favours or disfavours a group, an outcome or an input pattern. | A face-analysis model with a much higher error rate on darker skin tones. |
| Fairness | Comparable treatment and comparable outcomes across groups, measured against a chosen definition. | A credit model approving two applicants with identical finances at different rates depending on a protected attribute. |
| Inclusivity | The data, the design and the testing cover everyone the system will serve, including minorities, accents, dialects, disabilities and edge cases. | A speech model that transcribes one regional accent well and another badly. |
| Robustness | Small or unexpected changes to the input do not produce large or nonsensical changes to the output; the model degrades gracefully and resists adversarial inputs. | A classifier flipped by a few altered pixels, or a chatbot derailed by a typo-ridden prompt. |
| Safety | The system does not produce harmful, dangerous or abusive output and cannot be easily steered into doing so. | An assistant that gives instructions for self-harm or generates hateful text when asked nicely. |
| Veracity | The output is true, grounded in evidence and honest about uncertainty. | A generative model inventing a refund policy or a court case that never existed. |
Two of these deserve a note. Bias and fairness are related but not the same: bias is a property of the model or the data (the error is systematic), fairness is a property of outcomes for people (the treatment is comparable). A model can carry a measurement bias that affects everyone equally and is therefore not unfair, and a model with no statistical bias can still be unfair if the world it learned from was. Veracity is the feature that generative AI made urgent: a discriminative model is wrong or right, but a language model can be fluently, confidently and persuasively wrong, which is why hallucination gets its own tooling later in this article.
- The Gender Shades study (2018) tested commercial gender-classification services and found error rates near zero for lighter-skinned men and above thirty percent for darker-skinned women, the canonical example of a bias and inclusivity failure caused by unrepresentative training data.
- Air Canada was held liable in 2024 by a Canadian tribunal after its website chatbot invented a bereavement-fare refund policy; the airline's argument that the chatbot was a "separate legal entity" was rejected. A veracity failure with a legal bill.
- Microsoft's Tay (2016) was a chatbot that learned from public replies and was steered into posting abusive content within a day, the textbook safety and robustness failure of an unguarded system.
Scenario questions describe a symptom and ask for the feature. "Different accuracy for different customer segments" is fairness or bias; "model output changes wildly when the input has a typo" is robustness; "the model makes up facts" is veracity; "the model produced offensive content" is safety; "the training data lacked examples from some regions" is inclusivity.
- protected attribute
- A characteristic such as age, sex, ethnicity, religion or disability on which the law or the organisation's policy says decisions must not depend. SageMaker Clarify calls it a facet.
- hallucination
- A fluent, confident statement from a generative model that is not supported by its inputs or by fact. The veracity failure mode.
- adversarial input
- An input deliberately crafted to make a model misbehave: perturbed pixels, a malicious prompt, a poisoned training example.
The eight dimensions: how AWS organises responsible AI
AWS describes responsible AI as eight core dimensions, and the exam expects each name and a one-line definition: fairness, explainability, privacy and security, safety, controllability, veracity and robustness, governance, and transparency.
The dimensions overlap with the six features above but they are organised as things a builder is responsible for, not as properties of a model. The same list appears on every AWS AI Service Card and in the responsible AI sections of the Bedrock and SageMaker documentation, so it is the frame AWS itself uses when it talks about its own models.
Each dimension, in the words that the exam tends to reuse:
- Fairness. Considering the impact on different groups of stakeholders. Measured with the metrics later in this article; in AWS tooling this is SageMaker Clarify's bias reports.
- Explainability. Understanding and evaluating system outputs: a human can see which inputs drove a prediction. Clarify's SHAP attributions, and Model Cards that record what the model was trained on.
- Privacy and security. Data is obtained, used and protected appropriately: encryption, access control, PII detection, and the promise that Bedrock does not train base models on customer prompts. The next article is entirely about this dimension.
- Safety. Preventing harmful system output and misuse: Guardrails for Amazon Bedrock, Rekognition content moderation, Comprehend toxicity detection.
- Controllability. Having mechanisms to monitor and steer system behaviour: Model Monitor, invocation logging, the ability to change a guardrail or roll back a model version without retraining.
- Veracity and robustness. Achieving correct outputs, even with unexpected or adversarial inputs: grounding in retrieved documents, contextual grounding checks, robustness evaluation with perturbed prompts.
- Governance. Incorporating best practices into the AI supply chain, including providers and deployers: policies, review boards, audit trails, and the standards the next article lists.
- Transparency. Enabling stakeholders to make informed choices about their engagement with an AI system: knowing they are talking to a model, knowing what it is for, and knowing its limits. AI Service Cards and Model Cards are the AWS artefacts.
- AWS AI Service Cards are organised around exactly these dimensions: each card has sections on intended use cases and limitations, responsible AI design choices, and deployment best practices, for services such as Rekognition face matching, Textract AnalyzeID, Transcribe and the Titan models.
- Anthropic's usage policy for Claude, which Bedrock customers agree to alongside AWS's own acceptable use policy, spells out prohibited uses (weapons, child safety, election manipulation, and so on) and high-risk uses that require extra safeguards and human oversight. Safety and governance, written as contract terms.
- The NIST AI Risk Management Framework uses a near-identical list of "trustworthiness characteristics": valid and reliable, safe, secure and resilient, accountable and transparent, explainable and interpretable, privacy-enhanced, fair with harmful bias managed.
Learn the eight names and pair each with its AWS tool: fairness and explainability go with Clarify, safety with Guardrails, controllability with Model Monitor, transparency with Model Cards and AI Service Cards, privacy with Macie and KMS, governance with Audit Manager and Config. Questions that say "which dimension does this address" are usually decided by one keyword in the scenario.
Bias: where it enters and what it does
Bias is a systematic error in a dataset or a model that pushes outcomes in a consistent direction for some inputs or some people, and it can enter at every stage from the world the data was drawn from to the feedback the deployed model generates about itself.
The pipeline of places it gets in
Thinking of bias as one thing makes it impossible to find. It is easier to walk the lifecycle from the SageMaker article and ask, at each step, what could tilt the result.
flowchart TD W["The world<br/>historical bias: past decisions were already unfair"] C["Data collection<br/>sampling and selection bias, survivorship bias"] M["Measurement and labelling<br/>measurement bias, label bias, confirmation bias"] T["Training<br/>algorithmic bias: the objective, the features, the proxies"] D["Deployment<br/>distribution shift, automation bias in the users"] F["Feedback<br/>the model's own decisions become tomorrow's training data"] W --> C --> M --> T --> D --> F F -. "amplifies" .-> C
The types by name
The exam expects the names. The table gives each with an example and the stage it usually enters.
| Type | What it is | Example | Enters at |
|---|---|---|---|
| Historical bias | The world the data describes was already unfair, so a faithful model reproduces the unfairness. | A lending model trained on decades of decisions that under-served some neighbourhoods learns to under-serve them. | Data (before collection) |
| Sampling / selection bias | The examples collected are not representative of the population the model will serve. | A skin-lesion classifier trained mostly on images of light skin. | Data |
| Survivorship bias | Only the cases that "made it" are in the data; the ones that dropped out are invisible. | A churn model trained only on customers who stayed long enough to be surveyed. | Data |
| Measurement bias | The feature or label is a poor proxy for the thing that matters, and the proxy is worse for some groups. | Using healthcare spending as a proxy for healthcare need, when some groups spend less for the same illness. | Data (features and labels) |
| Label bias | The people or process that assigned labels were inconsistent or prejudiced. | Toxicity labels that flag dialect as offensive; medical labels that vary by annotator. | Data (labelling) |
| Confirmation bias | Builders select data, features or evaluation sets that confirm what they already believe. | Testing a fraud model only on the fraud patterns the team already knew about. | Data and model |
| Algorithmic bias | The choice of objective, features, thresholds or model family creates or amplifies disparity even from balanced data. | Optimising for overall accuracy lets a model ignore a small group entirely; a single threshold suits one group and not another. | Model |
| Automation bias | Users over-trust the model's output and stop checking it. | Reviewers accepting every flagged transaction because the model "is usually right". | Deployment |
Bias and variance, and what they do to people
In statistics bias also has a second meaning, the one from the fundamentals article: the error a model makes because it is too simple to capture the pattern. Variance is the error it makes because it is too sensitive to the particular training set. High bias shows up as underfitting (bad on training and test data alike); high variance shows up as overfitting (excellent on training data, poor on anything new). Both hurt fairness in a specific way:
- An underfit model uses a few coarse features, which are often the very demographic proxies (post code, age band) that should not drive the decision. It is inaccurate for everyone and unfair to some.
- An overfit model memorises the majority and treats the minority as noise, because there are too few minority examples to generalise from. Its accuracy on the aggregate hides a much worse accuracy on small subgroups.
- Either way, the effect on demographic groups is the same shape: different error rates, and therefore different rates of wrongful denial, wrongful flagging or wrongful exclusion, for people who did nothing different.
Removing the protected attribute from the features does not remove the bias. Post code, first name, purchase history and device type are all proxies that let a model reconstruct the attribute you deleted. That is why Clarify measures bias against the facet even when the facet is not a model input: it needs the attribute to measure fairness, not to predict.
- A widely used healthcare risk algorithm studied in 2019 predicted future healthcare cost as a proxy for healthcare need. Because Black patients had historically incurred lower costs at the same level of illness, they were scored as healthier than white patients with the same conditions, and were referred to extra care less often. Measurement bias, visible only by subgroup analysis.
- Apple Card drew a regulator's investigation in 2019 after customers reported that spouses with shared finances received very different credit limits. The regulator found no unlawful discrimination, but the episode is the standard example of why "we do not use gender as a feature" is not a sufficient answer.
- COMPAS, a recidivism-risk score used in US courts, was reported in 2016 to have a higher false-positive rate for Black defendants and a higher false-negative rate for white defendants, with roughly equal overall accuracy: the case that made equalised odds a household name among practitioners.
"The training data did not include enough examples of X" is sampling bias. "The labels were assigned inconsistently" is label bias. "The historical decisions the model learned from were themselves discriminatory" is historical bias. "The model performs well on training data but poorly in production" is overfitting (high variance). "The model performs poorly on both" is underfitting (high bias).
- proxy
- A feature that is correlated with a protected attribute closely enough that a model can use it in place of the attribute. Post code for ethnicity, or shopping basket for sex.
- distribution shift
- The data arriving in production no longer matches the training distribution. Also called data drift or concept drift depending on whether the inputs or the input-to-label relationship moved.
- feedback loop
- The model's outputs change the world in a way that generates its future training data. A policing model that sends patrols to an area finds more incidents there, which justifies more patrols.
Datasets designed for responsible AI
The cheapest place to fix bias is the dataset, so a dataset built for responsible AI is inclusive, diverse, curated from documented sources, balanced across the classes and groups that matter, and representative of what the model will see in production.
Each of those words has a test attached to it, and the exam likes the words:
| Characteristic | The question to ask | How to check it on AWS |
|---|---|---|
| Inclusive | Does the data include every group of people the system will serve, including those at the edges (accents, ages, disabilities, rare conditions)? | Profile the facet columns in SageMaker Data Wrangler or Glue DataBrew; compare against the intended population. |
| Diverse | Does it cover the range of situations, not just the common case: lighting, devices, languages, seasons, edge cases? | Cluster or group inputs and count; look for empty or near-empty cells. |
| Curated sources | Where did each record come from, under what licence and consent, and is that written down? | Record provenance in the Glue Data Catalog or Amazon DataZone; keep a data sheet next to the model card. |
| Balanced | Are the classes and the facet groups present in proportions the model can learn from, and are positive labels distributed similarly across groups? | Clarify's pre-training metrics: class imbalance and difference in proportions of labels. |
| Representative of production | Does the training distribution match what actually arrives at the endpoint today? | Model Monitor's data-quality baseline compared with live traffic. |
Balance is the one people get wrong in both directions. A dataset that mirrors the real-world proportions may contain too few minority examples for the model to learn them, so it is often right to over-sample or re-weight minority groups during training even though the result is "less representative" in a naive sense. The goal is a model that is accurate for each group, not a dataset that is a scale copy of the population. Clarify reports the imbalance; the modeller decides whether to fix it with more data, re-sampling, re-weighting or a per-group threshold.
- Amazon SageMaker Ground Truth is where labels get made, with multiple annotators per item and consolidation of their answers; agreement between annotators is the first label-quality signal, and disagreement that clusters on one group is a label-bias signal.
- AWS Glue DataBrew profiles a dataset without code, reporting distributions, missing values and correlations per column, which is where an accidental proxy (a column that is nearly a copy of the protected attribute) shows up.
- Amazon SageMaker Data Wrangler includes a bias report step that runs Clarify's pre-training metrics on a data flow before any model exists.
When a question asks how to make a dataset "more representative" or "more inclusive", the answer is about collecting or synthesising more data for the under-represented group, not about removing the attribute or adding a guardrail. When it asks how to detect the imbalance before training, the answer is SageMaker Clarify (or Data Wrangler, which runs Clarify).
- class imbalance
- One class or group has far more examples than another. A fraud dataset with 0.1 percent fraud is imbalanced by class; a dataset with 95 percent of one demographic is imbalanced by facet.
- re-weighting
- Giving under-represented examples a larger weight in the loss so the model cannot ignore them. The alternative to collecting more data.
- data sheet
- A short document that travels with a dataset: who collected it, why, how, what it contains, what it must not be used for.
Measuring fairness: metrics, audits and red teams
Fairness becomes measurable only once a definition is chosen, and the three definitions worth knowing by name are demographic parity, equalised odds and disparate impact; around them sit the practices that make the numbers trustworthy: label-quality analysis, human audits, subgroup analysis and, for generative models, red teaming and toxicity evaluation.
Before any metric: is the label right?
Every fairness metric compares model output with a label, so a biased label makes the metric lie. Label quality analysis asks how the labels were produced, how much annotators disagreed, whether disagreement clusters on a group, and whether the label is a proxy for the real target (the healthcare-cost example above). Human audits sample decisions and have people re-judge them, blind to the model's answer. Subgroup analysis is the simplest and most powerful technique of all: compute every metric per group, not just in aggregate, because an aggregate of 95 percent accuracy can be 99 percent for one group and 70 percent for another.
The three metrics
Take a binary decision where one outcome is "favourable" (loan approved, transaction cleared, application shortlisted). Split the people into groups by the facet. Then:
| Metric | In plain words | Formula shape | Clarify name | When it is the right one |
|---|---|---|---|---|
| Demographic parity (statistical parity) | Each group receives the favourable outcome at the same rate, regardless of whether they "deserved" it by the label. | P(approved | group A) equals P(approved | group B) | DPPL, difference in positive proportions in predicted labels | When the label itself is suspect, or the policy goal is equal access. |
| Equalised odds | The model is wrong equally often for each group: same true-positive rate and same false-positive rate. | TPR and FPR equal across groups | Recall difference, difference in acceptance and rejection rates, treatment equality | When the label is trusted and the harm is in the errors (COMPAS). |
| Disparate impact | The ratio of favourable-outcome rates between the disadvantaged group and the advantaged group. A ratio well below one means the disadvantaged group is being selected far less often. | P(approved | disadvantaged) divided by P(approved | advantaged) | DI | Regulatory reporting; a ratio below 0.8 (the "four-fifths rule") is the usual warning line. |
These definitions conflict. If the groups genuinely differ in the base rate of the label, a model cannot satisfy demographic parity and equalised odds at once; forcing equal approval rates means accepting different error rates, and vice versa. The choice is a policy decision, made by people who own the outcome, and written into the model card. The model's job is to report the numbers honestly.
For generative models: red teams, toxicity and grounding
A language model has no single label to compare against, so its fairness and safety are probed rather than computed:
- Red teaming is a deliberate attempt by people (or by another model) to make the system misbehave: jailbreaks, prompt injection, requests for harmful content, questions designed to elicit stereotypes. The findings become test cases and guardrail rules. The prompt engineering article covers the attack side.
- Toxicity evaluation scores outputs for hate, insults, threats and sexual content. Amazon Bedrock model evaluation runs automatic evaluations for toxicity (alongside accuracy and robustness) over built-in or custom prompt datasets, and Amazon Comprehend has a toxicity detection API for text.
- Stereotyping evaluation gives the model paired prompts that differ only in a demographic word and measures whether the output changes; SageMaker Clarify's foundation-model evaluations include a prompt stereotyping task.
- Contextual grounding is the veracity check: does the answer follow from the retrieved documents? Guardrails for Amazon Bedrock scores each response for grounding (is it supported by the source) and relevance (does it answer the question) and blocks responses under a threshold. It is the automated hallucination filter for RAG applications, and the mechanics are in the Bedrock article.
"Fair" is not a property a model can have in the abstract. Any question that offers "make the model fair" as an answer without naming a metric and a group is offering a slogan. Equally, a perfect score on one fairness metric says nothing about the others; a model with perfect demographic parity can have terrible equalised odds.
- Amazon Bedrock model evaluation offers automatic evaluation (accuracy, robustness, toxicity on tasks such as summarisation, question answering, classification and open-ended generation) and human evaluation with your own workforce or an AWS-managed team, so the same job can score a model for quality and for harm.
- Amazon Comprehend detects toxic content in seven categories (including hate speech, harassment, sexual content and threats) and returns a score per category, a common pre-filter on user-generated text before it reaches a model or a moderator.
- Anthropic's red-team and evaluation programme for Claude, which runs adversarial testing before release and publishes the results in model cards, is the pattern enterprise teams copy with their own domain-specific attacks.
"Equal approval rates across groups" is demographic parity. "Equal false-positive and false-negative rates" is equalised odds. "The ratio of selection rates" is disparate impact. For generative AI, "detect whether a response is supported by the retrieved documents" is Guardrails contextual grounding, and "test the system with adversarial prompts before launch" is red teaming.
- facet
- Clarify's word for the sensitive attribute used to split the data into groups for a bias report. The value or range that identifies the disadvantaged group is the facet value.
- true-positive rate
- Of the people who truly deserved the favourable outcome, the share the model gave it to. Also called recall or sensitivity.
- red team
- People whose job is to attack the system the way a hostile user would, before a hostile user does.
The AWS tools: Clarify, Model Monitor, Guardrails and the moderation APIs
AWS spreads responsible-AI tooling across the lifecycle: SageMaker Clarify measures bias and explains predictions before and after training, SageMaker Model Monitor watches for bias and attribution drift in production, Guardrails for Amazon Bedrock filters generative input and output, and Amazon Comprehend and Amazon Rekognition detect sensitive or objectionable content in text and images.
Amazon SageMaker Clarify
Clarify is a processing job (and a step in SageMaker Pipelines, Data Wrangler and Autopilot) that produces two kinds of report:
- Bias reports. Pre-training metrics look only at the data: class imbalance (CI), how unequal the group sizes are; difference in proportions of labels (DPL), whether the favourable label is more common in one group; plus distribution-distance measures (KL divergence, Jensen-Shannon, total variation) and conditional demographic disparity in labels (CDDL), which checks whether the disparity survives controlling for a legitimate variable. Post-training metrics compare predictions across groups: DPPL, disparate impact (DI), accuracy difference (AD), recall difference, difference in acceptance and rejection rates, treatment equality, and a counterfactual flip test that changes only the facet and sees whether the prediction changes.
- Explainability reports. Clarify computes SHAP values (Kernel SHAP for tabular models) for the whole dataset and for individual predictions, giving global feature importance and per-prediction attributions; it also draws partial dependence plots showing how the prediction moves as one feature varies. For images it highlights the regions that drove a classification; for text it attributes tokens.
- Foundation model evaluations. Clarify's FM evaluation (also surfaced in SageMaker Studio and JumpStart) scores a language model on accuracy, robustness, toxicity, factual knowledge, semantic robustness and prompt stereotyping across tasks such as summarisation, question answering and classification, using built-in datasets or your own.
flowchart TD D["Training data in S3"] P["Clarify pre-training bias job<br/>class imbalance, DPL, CDDL"] T["Train the model"] Q["Clarify post-training job<br/>DPPL, DI, accuracy difference, SHAP"] R["Model Registry and Model Card<br/>reports attached as evidence"] E["Endpoint in production"] M["Model Monitor schedule<br/>bias drift, feature attribution drift"] A["CloudWatch alarm<br/>investigate, relabel, retrain"] D --> P --> T --> Q --> R --> E --> M --> A A -. "new data" .-> D
Amazon SageMaker Model Monitor
Model Monitor runs scheduled jobs against the data captured at a real-time endpoint (or a batch transform) and compares it with a baseline. It has four monitor types: data quality (input distributions), model quality (accuracy against ground truth that arrives later), bias drift (the Clarify post-training metrics recomputed on live predictions) and feature attribution drift (whether the SHAP ranking of features has changed, which often means the model is now leaning on a proxy it did not lean on before). Each violation is written to S3 and emitted as a CloudWatch metric, so an alarm can page someone or trigger a retraining pipeline.
The generative and moderation tools
| Tool | What it detects or enforces | Stage | Exam keyword |
|---|---|---|---|
| SageMaker Clarify (pre-training) | Class imbalance, label-proportion differences, dataset-level disparity | Data, before training | "detect bias in the training data" |
| SageMaker Clarify (post-training) | Disparate impact, accuracy and recall differences, per-prediction SHAP explanations, FM toxicity and stereotyping | After training, before deployment | "explain predictions", "measure bias in the model" |
| SageMaker Model Monitor | Data quality drift, model quality drift, bias drift, feature attribution drift | Production | "detect drift", "monitor deployed model" |
| Amazon Augmented AI (A2I) | Nothing automatically; routes low-confidence or sampled predictions to human reviewers | Production | "human review", "low confidence" |
| Guardrails for Amazon Bedrock (Amazon Bedrock Guardrails) | Harmful content by category and strength, denied topics, word filters, PII, prompt attacks, contextual grounding and relevance | Inference, on prompt and response | "block harmful content", "prevent hallucination in RAG", "redact PII from responses" |
| Amazon Comprehend | PII entities (names, addresses, card numbers) for detection or redaction; toxicity in text | Data preparation and inference | "identify PII in text", "toxic text" |
| Amazon Rekognition content moderation | Explicit, suggestive, violent, drug, hate-symbol and other unsafe content in images and video, with a confidence per label | Data preparation and inference | "moderate images", "unsafe content in video" |
| SageMaker Model Cards | Nothing automatically; records intended use, risk rating, training and evaluation so reviewers can judge | Whole lifecycle | "document the model", "governance" |
Guardrails deserves one more sentence here because it is the tool the exam asks about most. A guardrail is a named policy with up to six parts (content filters, denied topics, word filters, sensitive-information filters, contextual grounding checks and, for newer configurations, automated reasoning checks), attached to a model invocation, an agent or a knowledge base, and also callable on its own through the ApplyGuardrail API so that text from any model, even one outside Bedrock, can be checked. The Bedrock article has the configuration detail.
- SageMaker Studio renders Clarify's bias and explainability reports as an interactive page and attaches them to the model package in Model Registry, so the approval step sees the numbers, not a link to a bucket.
- Amazon Rekognition content moderation is what large marketplaces and dating apps run on every uploaded photo, returning a hierarchy of labels with confidence so the app can auto-reject at high confidence and send the middle band to people.
- Amazon Comprehend PII detection is commonly run on chat transcripts and call-centre notes before they are used as training data or indexed into a knowledge base, replacing entities with placeholders.
Clarify measures; it does not fix. Model Monitor detects; it does not retrain. Guardrails filter; they do not make the model more accurate. A question that asks for the tool to "remove bias from the model" has no correct AWS-service answer; the fix is data, features, thresholds or a different model, and the tools tell you whether it worked.
Before training and bias in data: Clarify pre-training. After training, explanations and bias in predictions: Clarify post-training with SHAP. In production and the word drift: Model Monitor. Generative content, block or redact: Guardrails. Human review: A2I. PII in text: Comprehend (or Guardrails for model traffic; Macie for S3 at rest, covered in the next article). Unsafe images: Rekognition.
- SHAP
- SHapley Additive exPlanations: attributes a prediction to each input feature by asking how much the prediction changes, on average, when the feature is added to every possible subset of the other features. The attributions sum to the difference from the average prediction.
- baseline
- The statistics Model Monitor computes on a reference dataset (usually the training set) and compares live traffic against.
- feature attribution drift
- A change in which features the model relies on, detected by comparing live SHAP rankings with the baseline's. Often the earliest warning that the model is now using a proxy.
Human review: keeping people in the loop with Amazon A2I
Amazon Augmented AI (Amazon A2I) is the managed service for routing a model's predictions to human reviewers under conditions you set, collecting their judgements, and returning them to the application and to the training data.
The pieces are a flow definition (the human review workflow: which task template, which workforce, how many reviewers per item, where results go in S3), a worker task template (the web form the reviewer sees, built from a library of templates or your own HTML), and a workforce: your own employees as a private workforce, a vendor workforce from the AWS Marketplace, or the public Amazon Mechanical Turk crowd. A2I has built-in integrations with Amazon Textract (review extracted form fields whose confidence is low) and Amazon Rekognition (review moderation labels in a confidence band), and a custom integration in which your code calls StartHumanLoop for any model's output, including a Bedrock response.
flowchart TD
I["Input arrives<br/>document, image or prompt"]
P["Model predicts<br/>label plus confidence"]
C{"Confident?"}
U["Use the prediction<br/>random sample still audited"]
H["A2I human loop<br/>flow definition picks template and workforce"]
W["Reviewers judge<br/>private, vendor or Mechanical Turk"]
S["Result to S3<br/>application reads the corrected answer"]
R["Corrected labels<br/>feed the next training set"]
I --> P --> C
C -- "yes" --> U
C -- "no" --> H --> W --> S --> R
U -. "sample" .-> H
Two design decisions matter. The threshold trades reviewer cost against error: lower it and more items go to people. The random sample of confident predictions is what most teams forget, and it is the only way to discover that the model is confidently wrong on a subgroup. Both are set in the activation conditions of the flow definition.
- Amazon Textract with A2I is the standard pattern for loan and insurance forms: fields extracted above a confidence threshold flow straight into the back office, the rest are shown to a clerk with the source image beside them.
- Amazon Rekognition with A2I is the pattern for content moderation at scale: auto-remove above 95 percent, auto-allow below a low bar, send the middle band to trained moderators.
- Amazon SageMaker Ground Truth shares A2I's workforce and template machinery; Ground Truth is for labelling before training, A2I is for reviewing after inference, and both can use the same private team.
The words "human review", "low-confidence predictions", "human oversight for sensitive decisions" and "reviewers" point at Amazon A2I. If the question is about labelling data before training, the answer is Ground Truth instead. If it is about a human evaluating a foundation model's outputs for quality, it is Bedrock model evaluation's human evaluation, which also uses a workforce.
- human loop
- One instance of a human review task created by A2I for one prediction, tracked from creation through completion to the S3 output.
- human-in-the-loop
- A design in which a person makes or confirms the decision and the model assists. Contrast human-on-the-loop, where the model decides and a person monitors and can intervene.
Choosing a model responsibly: task fit and sustainability
Responsible model selection means choosing the smallest, most efficient model that meets the task's quality bar, because a larger model than needed costs more money, more energy and more carbon for no gain, and is harder to explain and control.
The exam guide files sustainability under responsible AI, and the AWS Well-Architected Framework has a sustainability pillar whose advice for machine learning is simple: measure, right-size, and use the most efficient hardware and region available. Applied to model choice:
| Lever | What to do | AWS specifics |
|---|---|---|
| Model size versus task fit | Start with the smallest model that can do the job. Classification and extraction often do not need a foundation model at all; when they do, a small FM with a good prompt or a fine-tune usually beats a huge one on cost per task. | Amazon Titan Text Lite versus Express, Amazon Nova Micro versus Pro, Claude Haiku versus Opus; Bedrock model distillation to shrink a large model's behaviour into a smaller one. |
| Purpose-built silicon | Run training on accelerators built for it and inference on accelerators built for that, instead of general-purpose GPUs. | AWS Trainium (Trn1, Trn2) for training; AWS Inferentia (Inf1, Inf2) for inference; both are sold on better performance per watt and per dollar than comparable GPU instances. |
| Efficient CPUs | For classical models and for the application tier around the model, use Arm-based instances. | AWS Graviton instances for SageMaker endpoints, Lambda and the web tier. |
| Region choice | Where residency allows, run in regions with a lower carbon intensity of electricity. | AWS publishes which regions are powered by renewable energy; the Customer Carbon Footprint Tool reports emissions per account. |
| Right-sizing and scheduling | Do not keep a GPU endpoint warm for traffic that arrives once an hour; scale to zero or use batch. | SageMaker Serverless Inference and asynchronous inference; Bedrock batch inference at a lower price; SageMaker Inference Recommender to pick the instance. |
| Reuse over retraining | Prompt engineering or RAG before fine-tuning, fine-tuning before training from scratch. | The customisation ladder in the customisation article. |
Task fit has a responsibility dimension beyond cost. A model chosen for a task it was not built for (a general chatbot giving medical dosing, an image model reading a legal contract) fails veracity and safety at once. AI Service Cards and Model Cards exist so that "intended use" is a documented fact, and choosing outside it is a decision someone owns.
- Amazon Nova Micro and Titan Text Lite exist because most production prompts (classification, extraction, short rewrites) do not need a frontier model; running them on the smallest model in the family is the usual first cost and energy win.
- AWS Inferentia2 instances (Inf2) serve large language models in Bedrock-style deployments through the Neuron SDK, and Amazon's own Alexa and Rufus workloads were among the first to move inference onto Inferentia.
- AWS Graviton processors run a large share of Amazon's own services, and SageMaker offers Graviton-based endpoint instances for CPU inference at a lower price per request.
"Reduce the environmental impact" or "most sustainable" points at a smaller model, Inferentia or Trainium instances, Graviton for CPU work, and right-sizing (serverless or batch). "Choose a model appropriate for the task" is about intended use and model size, and the distractor is always the biggest, most capable model.
- AWS Inferentia
- AWS-designed accelerator chips for deep-learning inference (Inf1, Inf2 instance families), programmed through the AWS Neuron SDK.
- AWS Trainium
- AWS-designed accelerator chips for training (Trn1, Trn2 instance families), also through Neuron.
- model distillation
- Training a small "student" model on the outputs of a large "teacher" so the student inherits most of the behaviour at a fraction of the cost. Bedrock offers it as a managed feature.
Legal risks of generative AI, and what mitigates each
Generative AI creates legal exposure in ways a classifier never did: the model can reproduce protected material, state falsehoods about real people, leak personal data, give harmful advice, and do all of it in the company's voice.
The exam guide names the categories; the table pairs each with the mitigation that a well-run team puts in place. Most mitigations are the tools from earlier sections, applied with a legal purpose.
| Risk | How it happens | Mitigation |
|---|---|---|
| Intellectual property infringement | Training data included copyrighted or licensed material; outputs reproduce it closely (code, images, passages). Also the reverse: your proprietary prompts or data being used to train someone else's model. | Choose providers who document training data and offer IP indemnity for outputs (AWS offers indemnity for generative output of its generally available Titan models); use providers who do not train on your data (Bedrock does not, and does not share prompts with model providers); output filters; licence review of open models and datasets. |
| Biased model outputs | The model ranks, scores or describes people in a way that disadvantages a protected group; anti-discrimination law applies regardless of intent. | Clarify bias reports and subgroup evaluation; Bedrock stereotyping evaluations; human review for consequential decisions; document the fairness definition chosen. |
| Loss of customer trust | A public failure (an offensive output, a leaked conversation, a fabricated policy) reaches the press. | Guardrails, red teaming before launch, clear disclosure that users are talking to an AI, an incident process. |
| End-user risk | Users act on wrong advice: medical, financial, legal, safety-critical. | Restrict scope with denied topics; show confidence and limitations; route high-stakes cases to humans (A2I); intended-use statements in the model card. |
| Hallucinations | The model asserts facts that do not exist: case law, product features, refund terms, prices. | RAG with citations, contextual grounding checks in Guardrails, lower temperature, evaluation for factual knowledge, human review where the answer is binding. |
| Defamation | The model makes a false damaging statement about a real, identifiable person. | Denied topics for named individuals, grounding, filters on person-related claims, a takedown and correction process. |
| Privacy violations | Personal data enters prompts or training data without a lawful basis, or comes back out in a response; a model memorises and regurgitates PII. | Comprehend and Macie to find PII before it enters training data; Guardrails sensitive-information filters on prompts and responses; data minimisation; the GDPR and HIPAA obligations in the next article. |
- Mata v. Avianca (2023): lawyers filed a brief containing six court cases that a chatbot had invented and were sanctioned by the judge. Hallucination as a professional-liability event, and the reason "cite your sources" became a product requirement.
- Getty Images v. Stability AI and the newspaper suits against model developers are the live cases on whether training on copyrighted material and reproducing it is infringement; the outcome is unsettled, which is why indemnity terms matter to buyers.
- Generative image models have repeatedly produced stereotyped outputs (executives rendered as one demographic, low-paid roles as another) and, when over-corrected, historically inaccurate ones; both directions became public embarrassments for the companies involved.
Terms of service move risk around, they do not remove it. A provider that promises not to train on your data does nothing about what your model says to your customers; that is still your output, in your brand, under your liability. Guardrails and human review are how the company, not the provider, controls it.
"The model reproduced copyrighted text" is intellectual property risk. "The model invented a policy the customer relied on" is hallucination and end-user risk. "The model made false claims about a named executive" is defamation. "Customer records appeared in a generated response" is a privacy violation and the tool is Guardrails' sensitive-information filter. The general mitigation set the exam expects: Guardrails, human review, RAG with citations, and documentation.
- indemnity
- A contractual promise by the provider to cover the customer's legal costs and damages if a third party sues over the model's output. Usually conditional on using the provider's safety features.
- defamation
- A false statement presented as fact that damages a real person's reputation. A model that invents a criminal record for a named person has produced one.
Explainability: transparent models, black boxes and post-hoc methods
A transparent (interpretable) model is one whose decision can be read directly from its structure, such as a linear regression or a shallow decision tree; a black-box model is one whose internals are too many or too entangled to read, such as a deep neural network, and it can only be explained after the fact with methods that probe it from the outside.
Interpretable by construction
In a linear or logistic regression, each feature has one coefficient; the prediction is the weighted sum, and the explanation is the coefficients. In a decision tree, the prediction is a path of if-then splits a person can follow with a finger. Rule lists, naive Bayes and generalised additive models (a sum of one-feature curves) are in the same family. The model is the explanation, which is why regulators writing rules for credit and insurance decisions tend to prefer them, and why "adverse action" notices that must state the principal reasons for a decision are easy to produce from them.
Black boxes and how they are explained
A random forest is hundreds of trees voting; a gradient-boosted ensemble is hundreds of trees correcting each other; a deep neural network is millions of weights across many layers; a transformer language model is billions. None can be read. They are explained post hoc, by methods that treat the model as a function and study how the output responds to the input:
| Method | What it tells you | Scope | How it works in one line |
|---|---|---|---|
| Feature importance | Which features matter most to the model overall. | Global | Permute or drop a feature and measure how much the accuracy falls; for trees, count how much each split reduced error. |
| Partial dependence plot | How the prediction changes as one feature moves, averaged over everything else. | Global | Sweep the feature across its range, hold the rest at their observed values, average the predictions. Clarify draws these. |
| SHAP | How much each feature pushed this prediction up or down from the average, with contributions that add up exactly. | Local and global | Shapley values from game theory: the average marginal contribution of a feature over all orderings of the other features. Clarify's method of choice. |
| LIME | A simple local approximation of the black box around one prediction. | Local | Perturb the input, get predictions, fit a small linear model to them; its coefficients are the explanation. |
| Attention and saliency maps | Which tokens or pixels the network attended to or was most sensitive to. | Local | Read attention weights, or compute the gradient of the output with respect to each input, and draw it as a heat map. |
| Counterfactual explanation | The smallest change to the input that would flip the decision. | Local | Search for the nearest input with the other outcome: "had the income been 3,000 higher, approved". Clarify's flip test is the fairness version. |
Post-hoc explanations are approximations of a model, not the model. SHAP values are faithful in a specific mathematical sense, but two very different models can produce similar SHAP plots, and a SHAP plot does not say whether a feature is a proxy. For a language model, "why did you say that" has no clean answer at all; attention maps show where the model looked, not why it concluded what it did, and asking the model to explain itself produces a plausible story that may not be the real cause. That is why generative systems lean on transparency about inputs (RAG citations: here are the passages the answer came from) rather than explanations of internals.
- SageMaker Clarify runs Kernel SHAP against any deployed tabular model (it only needs to call the endpoint), which is how teams add explanations to an XGBoost or neural model they cannot open.
- Credit-decision reason codes, the "principal reasons" printed on a declined-credit letter, are in practice the top SHAP or coefficient contributions mapped to plain-English phrases such as "insufficient credit history"; the regulation predates SHAP and the industry adopted SHAP to satisfy it.
- Amazon Bedrock Knowledge Bases return the retrieved passages with each answer, so a RAG application can show its citations: transparency about inputs where explanation of the model is not possible.
"Which model type is most interpretable" is linear regression or a decision tree. "Explain an individual prediction of a complex model" is SHAP (Clarify). "Which features matter most overall" is feature importance or global SHAP. "Show how the prediction changes with one feature" is a partial dependence plot. "Why did the LLM answer that" in a RAG context is answered by showing the source passages.
- interpretable model
- A model whose decision procedure can be read directly by a person: coefficients, tree paths, rules. Also called a white-box or glass-box model.
- post-hoc explanation
- An explanation produced after the model is trained by observing its behaviour, without reading its internals. SHAP, LIME, saliency maps and counterfactuals are post hoc.
- local versus global
- A local explanation is about one prediction; a global one is about the model's behaviour over the whole dataset.
Documenting models: SageMaker Model Cards and AWS AI Service Cards
Transparency is mostly documentation done well, and AWS has two documents for it: SageMaker Model Cards for the models you build, and AWS AI Service Cards for the models AWS builds.
Amazon SageMaker Model Cards
A model card is a structured record, stored and versioned in SageMaker, that answers the questions a reviewer or an auditor asks about a model. Cards can be created by hand, populated automatically from a training job and a Model Registry package (which pulls in the training data location, hyperparameters and evaluation metrics), and exported to PDF for people outside the console. A card moves through Draft, Pending review, Approved and Archived, and the SageMaker Model Dashboard shows every model's card status next to its Model Monitor alerts.
| Section | What goes in it | Who reads it |
|---|---|---|
| Model overview | Name, version, owner, description, problem type, algorithm, model status. | Everyone |
| Intended uses | The purpose, the intended users, the use cases it was built for, and the out-of-scope uses; the risk rating (low, medium, high or unknown) is set here. | Governance and product owners |
| Training details | Training data sources and locations, the objective, hyperparameters, training environment, observations. | Data scientists and auditors |
| Evaluation results | Metrics on each evaluation dataset, including Clarify bias and explainability reports, attached as JSON or PDF. | Reviewers and auditors |
| Business details | The business problem, the stakeholders, the line of business that owns the outcome. | Product owners and governance |
| Additional information | Ethical considerations, caveats and recommendations (known limitations, fairness considerations, what to do when the model is uncertain), plus custom fields such as approval notes. | Governance and the people deploying it |
AWS AI Service Cards
AI Service Cards are the same idea written by AWS for its own pre-built models: Amazon Rekognition face matching and face liveness, Amazon Textract AnalyzeID, Amazon Transcribe batch transcription and toxicity detection, Amazon Comprehend PII detection, the Amazon Titan text and image models, and more. Each card has three parts: intended use cases and limitations (what it does well, where it is known to degrade), responsible AI design choices (how fairness was tested across demographic groups, what the confidence score means, what data was excluded), and deployment and performance optimisation best practices (thresholds, human review, image quality). They are how a builder knows, before writing code, what a managed service was and was not designed for.
Open models, open data and licences
Transparency for a third-party model comes from three things: whether the weights are published (open-weight models such as Llama and Mistral can be inspected, fine-tuned and run privately; closed models cannot), whether the training data or at least its composition is documented, and what the licence permits (commercial use, redistribution, fine-tuning, and any acceptable-use clauses). Open weights are not the same as open source in the software sense, and many open models carry use restrictions. Hugging Face model cards and dataset cards are the community's version of the documents above and the exam treats "model documentation" as a transparency tool in its own right.
| SageMaker Model Cards | AWS AI Service Cards | |
|---|---|---|
| Written by | You, about models you train or import | AWS, about its own AI services and models |
| Lives in | SageMaker, versioned, exportable to PDF | AWS documentation, public |
| Key fields | Intended use, risk rating, training details, evaluation results, ethical considerations and caveats | Intended use cases and limitations, responsible AI design choices, deployment best practices |
| Purpose | Internal governance, review and audit evidence | Informed selection and correct deployment of a managed service |
- SageMaker Model Registry holds the model package versions and their approval status; pairing each version with a Model Card is how regulated teams make "approved for production" mean "someone read the evidence".
- Hugging Face popularised the model card as a file in the repository, and its dataset cards are the closest thing to a standard data sheet; SageMaker JumpStart surfaces them next to the deploy button.
- Meta's Llama licence is the standard example of open weights with conditions: free for most uses, but with an acceptable-use policy and a clause for very large operators, which a governance review has to read.
"Document intended use, risk rating and evaluation results for a model the team trained" is SageMaker Model Cards. "Understand the limitations and intended use of Amazon Rekognition before adopting it" is AWS AI Service Cards. "Increase transparency" in a scenario about a custom model usually means create a model card; in a scenario about a third-party model it means check its documentation and licence.
- risk rating
- A field in a SageMaker Model Card (low, medium, high, unknown) that records the organisation's judgement of the harm a wrong prediction could do. It drives how much review the model gets.
- open-weight model
- A model whose trained parameters are published so anyone can run and fine-tune it. The training data and code may or may not be published, and the licence may restrict use.
Safety versus transparency: the trade-off
Transparency and safety pull against each other twice: the most accurate models are the least interpretable, and the internals that make a system explainable are also the internals an attacker studies to defeat it.
Accuracy against interpretability
Figure 6 is the first trade-off. Both sides must be measured to be traded. Performance is measured with the metrics in the evaluation article: accuracy, precision, recall, F1, AUC for classifiers; ROUGE, BLEU, BERTScore and human ratings for generators. Interpretability has no single number, so teams grade it: intrinsic (the model can be read), locally explainable (SHAP or LIME per prediction), globally explainable (feature importance only), or opaque. A decision is then explicit: for this risk rating, what is the minimum interpretability grade, and how much accuracy will we give up to reach it? In a regulated domain the answer is often "an interpretable model, even if a black box would be two points better", because a decision that cannot be explained cannot be appealed, audited or defended.
Exposure against protection
The second trade-off is less obvious. Publishing weights, exposing per-feature attributions, or returning confidence scores all help users understand the system, and all help an adversary:
- Confidence scores and attributions let an attacker craft inputs that cross the boundary (adversarial examples) or infer whether a record was in the training set (membership inference).
- Open weights make prompt attacks and fine-tuning away safety training trivial; a closed API can at least filter.
- Explaining a guardrail ("your message was blocked because it matched topic X") teaches the next message how to avoid the match.
- Revealing the system prompt is transparency about behaviour and also the first step of most prompt-injection attacks.
The usual resolution is to be transparent about what the system does and its limits (documentation, disclosure that the user is talking to a model, citations) while being guarded about how it does it (weights, prompts, exact thresholds, filter rules), and to give fuller explanations to the people who need them (the applicant who was declined, the auditor) than to the anonymous public.
| Choice | Transparency gain | Safety or security cost | Usual call |
|---|---|---|---|
| Interpretable model over a black box | Decisions readable and appealable | Some accuracy on complex data | Interpretable for regulated, high-stakes decisions |
| Return confidence scores to end users | Users calibrate their trust | Boundary probing, easier extraction | Yes for internal reviewers; coarse bands for the public |
| Publish or open the weights | Independent audit, reproducibility | Safety training can be removed; misuse cannot be revoked | Depends on capability and intended users |
| Explain why a guardrail fired | Fewer frustrated legitimate users | Teaches evasion | Generic message to users, detail in logs |
| Show retrieval sources with answers | Verifiable, cuts hallucination harm | Can leak documents the user should not see | Yes, with document-level access control in retrieval |
- Credit scoring in most jurisdictions gives applicants specific reasons for a decline but never the model, the thresholds or their exact score components: full transparency for the affected person about the decision, none about the mechanism.
- Guardrails for Amazon Bedrock returns a configurable blocked-message text to the user and writes the detailed assessment (which filter, which category, what confidence) to the trace and the invocation log, which is exactly the split described above.
- Frontier model providers including Anthropic publish system cards that describe capabilities, evaluations and known failure modes at length, while keeping weights and training details private: transparency about behaviour without exposure of internals.
Questions on this task tend to have one answer that is "the most accurate model" and one that is "an interpretable model"; the scenario words "regulated", "must explain decisions to customers", "audit" or "appeal" pick the interpretable one. When the scenario is about security, the principle is that exposing internals (weights, prompts, exact thresholds) enables attacks, so transparency is given about behaviour and limits, not mechanisms.
- adversarial example
- An input with small, deliberate changes that make a model give a wrong answer with high confidence. Easier to build when the attacker can see gradients, attributions or confidence.
- membership inference
- Deducing from a model's outputs whether a particular record was in its training data. A privacy attack, sharper when confidence scores are exposed.
- system card
- A model card for a deployed system rather than a raw model: capabilities, evaluations, safeguards and known failures, without the internals.
Human-centred design for explainable AI
Human-centred design for explainable AI starts from the decision a person has to make and designs the model's output, explanation and interface to make that decision better, rather than starting from the model and hoping people cope with what it emits.
The principles the exam expects, each with what it looks like in a real interface:
- Design for the user's decision, not the model's output. Ask what the person will do with the answer and what they need to do it well. A fraud analyst needs the top three reasons and a link to the transactions, not a probability to four decimal places.
- Amplify human judgement instead of replacing it. The system proposes, the person decides, and the interface makes overriding easy and cheap. Where the decision is consequential, a human-in-the-loop design (A2I) is the default, and human-on-the-loop monitoring is the minimum.
- Aim for appropriate trust, not maximum trust. Show confidence honestly (calibrated bands, "the model is unsure here"), state limitations up front, and make failure visible. Both over-trust (automation bias) and under-trust (ignoring a good model) are design failures.
- Communicate clearly. Explanations in the user's vocabulary, not the modeller's: "declined because the debt-to-income ratio is high" rather than a SHAP bar chart. Say what the system is (an AI, not a person), what it is for, and what it is not for.
- Mind cognitive load. One explanation at the right moment beats ten on a dashboard. Progressive disclosure: the short reason by default, the detail on request.
- Build the feedback loop in. A one-click "this is wrong" that is recorded, reviewed and fed to retraining is worth more than any offline evaluation, because it measures the model on the cases that matter to users.
- Design inclusively and accessibly. Screen readers, colour-blind-safe visuals, plain language, and testing with the full range of users, including the groups the fairness analysis worried about.
- Provide reversibility and recourse. A person affected by a decision can understand it, contest it and reach a human. This is a design requirement and, under several regulations, a legal one.
flowchart TD D["The user's decision<br/>what will they do with the answer?"] O["Model output plus explanation<br/>answer, confidence band, top reasons, limits"] U["User acts<br/>accept, override or escalate to a person"] F["Feedback captured<br/>corrections, overrides, complaints"] L["Learn<br/>relabel, retrain, adjust thresholds, improve the interface"] D --> O --> U --> F --> L L -. "next version" .-> O
- Amazon A2I review consoles show the reviewer the source document or image beside the model's answer and confidence, with the fields the model was unsure about highlighted, which is progressive disclosure and decision-first design in one screen.
- Amazon Textract and Amazon Rekognition return a confidence with every field and label precisely so that the application can decide what to auto-accept, what to show with a warning and what to send to a person.
- Amazon Q Business and Bedrock Knowledge Bases answer with citations and a link back to the source document, which lets a user verify instead of trust, the practical form of "appropriate trust" for generative systems.
An explanation that users cannot act on is decoration. If the interface shows a reason but offers no way to correct, contest or escalate, the loop is open and the model never learns what it got wrong. The test of a human-centred design is not whether it explains but whether a person can change the outcome.
Human-centred design questions reward the option that keeps a person in control of consequential decisions, shows confidence and limitations, and collects feedback; the distractors automate fully or hide uncertainty. "Amplify human judgement", "appropriate trust" and "feedback loop" are the phrases in the exam guide, and "human-in-the-loop" maps to Amazon A2I.
- appropriate trust
- Trust that matches the system's actual reliability on the case at hand: high where it is good, low where it is not, and visibly so.
- progressive disclosure
- Showing the simplest useful information first and the detail only when the user asks for it.
- recourse
- A real path for an affected person to understand, contest and change a decision made with the help of a model.
Recap
- The six features: bias (absence of systematic group error), fairness (comparable outcomes), inclusivity (data covers everyone served), robustness (stable under unexpected or adversarial input), safety (no harmful output), veracity (true and grounded).
- AWS's eight dimensions: fairness, explainability, privacy and security, safety, controllability, veracity and robustness, governance, transparency. Each has a tool: Clarify, Guardrails, Model Monitor, Model Cards, AI Service Cards, and the security services of the next article.
- Bias enters at every stage. Data: historical, sampling and selection, survivorship, measurement, label. Model: confirmation, algorithmic. Deployment: automation bias and feedback loops. Removing the protected attribute does not remove the proxies.
- High statistical bias underfits; high variance overfits; both produce different error rates for different groups. Aggregate accuracy hides subgroup failure, so measure per group.
- A responsible dataset is inclusive, diverse, curated from documented sources, balanced, and representative of production. Clarify's class imbalance and difference in proportions of labels measure the balance before training.
- Fairness needs a chosen definition: demographic parity (equal positive rates), equalised odds (equal error rates), disparate impact (the ratio, 0.8 as the warning line). They conflict when base rates differ; the choice is a policy decision, recorded in the model card.
- SageMaker Clarify: pre-training bias metrics, post-training bias metrics, SHAP explanations, partial dependence plots, foundation-model evaluations for toxicity and stereotyping. SageMaker Model Monitor: data quality, model quality, bias drift and feature attribution drift in production.
- Guardrails for Amazon Bedrock filter prompts and responses (content, topics, words, PII, contextual grounding); Amazon Comprehend finds PII and toxicity in text; Amazon Rekognition moderates images and video; Amazon A2I routes low-confidence and sampled predictions to human reviewers.
- Choose the smallest model that meets the bar; use Inferentia and Trainium, Graviton, right-sized or serverless endpoints, batch, and greener regions. Intended use is a documented fact, not a hope.
- Legal risks of generative AI: intellectual property infringement, biased outputs, loss of trust, end-user harm, hallucination, defamation, privacy violations. Mitigations: indemnity and provenance, Guardrails, grounding and citations, human review, PII detection, documentation.
- Interpretable models (linear regression, decision trees, rule lists, GAMs) are their own explanation; black boxes (ensembles, deep networks, transformers) are explained post hoc with SHAP, LIME, feature importance, partial dependence, attention maps and counterfactuals.
- SageMaker Model Cards document intended use, risk rating, training details and evaluation results for your models; AWS AI Service Cards document intended use, limitations and design choices for AWS's models. Open weights and licences are the transparency of third-party models.
- Two trade-offs: accuracy against interpretability, and exposure against protection. Be transparent about behaviour and limits, guarded about weights, prompts and thresholds; use interpretable models where decisions must be explained and appealed.
- Human-centred explainable AI designs from the decision backwards: amplify judgement, aim for appropriate trust, show confidence and limits plainly, mind cognitive load, make correction easy and feed it back, and keep a human in the loop where it matters.
Questions
Try answering each one out loud before opening it. Lead with the one-line answer, then the reasoning, then one detail that shows you have used it.
What are the eight core dimensions of responsible AI that AWS lists, and what does each mean in one line?
Fairness (impact on different groups), explainability (humans can understand outputs), privacy and security (data obtained, used and protected appropriately), safety (no harmful output or misuse), controllability (mechanisms to monitor and steer), veracity and robustness (correct even on unexpected input), governance (processes that define and enforce practice), and transparency (stakeholders can make informed choices).
- The first four are mostly about the model and its output; the second four are mostly about the organisation around it.
- Each pairs with a tool: Clarify for fairness and explainability, Guardrails for safety, Model Monitor for controllability, Model Cards and AI Service Cards for transparency.
- The same list structures every AWS AI Service Card.
The NIST AI Risk Management Framework's trustworthiness characteristics are nearly the same list under different names, which is why the two are often cited together.
A model has 96 percent overall accuracy but customers from one region complain of frequent wrong decisions. What has happened, and how would you confirm it?
Aggregate accuracy is hiding a subgroup failure: the model is probably far less accurate for that region, usually because the training data under-represented it; confirm with subgroup analysis, computing accuracy and error rates per group.
- Run SageMaker Clarify with region as the facet: accuracy difference, recall difference and disparate impact will show the gap.
- Check the pre-training class imbalance for the same facet to see whether the data was the cause.
- Fix by collecting or re-weighting data for the group, or a per-group threshold, then re-run Clarify.
An overfit model does exactly this: it learns the majority well and treats a small group as noise, so the gap can appear even when the aggregate looks excellent.
Name the types of bias by name and say at which stage each enters.
Historical bias enters before collection (the world was unfair); sampling or selection bias and survivorship bias enter at collection; measurement bias and label bias enter when features and labels are defined and assigned; confirmation bias and algorithmic bias enter during modelling; automation bias and feedback loops enter at deployment.
- Sampling bias: the collected examples do not represent the population served.
- Measurement bias: the feature or label is a poor proxy, and a worse one for some groups (healthcare cost for healthcare need).
- Algorithmic bias: the objective, features or thresholds create disparity even from balanced data.
Survivorship bias is the one people miss: a dataset of customers who stayed says nothing about the ones who left, and a model trained on it will be wrong about exactly them.
Explain demographic parity, equalised odds and disparate impact, and why a model cannot always satisfy all three.
Demographic parity requires equal favourable-outcome rates across groups; equalised odds requires equal true-positive and false-positive rates; disparate impact is the ratio of favourable rates between the disadvantaged and advantaged groups, with 0.8 the usual warning line; when the groups' true base rates differ, equal outcome rates force unequal error rates and vice versa.
- Parity suits situations where the label itself is suspect or the goal is equal access.
- Equalised odds suits situations where the label is trusted and the harm is in the errors.
- Clarify reports them as DPPL, recall and acceptance-rate differences, and DI.
The choice is a policy decision by the people who own the outcome, and it belongs in the model card next to the numbers.
What does Amazon SageMaker Clarify do before training, after training, and for foundation models?
Before training it measures bias in the data (class imbalance, difference in proportions of labels, distribution distances, conditional demographic disparity); after training it measures bias in predictions (disparate impact, accuracy and recall differences, counterfactual flip test) and explains them with SHAP and partial dependence plots; for foundation models it runs evaluations for accuracy, robustness, toxicity, factual knowledge and prompt stereotyping.
- It runs as a processing job, a SageMaker Pipelines step, a Data Wrangler report or inside Autopilot.
- The sensitive attribute is called a facet and need not be a model input.
- Reports attach to the model package in Model Registry and to the Model Card.
Clarify's SHAP for tabular models is Kernel SHAP against the endpoint, so it can explain a model it cannot open, such as a third-party container.
A deployed model's fairness metrics were fine at launch, but six months later approval rates diverge between groups. Which service detects this, and what exactly does it watch?
Amazon SageMaker Model Monitor, with a bias drift monitor that recomputes Clarify's post-training metrics on captured endpoint traffic and compares them with the baseline, plus a feature attribution drift monitor that compares live SHAP rankings with the baseline's.
- Model Monitor has four monitor types: data quality, model quality, bias drift and feature attribution drift.
- Violations go to S3 and CloudWatch, where an alarm can notify or trigger a retraining pipeline.
- The cause is usually distribution shift: production data no longer matches training data.
Feature attribution drift often fires first, because the model starts leaning on a proxy feature before the outcome rates visibly diverge.
An insurer wants humans to check every claim the model is unsure about, with the least engineering effort. Which service, and how is it wired?
Amazon Augmented AI (A2I): a flow definition with a confidence-threshold activation condition sends low-confidence predictions to a worker task template in front of a private, vendor or Mechanical Turk workforce, and writes the human answers to S3.
- Built-in integrations exist for Amazon Textract and Amazon Rekognition; any other model uses the custom integration through the
StartHumanLoopAPI. - Add a random sample of confident predictions so the model's confidence itself is audited.
- The corrected answers become labelled data for the next training run.
Ground Truth shares the same workforce and template machinery but is for labelling before training; A2I is for review after inference.
How does Guardrails for Amazon Bedrock help with veracity in a RAG application?
Through contextual grounding checks: each response is scored for grounding (is it supported by the retrieved source text) and relevance (does it answer the question), and responses below the configured thresholds are blocked, which filters hallucinated answers before the user sees them.
- The other guardrail policies are content filters, denied topics, word filters and sensitive-information (PII) filters.
- A guardrail attaches to model invocations, agents and knowledge bases, or is called directly with the
ApplyGuardrailAPI for any text. - The detailed assessment goes to the trace and logs; the user sees a generic blocked message.
Grounding does not make the model more accurate; it stops unsupported answers from being delivered, which is a different and often more useful property for a support bot.
Which AWS tools find PII or unsafe content in text and images, and when is each the right answer?
Amazon Comprehend detects and redacts PII entities and detects toxicity in text; Amazon Rekognition detects explicit, violent and other unsafe content in images and video with a confidence per label; Guardrails' sensitive-information filter handles PII in Bedrock prompts and responses at inference; and Amazon Macie finds sensitive data in S3 at rest.
- Text in a data pipeline or chat transcript: Comprehend.
- Model traffic in a Bedrock application: Guardrails.
- Uploaded images or video: Rekognition content moderation, often with A2I for the uncertain band.
Rekognition's moderation labels are hierarchical (a top-level category with finer labels), so an app can act on the category and log the detail.
A team wants to cut the environmental footprint of its generative AI workload without changing the use case. What are the levers?
Use the smallest model that meets the quality bar, run on purpose-built silicon (AWS Inferentia for inference, AWS Trainium for training) and Graviton for CPU tiers, right-size or scale to zero (serverless, asynchronous or batch inference), prefer prompt engineering or RAG over fine-tuning and fine-tuning over training from scratch, and choose a region with cleaner energy where residency allows.
- Small model examples: Amazon Nova Micro, Titan Text Lite, Claude Haiku; model distillation shrinks a large model's behaviour into a small one.
- Bedrock batch inference is priced lower than on-demand for work that can wait.
- The Well-Architected sustainability pillar and the Customer Carbon Footprint Tool frame and measure this.
The exam's distractor is always the largest, most capable model; capability beyond the task's needs is waste, not safety.
List the legal risks of working with generative AI and one mitigation for each.
Intellectual property infringement (provider indemnity, providers that do not train on your data, licence review), biased outputs (Clarify, stereotyping evaluation, human review), loss of customer trust (Guardrails, red teaming, disclosure), end-user risk (denied topics, confidence and limitations, A2I for high stakes), hallucination (RAG with citations, contextual grounding), defamation (topic denial, grounding, a correction process), and privacy violations (Comprehend and Macie before training, Guardrails PII filters at inference).
- AWS offers IP indemnity for generative output of its generally available Titan models, and Bedrock does not use customer prompts to train base models or share them with model providers.
- Mata v. Avianca is the hallucination case; Getty Images v. Stability AI is the IP case; Air Canada's chatbot ruling is the end-user-risk case.
Provider terms move risk around but do not remove it: what the model says in your product is your output, under your liability.
What is the difference between a transparent model and an explainable one, with examples of each?
A transparent (interpretable) model can be read directly, so the model is its own explanation, such as linear or logistic regression, a decision tree, a rule list or a GAM; an explainable black box is one whose decisions are reconstructed after the fact by post-hoc methods, such as a random forest, gradient boosting, a deep neural network or a transformer explained with SHAP or LIME.
- Post-hoc methods: feature importance and partial dependence (global), SHAP (local and global), LIME, attention and saliency maps, counterfactuals (local).
- Post-hoc explanations are approximations; they say how the output responded, not why the model is right.
- For generative models, transparency about inputs (RAG citations) usually replaces explanation of internals.
SHAP attributions add up exactly to the difference between the prediction and the average prediction, which is the property that makes them the standard for reason codes.
What goes into a SageMaker Model Card, and how does it differ from an AWS AI Service Card?
A SageMaker Model Card records a model's overview, intended uses and risk rating, training details, evaluation results, business details and additional information such as ethical considerations, versioned in SageMaker with draft, pending review, approved and archived statuses; an AWS AI Service Card is AWS's public document about one of its own services (Rekognition, Textract, Transcribe, Comprehend, Titan) covering intended use cases and limitations, responsible AI design choices, and deployment best practices.
- Model Cards can be auto-populated from a training job and Model Registry package and exported to PDF.
- The risk rating (low, medium, high, unknown) decides how much review the model gets.
- AI Service Cards are read before adopting a managed service; Model Cards are written for models you build.
SageMaker Model Dashboard shows each model's card status next to its Model Monitor alerts, which is how governance and monitoring meet on one screen.
A bank must explain every declined application to the applicant. A neural model is two points more accurate than a logistic regression. Which should it deploy, and why?
The logistic regression, because a decision that must be explained, appealed and audited needs an interpretable model, and the small accuracy gain does not pay for a decision the bank cannot defend.
- This is the accuracy-versus-interpretability trade-off; regulated, high-stakes decisions sit at the interpretable end.
- If the neural model were chosen, SHAP reason codes would be the fallback, but they are approximations of the model.
- Interpretability should be graded (intrinsic, locally explainable, globally explainable, opaque) and a minimum grade set per risk rating.
The second trade-off applies too: the bank gives the applicant specific reasons but never the thresholds or weights, because exposing the mechanism enables gaming it.
Why can exposing a model's internals reduce safety, and how do teams usually resolve the tension with transparency?
Confidence scores, attributions, system prompts and weights all help an adversary craft adversarial examples, run membership inference, evade guardrails or strip safety training, so teams are transparent about what the system does and its limits while guarding how it does it.
- Documentation, disclosure that the user is talking to an AI, and source citations are given to everyone.
- Weights, prompts, exact thresholds and filter rules stay private; detail about why a guardrail fired goes to logs, not to the user.
- Fuller explanations go to the people who need them: the declined applicant, the auditor, the internal reviewer.
Guardrails for Amazon Bedrock is built this way: a configurable generic message to the user, the full assessment in the trace and invocation log.
What are the principles of human-centred design for explainable AI?
Design for the user's decision rather than the model's output, amplify human judgement instead of replacing it, aim for appropriate trust by showing confidence and limitations honestly, communicate in the user's vocabulary, manage cognitive load with progressive disclosure, build a feedback loop that captures corrections for retraining, design inclusively and accessibly, and provide recourse.
- Human-in-the-loop (A2I) for consequential decisions; human-on-the-loop monitoring as the minimum.
- Both over-trust (automation bias) and under-trust are design failures.
- The test of the design is whether a person can change the outcome, not just see a reason.
Textract and Rekognition return a confidence with every result precisely so the application can decide what to auto-accept, flag or send to a person.
What makes a dataset "designed for responsible AI", and how is balance checked before training on AWS?
It is inclusive (covers every group served), diverse (covers the range of conditions), curated from documented sources with known licences and consent, balanced across classes and facet groups, and representative of production traffic; balance is checked with SageMaker Clarify's pre-training metrics, class imbalance and difference in proportions of labels, runnable from Data Wrangler before a model exists.
- Representative does not mean a scale copy of the population: minorities are often over-sampled or re-weighted so the model can learn them.
- Ground Truth annotator agreement is the first label-quality signal; Glue DataBrew profiles expose accidental proxies.
- Provenance is recorded in the Glue Data Catalog or Amazon DataZone and summarised in a data sheet.
Model Monitor's data-quality baseline is the production-side check of the same property: whether today's traffic still looks like the training set.