AI-901 Implement AI solutions with Microsoft Foundry MEDIUM
PRODUCTION SCENARIO
An extraction app must always return a JSON object with name, date, and guests fields. JSON mode returns valid JSON, but the keys drift and fields go missing.

Which approach guarantees the schema?

Answering here is anonymous. Nothing is saved unless you sign in.

Show answer and explanation

Answer: Structured outputs with a strict json_schema response format

Structured outputs make the model follow a JSON Schema supplied as part of the inference call, which JSON mode cannot do because it guarantees valid JSON without ensuring strict adherence to a schema. For Chat Completions the schema goes in response_format with strict set to true.
Free

Keep practicing AI-901

undefined original AI-901 practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free