CCARF Practice Question
Correct answer: B
A: The current prompt already instructs redaction but fails 6% of the time. Strengthening prompts may reduce the failure rate but cannot eliminate it. Leaking credit card numbers is a data security issue that demands deterministic enforcement.
B: A PostToolUse hook runs deterministic code (regex pattern matching) on tool results before the model sees them. This ensures credit card numbers are redacted with 100% reliability, regardless of model behaviour. This is the correct guardrail for data security requirements.
C: PreToolUse hooks intercept outgoing tool calls, not incoming results. The credit card numbers appear in tool results (data returned from backend systems), not in tool call parameters. PostToolUse is the correct hook type for redacting data from results.
D: Removing tools that return card numbers would eliminate the agent's ability to look up order and payment information, which is core to its customer support function. The correct approach is to keep the tools but redact sensitive data from their results.