Courseiva
AI SecuritymediumMultiple ChoiceObjective-mapped

AI0-001 AI Security Practice Question

An AI chatbot is being developed to assist with customer support. The team is concerned about prompt injection attacks where malicious users try to override the system's instructions. Which defense is MOST effective against direct prompt injection?

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

Input validation and sanitization

Input validation and sanitization can detect and block attempts to inject malicious instructions. While guardrails help, the primary defense is to filter and validate user inputs before they reach the model.

Answer analysis

Option-by-option breakdown

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

  • Input validation and sanitization

    Why this is correct

    Sanitizing inputs removes or neutralizes injection attempts, directly mitigating prompt injection.

  • Rate limiting API requests

    Why it's wrong here

    Rate limiting prevents abuse but does not stop a single crafted injection attack.

  • Output filtering

    Why it's wrong here

    Output filtering catches harmful responses but doesn't prevent the injection from being processed.

  • Using a larger model

    Why it's wrong here

    Model size does not inherently prevent prompt injection.

About these practice questions

This AI0-001 question is part of Courseiva's 754-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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.