Courseiva

AI-900 Practice Question: Describe features of generative AI workloads on Azure

A software company uses Azure OpenAI to generate code snippets. They want to evaluate how confident the model is in each token it generates. Which Azure OpenAI feature provides a numerical measure of confidence for each generated token?

⚠ Common exam trap

Many exam-takers confuse hyperparameters that control generation behavior (temperature, top-p, presence penalty) with output features that provide model confidence metrics, leading them to pick a parameter that influences randomness rather than the one that reports token-level probabilities.

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

Logprobs

Logprobs (log probabilities) is the Azure OpenAI feature that provides a numerical measure of confidence for each generated token. It outputs the log probability of each token being selected by the model, allowing developers to assess how certain the model is about its predictions at the token level.

Answer analysis

Option-by-option breakdown

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

  • Logprobs

    Why this is correct

    Logprobs directly exposes the model's internal probability distribution: for each generated token, Azure OpenAI returns the natural logarithm of the token's probability under the model (and often the top alternative tokens). By exponentiating these values, you obtain per-token probabilities that can be aggregated (e.g., via geometric mean) into a quantitative confidence score for the entire code snippet. This is the only listed option that provides an output measurement of the model's certainty about its own generated tokens.

  • Temperature

    Why it's wrong here

    Temperature is a sampling hyperparameter that scales the logits before the softmax, shaping how peaked or flat the token probability distribution becomes. A low temperature (e.g., 0.1) makes the distribution more deterministic and likely to pick the highest-probability token, whereas a high temperature (e.g., 1.0) increases randomness and creativity. However, temperature is an input control that modifies the generation behavior; it does not return any per-token or overall confidence value. The chosen temperature value tells you nothing about how sure the model is about the specific code it produced.

  • Top-p

    Why it's wrong here

    Top-p (nucleus sampling) truncates the vocabulary to the smallest set of tokens whose cumulative probability exceeds the threshold p (e.g., 0.9), then renormalizes probabilities and samples from that restricted set. It affects which tokens are even considered at each decoding step, and the selection reflects the shape of the distribution only indirectly. Crucially, the Azure OpenAI API does not return the probabilities of the tokens in that nucleus set or any aggregate confidence metric—top-p is a generation control, not a diagnostic output.

  • Presence penalty

    Why it's wrong here

    Presence penalty is a logit bias that subtracts a fixed value from every token that has already appeared in the current generated sequence, thereby reducing the likelihood of repetition. It shifts future token probabilities to encourage novelty and diversity in the code, but it has absolutely no role in quantifying the model's confidence after the output is generated. The penalty value is an input parameter that alters the model's sampling behavior, not a measured signal of uncertainty. Therefore, it cannot be used to determine how confident the model is in its generated code.

About these practice questions

This AI-900 question is part of Courseiva's 985-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 AI-900 practice question is part of Courseiva's free Microsoft 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 AI-900 exam.