Databricks Generative AI Engineer Associate Question 135
Select 3You are deploying a large language model (LLM) for a customer support chatbot in a financial services application. To prevent the model from generating harmful or inappropriate responses, which actions could you implement as guardrails?
- A
Use prompt engineering to explicitly instruct the model to avoid topics like violence or hate speech.
- B
Deploy a toxicity filter to analyze and block harmful outputs from the model before they are sent to users.
- C
Limit the dataset used for fine-tuning to exclude any sensitive or controversial topics.
- D
Allow unrestricted access to the model's raw outputs to ensure transparency and adaptability.
- E
Implement role-based access controls to restrict unauthorized users from interacting with the model.
Show answer and explanation
Correct answers: A, B, C
Explanation
Implementing guardrails for LLMs is essential to ensure their safe and ethical operation. Techniques such as prompt engineering, toxicity filters, and careful control of training datasets directly address the risk of generating harmful or inappropriate outputs. These measures are proactive and mitigate risks effectively, making them key strategies for deploying LLMs in sensitive applications like customer support in financial services.
- A. Correct.
Explicit instructions through prompt engineering can help guide the model to avoid generating harmful or inappropriate outputs by setting clear boundaries upfront.
- B. Correct.
A toxicity filter can act as a safeguard by analyzing the model's outputs in real time and filtering out potentially harmful content before it reaches the end user.
- C. Correct.
Excluding sensitive or controversial topics from the training dataset reduces the likelihood of the model generating outputs related to those topics, thereby minimizing risks.
- D. Incorrect.
Allowing unrestricted access to the model's raw outputs can increase the risk of harmful or inappropriate responses being exposed to users, which contradicts the purpose of implementing guardrails.
- E. Incorrect.
While role-based access controls are useful for managing model access, they do not directly address the issue of preventing harmful outputs from the model.