1Z0-1127-25 Prompt Engineering Practice Question
A prompt engineer is troubleshooting a chatbot that consistently fails to follow instructions when the user includes adversarial input. Which two strategies can mitigate prompt injection attacks? (Choose 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
✓
Use instruction shielding: clearly separate system instructions from user input
Instruction shielding (clear separation of instruction and input) and input validation/sanitization are effective defenses. Adding more examples or adjusting temperature do not address 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.
- ✗
Increase temperature to make model less predictable
Why it's wrong here
Higher temperature does not prevent injection; it may even increase erratic behavior.
- ✓
Use instruction shielding: clearly separate system instructions from user input
Why this is correct
Separating instructions from user input prevents the model from treating user input as instructions.
- ✗
Use a smaller model to reduce capability
Why it's wrong here
Model size does not prevent injection; smaller models may be less capable but still vulnerable.
- ✗
Add more few-shot examples with safe outputs
Why it's wrong here
Examples do not prevent injection; they only show desired behavior.
- ✓
Implement input validation and sanitization to remove adversarial patterns
Why this is correct
Sanitizing input removes potential injection strings before they reach the model.
Go deeper
Related to this question
About these practice questions
This 1Z0-1127-25 question is part of Courseiva's 768-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-1127-25 practice question is part of Courseiva's free Oracle 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 1Z0-1127-25 exam.