Courseiva

AI0-001 AI Concepts and Techniques Practice Question

A company wants to deploy an LLM-based chatbot that can handle sensitive customer information. Which THREE measures should be implemented to mitigate prompt injection attacks? (Choose 3)

⚠ Common exam trap

AI0-001 often tests the misconception that model size or temperature settings affect security, when in fact prompt injection mitigation requires input/output controls and system-level instructions.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use a system prompt that instructs the model to ignore any instructions in the user input

Option A is correct because a hardened system prompt that explicitly tells the model to treat user input as data and ignore embedded instructions is a primary defense against prompt injection, helping the model distinguish trusted developer instructions from untrusted user content. Option B is correct because output filtering adds a defense-in-depth layer that inspects the model's responses for harmful, leaked, or policy-violating content before it reaches the user, catching injections that bypass input controls. Option C is correct because sanitizing user inputs by stripping or escaping special characters, control tokens, and injection-style delimiters (e.g., markdown fences or role-play markers) reduces the attack surface for crafted prompts. Option D is not correct because model size does not determine resistance to prompt injection; smaller models can still be manipulated and may even be more susceptible. Option E is not correct because temperature controls randomness in token sampling, not the model's adherence to injected instructions, so lowering it does not mitigate prompt injection.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use a system prompt that instructs the model to ignore any instructions in the user input

    Why this is correct

    A system prompt establishes instruction hierarchy, telling the model to treat user input as data rather than commands. This directly mitigates injection attempts that try to override the chatbot's original behaviour, though it must be combined with other defences.

  • ✓

    Implement output filtering to detect and block harmful responses

    Why this is correct

    Output filtering inspects the model's response before delivery, blocking content that indicates a successful injection or leaks sensitive data. This satisfies the scenario's need to protect customer information by catching harmful outputs the model itself failed to refuse.

  • ✓

    Sanitize user inputs to remove special characters and escape sequences

    Why this is correct

    Stripping special characters and escape sequences from user inputs removes the delimiters attackers use to break out of the intended instruction context, directly satisfying the requirement to mitigate prompt injection in a chatbot handling sensitive customer information.

  • ✗

    Use a smaller model with fewer parameters

    Why it's wrong here

    Parameter count affects capability and cost, not instruction/data separation; a smaller model still follows injected text embedded in user input. Choosing a smaller model is correct when latency, memory or budget constrain deployment, not when mitigating prompt injection.

  • ✗

    Set temperature to a low value

    Why it's wrong here

    Temperature only scales the sampling distribution over the next token; it does not separate trusted instructions from untrusted input, so injected directives still execute. Low temperature is correct when the requirement is deterministic, repeatable output rather than injection defence.

About these practice questions

This AI0-001 question is part of Courseiva's 962-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.