Databricks Generative AI Engineer Associate Question 133
Select 3You are developing a customer support chatbot using a large language model (LLM) on Databricks. To ensure the chatbot does not generate harmful, biased, or offensive responses during user interactions, which strategies should you implement as guardrails?
- A
Use prompt engineering to explicitly define acceptable behavior and constraints for the model.
- B
Implement a post-generation moderation system to review and filter responses before they are sent to users.
- C
Allow the LLM to generate completely unfiltered responses to encourage creativity and flexibility.
- D
Integrate role-based access controls (RBAC) to restrict which users can interact with the deployed model.
- E
Regularly fine-tune the LLM on curated datasets that reduce biases and harmful content.
Show answer and explanation
Correct answers: A, B, E
Explanation
Implementing LLM guardrails is critical to ensuring responsible AI usage. Combining prompt engineering, post-generation moderation, and fine-tuning on curated datasets addresses both pre-generation and post-generation risks. These strategies collectively mitigate potential negative outcomes like harmful, offensive, or biased responses. However, strategies like allowing unfiltered responses or relying solely on access controls do not adequately address the risk of harmful content generation.
- A. Correct.
Explicitly defining acceptable behavior and constraints through prompt engineering is a fundamental guardrail to guide the model's responses and prevent harmful outputs.
- B. Correct.
Post-generation moderation systems act as a safety layer to identify and filter out inappropriate or harmful outputs before they reach the end user.
- C. Incorrect.
Allowing unfiltered responses undermines the purpose of implementing guardrails and increases the risk of generating harmful or biased outputs.
- D. Incorrect.
While RBAC is useful for managing access to resources, it does not directly address the issue of harmful or biased outputs from the LLM.
- E. Correct.
Regularly fine-tuning the LLM with curated datasets helps to address biases and reduce the likelihood of harmful content generation.