Databricks Generative AI Engineer Associate Question 146
Single answerYou are designing a Databricks agent to assist users in querying a database. The agent must dynamically guide users by exposing specific functions such as 'get_customer_data' and 'calculate_sales'. To ensure these functions are accessible and properly utilized, how should you construct the agent's prompt template?
- A
Include a clear description of each function, their input parameters, and their expected outputs in the prompt template.
- B
Exclude details about the functions and rely on the model's natural language understanding capabilities.
- C
Use placeholder text in the prompt template and dynamically populate it with function descriptions at runtime.
- D
Provide only the function names in the prompt template without any descriptions.
Show answer and explanation
Correct answer: A
Explanation
To build effective agent prompt templates that expose available functions, it is crucial to include clear and detailed descriptions of the functions, their input parameters, and their outputs. This ensures the generative AI model can utilize these functions and guide users effectively, reducing ambiguity and improving task accuracy.
- A. Correct.
Including clear descriptions of the functions, input parameters, and expected outputs ensures the agent understands the available functionality and can guide users effectively. This is the correct approach.
- B. Incorrect.
Excluding details about the functions may result in the model being unable to utilize the functions properly, leading to a poor user experience.
- C. Incorrect.
While dynamically populating the prompt with function descriptions at runtime can work, it does not negate the need for clear descriptions. Placeholder text alone is insufficient for this purpose.
- D. Incorrect.
Providing only the function names without descriptions is not enough for the model to fully understand and utilize the functions in guiding users.