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.

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}]},
])Deriving confidence
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.
| Mechanism | Audience | Implementation |
|---|---|---|
| Citations and quoted evidence | End users | Knowledge base citations rendered in the UI |
| Plain-language explanation | End users | Generated summary of reasoning or steps |
| Confidence indicator or caveat | End users | Derived from grounding, retrieval and judge scores |
| Confidence metrics | Operators | CloudWatch custom metrics and dashboards |
| Reasoning traces | Developers and auditors | Bedrock agent traces, OpenTelemetry spans, execution history |
Who is the explanation for?
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.
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.