A company deploys an LLM application with input and output guardrail classifiers. What is the function of an INPUT guardrail in this architecture?
- A.A. Checking model responses for harmful content before delivering them to users
- B.D. Caching previous responses to reduce API costs for repeated inputs
- C.C. Validating the model's API key before each request
- D.B. Screening user messages for prompt injection, policy violations, PII, and other unsafe content before they are sent to the LLM
Why D is correct
Input guardrails (pre-processing classifiers) sit between the user interface and the LLM: they analyze incoming messages for injection patterns, jailbreak attempts, prohibited content, PII, and off-topic queries before the message reaches the model. Output guardrails (post-processing) check the model's response before delivery to users. API key validation is authentication, not a guardrail. Caching is a performance optimization.
Know someone studying for AI Security Fundamentals? Send them this one.