AI0-001 AI Security Practice Question
A security team is reviewing an LLM-powered application that can execute SQL queries based on user requests. They want to implement defenses against prompt injection that could lead to unauthorized database access. Which TWO controls are MOST effective? (Select two.)
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 filter malicious prompt content, and output filtering can block responses containing unauthorized data. Rate limiting does not prevent injection, access controls on the database are important but not a direct defense against injection (they limit impact), and robust training does not prevent injection at inference time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Robust training techniques
Why it's wrong here
Robust training makes the model less vulnerable to some attacks, but not to inference-time prompt injection.
- ✓
Input validation and sanitization
Why this is correct
Validates and sanitizes user input to remove or neutralize injection attempts.
- ✗
Access controls on the database
Why it's wrong here
Access controls limit what the SQL execution can do, but do not prevent injection itself.
- ✗
Rate limiting
Why it's wrong here
Rate limiting reduces abuse but does not prevent injection attacks.
- ✓
Output filtering
Why this is correct
Filters LLM outputs to prevent sensitive data leakage, even if injection succeeds.
About these practice questions
One of 754 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.