Which is a defense technique against prompt injection in chat assistants?

Study for the CompTIA SecAI+ (CY0-001) Exam. Review flashcards and multiple choice questions, each with detailed explanations. Ace your certification!

Multiple Choice

Which is a defense technique against prompt injection in chat assistants?

Explanation:
Input validation tackles prompt injection by controlling what user input can influence the model. By validating, sanitizing, and constraining inputs—such as removing or escaping dangerous directives, stripping special prompts, and enforcing allowlists or content policies—you prevent crafted user input from altering the system prompt or issuing hidden instructions to the model. This directly reduces the risk that a user’s message can redirect the assistant’s behavior or trigger unintended actions. The other options don’t address this input-path risk. Authentication protects identity, not the model’s behavior in response to prompts. Encryption secures data in transit or at rest, not how the model interprets user input. Model pruning changes the model’s capabilities, which doesn’t stop prompt-injection attempts.

Input validation tackles prompt injection by controlling what user input can influence the model. By validating, sanitizing, and constraining inputs—such as removing or escaping dangerous directives, stripping special prompts, and enforcing allowlists or content policies—you prevent crafted user input from altering the system prompt or issuing hidden instructions to the model. This directly reduces the risk that a user’s message can redirect the assistant’s behavior or trigger unintended actions.

The other options don’t address this input-path risk. Authentication protects identity, not the model’s behavior in response to prompts. Encryption secures data in transit or at rest, not how the model interprets user input. Model pruning changes the model’s capabilities, which doesn’t stop prompt-injection attempts.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy