Question 1 A claims intake service must return an object with claim_id, severity, and a list of missing_documents. Downstream code rejects extra fields. Which implementation most directly gives the application a machine-checked output contract? Set response_format=json_object without a schema and assume all three fields always exist. Specify response_format=json_schema with exactly those required fields, reject unrecognized properties, and validate the parsed result. Ask for a JSON example in the system prompt and parse whatever is returned. Truncate each generated message to 400 characters before calling the parser. ExplanationCorrect Answer B:JSON-schema structured output constrains named properties instead of merely requesting JSON prose; application validation still protects integration boundaries. Other Answers A:JSON-object mode targets syntactic JSON but does not guarantee the required keys or prohibit unexpected ones. C:A natural-language example alone cannot enforce the exact downstream field contract. D:Truncation can break valid JSON and does not establish the permitted field set.
Question 2 A permit reviewer wants every model result to include a decision string chosen from approved labels, never free-form synonyms. Which format constraint best expresses the permitted values? Use the JSON schema description field to mention the labels but accept any string. Request markdown headings named after the labels. Use a JSON-schema string property with an explicit enum of the approved decision labels. Generate a numeric score and use its magnitude as an undocumented label. ExplanationCorrect Answer C:An enum defines the allowed discrete labels directly in the structured-output contract and supports deterministic downstream validation. Other Answers A:Documentation prose does not bound the allowed values as an enum does. B:Markdown formatting does not restrict a JSON property to the permitted values. D:A continuous score is not a reproducible mapping to the required categorical decisions.
Question 3 An expense ingestion endpoint requires amount to be numeric and currency_code to be a fixed string; the model occasionally returns a quoted amount. Which finding identifies why a plain text prompt is insufficient? Any syntactically valid JSON automatically converts quoted numerals into JSON numbers. CSV output is the only format that can represent numeric values without ambiguity. A larger temperature guarantees that numeric tokens will no longer be quoted. A text instruction may produce valid-looking JSON while leaving amount as a string; use a typed schema and verify the parsed value. ExplanationCorrect Answer D:Syntax alone cannot prove application field types, so typed structured output plus validation is needed. Other Answers A:The JSON parser preserves string and number types; it does not silently coerce them. B:CSV has no native typed field validation; a typed JSON schema is more direct here. C:Temperature affects sampling and does not enforce data types.
Question 4 An audit export relies on a JSON schema containing a regex pattern for account identifiers; a Databricks Foundation Model API request rejects the schema. What is the best supported correction to the request? Remove the unsupported regex pattern keyword from the model-facing schema and validate the account format in application code. Switch to JSON-object mode and assume the account format becomes enforced. Retry with a larger context window until the same schema is accepted. Encode the regex in a field named tool_choice. ExplanationCorrect Answer A:Databricks structured outputs support a subset of JSON Schema; patterns are documented as unsupported, so post-generation validation is required. Other Answers B:JSON-object mode loses schema constraints rather than implementing the unsupported pattern. C:A context window increase cannot enable a schema keyword that the API does not support. D:Tool choice controls tool invocation and is not an account-format validation field.
Question 5 A customer reply system must provide an object containing answer, citation_ids and a Boolean needs_human_review, but some responses omit the review flag. Which prompt and API arrangement most directly corrects this omission? Provide five free-form example paragraphs and rely on the model inferring the schema. Define the flag as required in the structured-output schema and verify the serialized object against that schema. Apply token limits until the model has no space for optional content. Create a second LLM call that guesses whether the missing flag should be true. ExplanationCorrect Answer B:A required Boolean property makes omission a contract failure; independent validation catches unsupported model or provider edge cases. Other Answers A:Examples may guide style but do not make the flag structurally required. C:Short output budgets can cut off required fields instead of reliably creating them. D:A follow-up guess is not equivalent to a required and verifiable field on the original result.
Question 6 A team tries to enforce exact array length using minItems and maxItems in a structured-output request, but its deployment documents say length constraints are not enforced. What is the correct engineering assumption? A strict flag guarantees every possible JSON Schema keyword, including minItems, is enforced. A schema with extra nesting automatically enforces the array count. The model-facing schema can guide the array shape, but the application must check the required array length after generation. The application can ignore array length because it is only presentation. ExplanationCorrect Answer C:Databricks notes that size and length constraints are not enforced by Foundation Model APIs; that invariant belongs in a subsequent validation step. Other Answers A:Strict output adherence covers the supported subset, not arbitrary unsupported length restrictions. B:Nesting increases complexity without guaranteeing array cardinality. D:The scenario specifies exact cardinality as a business rule, so accepting any length violates the contract.
Question 7 A typed JSON response for a manufacturing alert has 78 distinct properties, and the API rejects the overly complex schema. What change is most consistent with published structured-output limits? Increase request timeout to make a 78-key schema valid. Turn on streaming to circumvent the key-count limit. Rename each property to a shorter string without reducing the number of keys. Reduce the model-facing schema to no more than 64 relevant keys and split secondary enrichment into a separate validated stage. ExplanationCorrect Answer D:Databricks documents a 64-key limit for its supported structured-output schema, so a staged contract addresses the actual boundary. Other Answers A:Timeout affects processing duration, not the documented key-count limit. B:Streaming does not change the schema-key limit and may introduce separate provider restrictions. C:Shorter key names do not reduce the number of schema properties.
Question 8 A vendor-specific chat model rejects an API call combining structured-output configuration and function tools. The deployment uses the Claude structured-output path identified in the Databricks limitations. Which resolution respects the provider limitation while preserving validation? Separate the tool-using step from a supported structured final-response call, then validate the output in application code. Add tool_choice=required to the same unsupported structured-output request. Switch the response_format to json_object for Claude and keep tools unchanged. Disable application output validation because the model will self-check. ExplanationCorrect Answer A:The documented Claude configuration cannot combine response_format with tools or tool_choice; separating stages preserves a supported request shape. Other Answers B:This still combines the conflicting features and does not remove the provider restriction. C:Claude documented support does not include json_object and the tools conflict remains. D:Provider support limitations do not eliminate the need to verify the returned object.
Question 9 An operations team asks for JSON output on a Claude model but also sets stream=true and sees a provider validation error. Which configuration change targets the documented incompatibility? Force stream=true and set temperature=0 to eliminate the incompatibility. For the supported Claude structured-output path, set stream=false when specifying response_format. Replace response_format with top_p=0.2 and assume JSON structure. Change the endpoint region while keeping an unsupported request combination. ExplanationCorrect Answer B:The structured-output documentation explicitly disallows streaming with Claude response_format in this configuration. Other Answers A:Sampling temperature cannot override an API restriction on combining streaming and structured output. C:Sampling parameters are not a schema definition. D:A regional move does not by itself turn an invalid request shape into a supported one.
Question 10 A service sends a valid JSON-schema extraction request but a safety-filtered response ends with finish_reason=content_filter. The caller attempts to parse it as a complete extraction. Which behavior is safest for the downstream application? Mark all missing fields as verified true because the schema requested them. Retry forever with no backoff or review until a full answer appears. Treat content_filter as a non-successful extraction outcome and route the request through a controlled fallback or review path. Silently overwrite the source document with the partial extraction. ExplanationCorrect Answer C:A safety-filtered response may not conform to the schema; the caller must not fabricate missing fields or assume normal completion. Other Answers A:A safety refusal is not evidence about the underlying document values. B:Unbounded retries may defeat safety controls and create cost or load without improving data correctness. D:Partial or filtered output should not replace an authoritative source record.