AI-900 Practice Question: Describe features of generative AI workloads on Azure
A developer is using Azure OpenAI Service to generate structured data in JSON format. They want to ensure that every response is valid JSON without adding instructions in every prompt. Which Azure OpenAI feature should they configure?
⚠ Common exam trap
Many candidates confuse parameters that control randomness (temperature, top_p) or output length (max_tokens) with those that enforce output structure, leading them to incorrectly assume that low temperature alone can produce consistent JSON formatting.
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 the response_format parameter to 'json_object'.
Azure OpenAI Service provides a `response_format` parameter that can be set to `json_object`, which instructs the model to always return valid JSON output. This ensures structured data without requiring the developer to include formatting instructions in every prompt, as the service enforces JSON schema compliance at the API 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.
- ✗
Set the temperature parameter to a low value (e.g., 0).
Why it's wrong here
Temperature adjusts the probability distribution used for token sampling; setting it to 0 makes the model deterministic and greedy, but the model still freely generates any text sequence. A low temperature can reduce randomness and repetition, yet it does not constrain the output to follow a JSON grammar. Without an explicit format parameter, the model may emit prose, Markdown, or malformed JSON, so this alone cannot guarantee structured data.
- ✗
Set the top_p parameter to a high value (e.g., 1).
Why it's wrong here
Top-p, or nucleus sampling, restricts token choices to the smallest set whose cumulative probability exceeds the given p; a high value like 1 includes virtually the entire vocabulary, increasing diversity rather than enforcing a schema. Tuning top-p affects the creativity and variability of generated responses, not the syntactic structure of the answer. Consequently, setting top_p to 1 makes arbitrary JSON even less likely, because the model has an even wider range of non-JSON tokens to choose from.
- ✓
Set the response_format parameter to 'json_object'.
Why this is correct
Setting response_format to 'json_object' explicitly instructs the Azure OpenAI model to emit a valid JSON object, and the service performs constrained decoding to ensure the output parses as JSON. This is the only option that directly addresses the structural requirement, making it the correct choice for generating structured data. Developers often combine this with a clear instruction in the prompt (e.g., 'Return only JSON') to maximize reliability.
- ✗
Set the max_tokens parameter to a high value (e.g., 2000).
Why it's wrong here
The max_tokens parameter only caps the length of the generated completion, trimming output once the token budget is exhausted; it has no influence on grammar, encoding, or object syntax. Raising it to a high value simply allows a longer response, which is useless if the model is producing plain text or unstructured content. Format control requires a dedicated parameter like response_format, while max_tokens merely prevents run-away length.
Go deeper
Related to this question
Learn chapter
Azure Machine Learning Studio
Key term
Model
In IT and AI, a model is a trained mathematical representation that learns patterns from data to make predictions or decisions.
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
About these practice questions
Courseiva writes every AI-900 question from scratch — 985 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 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.