CCCAR‑P Study
Module 3 · ~22 pages in course

Responsible AI, Safety & Risk for Architects

Exam domains: D5 (all five objectives), plus D3 (auth and capability gaps) and D4 (failure diagnosis)

This module answers: what stops the system from refusing a legitimate request, producing an unfair outcome, or taking an action no one approved? Safety is a layered system. Every layer has a blind spot the next layer must cover. The architect decides where each layer sits and how it behaves when it fails.

3.1 The alignment boundary D5

  • Training-time alignment (Anthropic's job): Claude is trained against the published constitution (priority: broadly safe, ethical, policy-compliant, genuinely helpful — an overall balance). It lowers baseline risk for broadly harmful categories on every request, the same for every user.
  • Inference-time control (your job): system instructions, runtime screening, tool authorization, human review. These enforce deployment-specific rules.
  • Claude cannot enforce a rule it was never told. Your domain policy, data rules, and authorization model are not in the training.
LayerCoversMissesOwner
Trained behaviorBroadly harmful contentDomain policy, data rules, authorizationAnthropic
System-prompt instructionsRole, tone, stated limitsAnything a strange or adversarial input can talk it out ofArchitect
Runtime screeningDisallowed content in input/outputActions with side effects; novel attacksArchitect
AuthorizationCan this caller do this nowContent quality and fairnessArchitect

Exam trap

"Claude refused every harmful test prompt, so it will also block cross-tenant access." Wrong. A normal-looking in-domain request that violates a policy exists in none of those layers. Broad harm → trained behavior. Tenant isolation, approved phrasing, refund sign-off, program eligibility → the application layer.

3.2 Risk categories and assessment D5

RiskWhat happensControl sits at
Direct prompt injectionUser input overrides instructionsInput screening; structure over instruction
Indirect prompt injectionInstructions hidden in retrieved documents or tool output treated as trusted content. The primary attack path for RAG and agents; invisible to user-input screening entirelyScreen retrieved content and tool output before adding it to context
Token-budget exhaustionPadded input truncates work or spikes costInput limits, budgets
Tool and action abuseModel is induced to call a side-effecting tool outside policyDeterministic tool authorization; least privilege
Data exposureSensitive fields enter context or logs regardless of model behaviorMinimize and redact before the call

Practice: a written risk assessment

Walk the request path and the data path together. At every entry point (user input, retrieved content, tool output, model output, logs), ask: what could an attacker do? which control stops it? A plausible attack with no matching control is a finding. Log per risk: category, affected component, likelihood and impact, mitigating control, owner, evidence. A security reviewer signs this document.

3.3 Placing guardrails on the request path D5 D3

Three decision points, each answering a different question. A control at one point does nothing for the others — an output filter at the end can't stop a refund tool that already fired.

Control pointQuestionUse a model whenUse a deterministic rule when
1. Input screeningShould this request reach the model?Ambiguous intent, jailbreak/injection patternsBlocklist, regex, length, format
2. Output screeningCan this output be returned safely?Toxicity, policy compliance (judge)Known strings, disallowed fields, schema violations
3. Tool-call authorizationCan this caller do this action in this context?RarelyAlmost always: allowlist + identity + scope, provable and replayable

A classifier can be talked around; a rule is brittle. Chain them and write down what each one misses.

Fail closed everywhere a wrong pass-through causes harm. If you don't choose a direction, surrounding code usually lets traffic through — a guardrail that silently fails open is worse than none. Log every block or failure at a gate. This applies to components you build yourself; Anthropic's built-in safety controls can't be configured by the operator added.

Refusals verify docs: the API returns stop_reason: "refusal", possibly with a nullable details object. Handle it per category and reset or rewrite the refused turn; resending on the refused context keeps getting refused.

Reference path: request → input screening (fail closed) → model → output screening (fail closed) → deterministic authorization before any side effect → response, logged at every gate.

Skill supply-chain security

  • A Skill is distributed code plus instructions; malicious logic in the package is invisible to conversation-level screening.
  • Audit before trusting: network, shell, filesystem, credential reads, behavior beyond the stated purpose.
  • Runtime isolation as a safety net: least privilege, sandboxing, limited file/network access, no standing credentials.
  • Trusted-source policy: internal repos, verified publishers, signed releases. Don't assume the platform vets a Skill for you.
  • Record every audit outcome: approved, rejected, or re-audited after remediation.

3.4 Fairness and transparency D5

Fairness is an architectural property with four injection points you control:

  • Retrieval corpus: over- or under-representation, outdated or single-region guidance.
  • Prompt framing: embedded assumptions ("flag suspicious applications" nudges toward denial).
  • Few-shot examples: same skew risk as the corpus.
  • Downstream routing: who gets human review, who gets auto-decided.
AudienceNeeds from the same decision record
Affected userWhy the decision happened, in actionable terms (a concrete denial reason)
RegulatorConsistent handling of comparable cases; ability to reconstruct any decision
Dev teamFull trace: prompt version, retrieved content, output, every routing step

Decision logging: input, retrieved document IDs, prompt version, example set, output, routing path — indexed so a single decision can be replayed. Build it once; every audience draws from it.

Gaps to find: an unlogged routing step, retrieved content that was never captured, outputs stored with no inputs, overall accuracy with no sub-group breakdown. The decision log is itself sensitive data — minimize, limit retention, control access.

Exam trap

"The vendor ran a bias evaluation" or "the model was trained to be fair, so fairness is handled." Your corpus, framing, examples, and routing create skew the vendor never saw. Instrument and monitor it; don't assume it's a built-in model property.

3.5 Human-review routing by stakes D5

Treat reviewer attention as a fixed budget. Reversibility and error cost set the risk tier. Confidence estimates how likely an output is wrong; it sets volume, not risk — and it's only useful when calibrated.

Rule: low confidence and irreversible or high-cost → route to a human. When signals conflict, weight cost and reversibility more heavily. Route by risk, not by volume.

PlacementGives youCostsFits
Pre-action approvalNothing irreversible happens unreviewedLatency; depends on reviewer availability; doesn't scaleHigh-risk, irreversible (a low-confidence denial)
Post-action auditHigh throughputThe error already happenedReversible, lower-cost
Sampled reviewMonitors quality without slowing the flowIndividual bad cases can slip throughMonitoring the whole system

The reviewer's interface determines whether review is real: show the input, the model output, and the specific reason it was flagged.

Two independent failures, either one disables review: too much volume (consent fatigue, review becomes rubber-stamping) and missing context. Anthropic's own agentic research leans toward fewer step-by-step approvals and review concentrated at higher-value checkpoints (plan review, exceptions) — which is why Claude Code has plan-level approval.

3.6 Compliance: from obligation to evidenced controls D5

The route is a prerequisite, not proof. Every obligation becomes three things: a specific technical control, a named owner, and continuously updated evidence (the most commonly missing piece).

ObligationControlEvidenceOwner
HIPAA PHIHIPAA-ready plan or a BAA'd API; HIPAA settings on; only in-scope featuresSigned BAA, admin-console config screenshot, compliant-feature listSecurity lead
FedRAMP impact levelAn authorized route meeting or exceeding the required levelAuthorization record; proof the workload only runs in that environmentPlatform lead
Data residencyIn-region processing and storage, logs/cache/monitoring includedResidency config + a data-flow record of every copyData owner
Decisions reconstructableRetained, queryable decision logA reconstructed example from live logsArchitect

Not used for training ≠ not retained. Data can be excluded from training and still be retained for logging, abuse prevention, or legal reasons.

Reviewers accept signed agreements, config screenshots, authorization records, or a log query that returns a result. They don't accept a design doc that names a control with no owner and no evidence (same logic as FIAR KSDs and A-123 testing).

Configurations drift; revalidate the register periodically. "A prompt instruction to handle health data carefully" is not HIPAA evidence. A BAA plus an enabled configuration is.

3.7 Assembling the safety stack (order matters)

  1. Draw the boundary: domain rules in the application layer; explicit rules into a deterministic rules engine; Claude drafts the explanation.
  2. Place input, output, and authorization controls; pick a check type for each; fail closed.
  3. Instrument the four fairness injection points, serving all audiences from one decision log.
  4. Route review by risk; pre-action approval for low-confidence, hard-to-reverse harm.
  5. Build the control register: obligation → control → owner → evidence.

Steps 3 and 4 depend on logging; step 5 depends on evidence from steps 2–4.

Your logged weak spots — Module 3

  • Implement guardrails and safety controls: a Skill or prompt can't enforce; a hook or authorization can. Scope comes from the server-side session, never from a model-supplied tool parameter. Watch your pull toward detective controls (trace IDs, logging) when a preventive option is available.
  • Ensure compliance with regulations: filter by authorization first. For CUI/FedRAMP, Claude Enterprise is excluded regardless of license count. Reason from the exam's rule, not "DoD already uses Bedrock."
  • Identify risks, limitations, failure modes: drill the four model properties until they're reflexive.

Module 3 self-test

  1. Which layer enforces "never show tenant A's data to tenant B"? Why can't trained behavior do it?
  2. A RAG agent executes instructions hidden in a retrieved page. What risk is this, and where does the control sit?
  3. Name the three components of deterministic tool authorization.
  4. Your screening service times out at peak load and requests pass through anyway. What's wrong?
  5. A decision is high-confidence but irreversible and high-cost — route to a human? What variables decide it?
  6. What three things does every obligation in the register need?

中文要点

安全是分层体系。训练对齐只覆盖广泛有害内容;领域规则、租户隔离、授权必须在应用层实现。

间接 prompt injection 来自检索内容和工具输出,是 RAG/agent 的主要威胁,要在加入上下文前筛查。

三个控制点:输入筛查、输出筛查、工具调用授权。授权必须确定性(allowlist + 身份 + 范围)。自建护栏要 fail closed。

公平的四个注入点:语料、prompt 措辞、示例、下游路由。一份决策日志服务用户、监管、开发三类受众。

人工审核按风险(可逆性 + 错误成本)路由,置信度只决定数量。每项合规义务要有控制、负责人、证据。