Databricks Generative AI Engineer Associate exam dumps

Databricks Generative AI Engineer Associate practice question 9 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 9

Single answer

You are designing a prompt for a generative AI model to provide a JSON response containing a user's name, age, and a list of their favorite hobbies. Which of the following prompts is most likely to elicit a correctly formatted JSON response?

  1. A

    Generate a response about the user's details, including their name, age, and hobbies.

  2. B

    Provide a structured JSON object with the following keys: 'name' (string), 'age' (integer), and 'hobbies' (list of strings). Ensure the response is valid JSON.

  3. C

    Tell me about the user's name, age, and hobbies in a complete sentence.

  4. D

    Write a list of key details about the user, including their name, age, and hobbies, separated by commas.

Show answer and explanation

Correct answer: B

Explanation

To ensure a generative AI model produces a specifically formatted response, the prompt should clearly define the desired structure, including the format (e.g., JSON), required keys, and data types. Option 2 accomplishes this effectively by explicitly describing the structure and format, making it the correct choice.

  • A. Incorrect.

    This prompt is too generic and does not specify the desired output format, making it unlikely to elicit a well-formatted JSON response.

  • B. Correct.

    This prompt explicitly requests a structured JSON object with specific keys and data types, ensuring the model understands the required format and generates a valid JSON response.

  • C. Incorrect.

    This prompt asks for a response in sentence format rather than JSON, so it is unlikely to result in the desired output structure.

  • D. Incorrect.

    This prompt does not specify JSON as the required format, so the response is likely to be a plain text list rather than a valid JSON object.

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