1Z0-1127-25 Using OCI Generative AI Service Practice Question
A company is using OCI Generative AI to generate code snippets and notices that the model sometimes produces code with security vulnerabilities. They have a small dataset of secure code examples. Which approach would be most effective to reduce vulnerabilities?
⚠ Common exam trap
Many candidates assume fine-tuning (Option B) is always the best solution for domain-specific improvements, but they overlook the practical limitations of small datasets and the immediate effectiveness of prompt engineering for security constraints.
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 prompt engineering with security constraints in the instruction.
Prompt engineering allows the company to inject security constraints directly into the instruction without requiring additional training data or infrastructure. By crafting a prompt that explicitly requests secure code (e.g., 'Generate code that follows OWASP Top 10 best practices and avoids SQL injection, XSS, and buffer overflows'), the model can leverage its existing knowledge to produce safer outputs. This approach is immediate, cost-effective, and does not depend on the size or quality of the small secure code dataset.
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 different base model.
Why it's wrong here
All base models may exhibit similar issues without specific training or prompting.
- ✗
Fine-tune the model on the small secure code dataset.
Why it's wrong here
Fine-tuning on a small dataset may not generalize well and can lead to overfitting.
- ✓
Use prompt engineering with security constraints in the instruction.
Why this is correct
Prompt engineering can enforce security rules without needing large datasets.
- ✗
Deploy a custom model hosted elsewhere.
Why it's wrong here
This is not leveraging OCI Generative AI service and adds complexity.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 1Z0-1127-25 question from scratch — 768 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.