Lesson 1 of 3 Responsible AI in Practice

Making Foundation Model Outputs Transparent and Explainable

This lesson covers user-facing explanations, evidence, confidence metrics and reasoning traces that show users where answers come from and let developers and auditors see how the system reached an output.

Learning outcomes

After completing this lesson, you will be able to:

  • Present evidence and citations to users.
  • Derive confidence from retrieval, grounding and agreement signals.
  • Capture reasoning traces for developers and auditors.

User-facing explanations and evidence

Evidence presentation shows the sources behind an answer: citations with document titles, links and the quoted passages, so users can verify claims themselves. Bedrock Knowledge Bases return citations that map answer spans to source chunks, which the interface can render as footnotes or expandable quotes. Reasoning displays give a short, plain-language explanation of how an answer or recommendation was reached ("Based on your contract type and start date, you are eligible because..."), or the steps an agent took ("I checked your order status and the returns policy"). These summaries are generated for users; raw internal reasoning or traces are usually not shown, because they can be confusing or expose internal details.

Transparency also means disclosing that content is AI-generated, stating limitations ("This assistant cannot give legal advice") and making it easy to reach a human.

The following diagram shows how evidence and confidence reach employees and HR.

Making HR answers trustworthy. Answers show citations with quoted policy passages; when the grounding score is low, the assistant adds a caveat and a link to HR. Grounding scores are published as CloudWatch metrics by topic to find weak areas, and agent traces are stored with each answer for disputed cases.
The threshold is set from evaluation results.

Confidence and uncertainty

FMs do not reliably report their own confidence, so applications derive it from signals: retrieval relevance scores, contextual grounding scores, agreement across several sampled answers, judge model ratings and validation results. The application can show a confidence indicator, add a caveat to low-confidence answers, or withhold them and escalate. Publishing these signals as CloudWatch metrics (for example the share of answers below a grounding threshold, by topic) quantifies uncertainty across traffic and reveals areas where the knowledge base is weak.

cloudwatch.put_metric_data(Namespace="Assistant/Quality", MetricData=[
    {"MetricName": "GroundingScore", "Value": grounding, "Unit": "None",
     "Dimensions": [{"Name": "Topic", "Value": topic}]},
    {"MetricName": "LowConfidenceAnswer", "Value": 1 if grounding < 0.7 else 0, "Unit": "Count",
     "Dimensions": [{"Name": "Topic", "Value": topic}]},
])
Select all that apply

Deriving confidence

Exam skills 3.4.1

Foundation models do not reliably report their own confidence. Choose the signals an application can use instead.

Log in to try this activity Interactive activities are free with an account.

Reasoning traces for developers and auditors

Amazon Bedrock agent traces, enabled with enableTrace, record each step of an agent's orchestration: the model's rationale, which action group or knowledge base it invoked with what input, the observation returned, and guardrail assessments. AgentCore Observability and Strands Agents emit equivalent OpenTelemetry spans, and Step Functions execution history records each step of workflow-based agents. Stored with decision logs, traces let reviewers understand why an agent acted as it did. The following table summarises transparency mechanisms by audience.

MechanismAudienceImplementation
Citations and quoted evidenceEnd usersKnowledge base citations rendered in the UI
Plain-language explanationEnd usersGenerated summary of reasoning or steps
Confidence indicator or caveatEnd usersDerived from grounding, retrieval and judge scores
Confidence metricsOperatorsCloudWatch custom metrics and dashboards
Reasoning tracesDevelopers and auditorsBedrock agent traces, OpenTelemetry spans, execution history
Sort into groups

Who is the explanation for?

Exam skills 3.4.1

Decide whether each transparency feature mainly serves end users or developers and auditors.

Log in to try this activity Interactive activities are free with an account.
Worked example

Trusted HR answers

Employees distrust an HR assistant because they cannot tell whether answers reflect actual policy, and HR cannot explain disputed answers.

The assistant should show citations with quoted policy passages, add a caveat and a link to HR when the grounding score is low, publish grounding scores as CloudWatch metrics by topic to find weak areas, and store agent traces with each answer so HR can review disputed cases.

Check yourself

Should raw agent traces be shown to end users as explanations?

Show answer

No. Show user-facing summaries of reasoning with citations and evidence instead.

Exam Tips

Remember for the exam

  • Show citations and quoted evidence so users can verify answers.
  • Give user-facing summaries of reasoning, not raw traces.
  • Derive confidence from grounding, retrieval and judge scores; publish as metrics.
  • Bedrock agent traces record rationale, actions and observations.