Databricks Generative AI Engineer Associate Question 145
Single answerYou are building a chatbot using Databricks that interacts with a large language model (LLM) to assist users in performing specific tasks, such as querying a database or retrieving files. You want to create a prompt template for the agent that makes the LLM aware of the available functions it can use. Which step is essential when designing this prompt template to ensure proper functionality?
- A
Explicitly list the functions along with their descriptions in the prompt template.
- B
Include only the function names without any descriptions to keep the prompt concise.
- C
Allow the LLM to infer the functions dynamically at runtime without including them in the prompt.
- D
Use a separate configuration file outside the prompt template to define the available functions.
Show answer and explanation
Correct answer: A
Explanation
When building a prompt template for an agent interacting with an LLM, it is essential to explicitly list the available functions along with their descriptions in the prompt. This ensures the LLM understands the context and purpose of these functions, enabling it to use them effectively. Simply naming the functions, relying on runtime inference, or defining functions externally without including them in the prompt will not provide the LLM with the necessary clarity to perform tasks accurately.
- A. Correct.
Explicitly listing the functions along with their descriptions in the prompt template is crucial because it ensures the LLM understands what tools it has access to and how to use them effectively.
- B. Incorrect.
Including only the function names without descriptions would make it difficult for the LLM to understand the purpose and usage of each function, leading to potential errors or inefficiencies.
- C. Incorrect.
Allowing the LLM to infer the functions dynamically at runtime is not reliable, as the LLM cannot inherently know the available functions without explicit instruction.
- D. Incorrect.
Using a separate configuration file outside the prompt template may help manage functions, but it does not directly inform the LLM during its interaction with the prompt, which is necessary for accurate task execution.