AI0-001 AI Security Practice Question
A company uses an LLM to generate code. They want to ensure that the model does not accidentally output sensitive internal logic. Which practice should they implement?
⚠ Common exam trap
The AI0-001 exam often tests the distinction between proactive security testing (red teaming) and reactive runtime controls (output filtering), leading candidates to confuse vulnerability discovery with real-time content protection.
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
✓
Output filtering to block sensitive patterns
Output filtering is the correct practice because it directly inspects the model's generated text for patterns that match sensitive internal logic (e.g., API keys, source code snippets, or proprietary algorithms) and blocks or redacts them before the output is returned to the user. This is a reactive security control that operates at the application layer, ensuring that even if the LLM inadvertently generates sensitive content, it is never exposed. Rate limiting, red teaming, and federated learning address different concerns (availability, vulnerability discovery, and data privacy during training, respectively) and do not prevent the accidental leakage of internal logic in real-time outputs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Rate limiting API calls
Why it's wrong here
Rate limiting caps request volume to protect availability and cost; it does not inspect or filter generated content, so sensitive internal logic can still appear in output. It is tempting because it is a common API safeguard, and would be correct when defending against abuse or denial-of-service rather than leakage.
- ✗
Red teaming the model
Why it's wrong here
Red teaming identifies vulnerabilities through adversarial testing but produces findings, not runtime enforcement, so it cannot prevent the model emitting sensitive logic. It is tempting because it is a recognised assurance activity, and would be correct when validating model robustness before deployment.
- ✓
Output filtering to block sensitive patterns
Why this is correct
Output filtering inspects generated code before delivery, blocking responses that match sensitive patterns such as internal identifiers or proprietary logic. This directly satisfies the requirement that the LLM must not accidentally emit confidential internal logic, catching leakage at the last stage.
- ✗
Federated learning
Why it's wrong here
Federated learning trains a shared model across distributed data without centralising it; it does not constrain what a deployed LLM emits in its responses. It is tempting because it addresses data privacy during training, and would be correct when sensitive datasets must remain on local devices.
About these practice questions
One of 962 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.