Courseiva
Using OCI Generative AI ServicehardMultiple ChoiceObjective-mapped

1Z0-1127-25 Using OCI Generative AI Service Practice Question

Exhibit

Refer to the exhibit.

Error:
{
  "code": "InvalidParameter",
  "message": "The parameter 'top_p' should be between 0 and 1.",
  "status": 400
}

A developer makes an API call to generate text with top_p=1.5. What is the correct way to fix this error?

⚠ Common exam trap

OCI often tests the misconception that `top_p` can be any positive number, similar to `temperature`, when in fact it is a probability threshold strictly bounded between 0 and 1.

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

Set top_p to a value between 0 and 1, e.g., 0.9

The `top_p` parameter, also known as nucleus sampling, must be a probability value between 0 and 1. Setting it to 1.5 is invalid because it exceeds the allowed range, which would cause the API to reject the request. The correct fix is to set `top_p` to a valid value such as 0.9, which restricts token selection to the smallest set whose cumulative probability exceeds that threshold.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Remove the top_p parameter from the request

    Why it's wrong here

    Removing it uses default, which is valid, but if they need top_p, adjust value.

  • Increase the temperature parameter to compensate

    Why it's wrong here

    Temperature does not affect top_p validity.

  • Set top_p to a value between 0 and 1, e.g., 0.9

    Why this is correct

    Correcting the value to within the allowed range fixes the error.

  • Use the top_k parameter instead

    Why it's wrong here

    Changing parameters avoids the error but does not fix the invalid top_p value.

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 →

How Courseiva writes practice questions · Editorial policy

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.