1Z0-1127-25 Prompt Engineering Practice Question
A developer needs to extract structured data from news articles in JSON format, but the model occasionally outputs extra fields or omits required fields. Which prompt engineering approach would MOST reliably enforce the exact schema?
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
✓
Specify the exact JSON schema in the task instruction and include constraints such as required fields
Providing a JSON schema with explicit instructions and constraints directly in the prompt is the most reliable way to enforce exact structure.
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 few-shot example of the desired JSON output
Why it's wrong here
Few-shot may help but does not guarantee exact schema; explicit constraints are more reliable.
- ✓
Specify the exact JSON schema in the task instruction and include constraints such as required fields
Why this is correct
Explicit schema and constraints in the prompt give the clearest guidance.
- ✗
Lower the temperature to 0 to make output deterministic
Why it's wrong here
Determinism helps but does not enforce schema; the model may still deviate.
- ✗
Use chain-of-thought prompting to reason about the article before outputting JSON
Why it's wrong here
Chain-of-thought adds reasoning but does not enforce output format.
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.