Databricks Generative AI Engineer Associate exam dumps

Databricks Generative AI Engineer Associate practice question 11 of 306

Databricks Certified Generative AI Engineer Associate. Free level, Databricks. Free question with the correct answer and a full explanation.

Databricks Generative AI Engineer Associate Question 11

Single answer

You are designing a prompt for a generative AI model to generate a JSON response that includes a user's name, age, and hobbies. The response must strictly follow the format:

{ "name": "<name_value>", "age": <age_value>, "hobbies": ["<hobby_1>", "<hobby_2>"] }

Which of the following prompts is most appropriate to elicit the desired response format?

  1. A

    Generate a JSON object including a user's name, age, and hobbies.

  2. B

    Provide the user's details in the form of a JSON object with the fields: name (string), age (integer), and hobbies (array of strings). Ensure the JSON is properly formatted.

  3. C

    Write a brief description of a person including their name, age, and hobbies in any format.

  4. D

    Create a JSON schema for a user's name, age, and hobbies.

Show answer and explanation

Correct answer: B

Explanation

To elicit a specifically formatted response from a generative AI model, the prompt must include clear instructions about the required structure and format of the output. Option 2 provides precise guidance for generating a JSON object with the specified fields and types, ensuring the desired output format is met.

  • A. Incorrect.

    This option is too vague and does not specify the required structure or format of the JSON output.

  • B. Correct.

    This option is correct because it explicitly states the required JSON structure (field types and format) and ensures the response adheres to proper JSON formatting.

  • C. Incorrect.

    This option does not specify the need for JSON formatting and allows for any output format, which is not suitable for the desired structured response.

  • D. Incorrect.

    This option asks for a JSON schema rather than a JSON object with actual values, which is not aligned with the task.

Timed practice exam

Take a Databricks Generative AI Engineer Associate practice test under exam conditions

45 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam