1Z0-1127-25 Fundamentals of Large Language Models Practice Question
A developer is using OCI GenAI to generate structured data. They often get responses that include additional commentary or markdown. Which prompt engineering technique should they use to ensure only JSON output?
⚠ Common exam trap
Oracle often tests the misconception that adjusting sampling parameters (like temperature or top_p) can enforce output format, when in fact these parameters control randomness and diversity, not structural constraints—leading candidates to overlook the direct prompt engineering solution.
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
✓
Add 'Return only JSON' at the end of the prompt.
Explicitly instructing the model to 'Return only JSON' directly constrains the output format, reducing the likelihood of extraneous commentary or markdown. This technique leverages prompt engineering to guide the model's behavior without altering inference parameters like temperature or top_p, which control randomness rather than output 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.
- ✗
Set top_p to 0.1.
Why it's wrong here
Incorrect: Low top_p reduces diversity but does not force JSON.
- ✗
Use a model with a larger context window.
Why it's wrong here
Incorrect: Larger context does not enforce output format.
- ✓
Add 'Return only JSON' at the end of the prompt.
Why this is correct
Correct: Direct instruction enforces format.
- ✗
Increase the temperature to 1.5.
Why it's wrong here
Incorrect: Higher temperature increases randomness, not format compliance.
Go deeper
Related to this question
About these practice questions
One of 768 original 1Z0-1127-25 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 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.