GENERATIVE-AI-ENGINEER-ASSOCIATE practice question 14 of 15

A Generative AI Engineer is developing a chatbot designed to assist users with insurance-related queries. The chatbot is built on a large language…

Full set: 61 questions
A Generative AI Engineer is developing a chatbot designed to assist users with insurance-related queries. The chatbot is built on a large language model (LLM) and is conversational. However, to maintain the chatbot’s focus and to comply with company policy, it must not provide responses to questions about politics. Instead, when presented with political inquiries, the chatbot should respond with a standard message: “Sorry, I cannot answer that. I am a chatbot that can only answer questions around insurance.” Which framework type should be implemented to solve this?
Answer options
A: Safety Guardrail Correct answer
B: Security Guardrail
C: Contextual Guardrail
D: Compliance Guardrail
Correct Answer:
A. Safety Guardrail
Explanation

A safety guardrail is a mechanism designed to control the behavior and output of a large language model (LLM) to ensure it is appropriate, on-topic, and not harmful. In this scenario, the goal is to prevent the chatbot from discussing a specific undesirable topic (politics). Implementing a system to detect questions about politics and provide a canned response is a form of content moderation and topic control, which is a primary function of a safety guardrail. This ensures the model operates within its intended, safe conversational boundaries.

Why Incorrect

B. Security Guardrail: This type of guardrail focuses on protecting the system from external threats like prompt injection, data exfiltration, or denial-of-service attacks, not on moderating conversational content.
C. Contextual Guardrail: This is not a standard industry term. While any guardrail must understand context to function, "Safety Guardrail" is the specific and correct classification for controlling conversational topics.
D. Compliance Guardrail: This focuses on ensuring the model's outputs adhere to specific legal, regulatory, or data privacy standards (e.g., GDPR, HIPAA). While the company policy is a compliance requirement, the technical mechanism to enforce it by filtering topics is a safety guardrail. ---

References

1. Databricks Official Blog, "Implementing LLM Guardrails with Databricks": This article categorizes different types of guardrails. It explicitly defines "Topical Guardrails" as a mechanism to "ensure that the model does not stray into undesirable or irrelevant topics." This directly aligns with the question's scenario and places topic restriction under the broader umbrella of safety and quality control. (Reference: Databricks Blog, "Implementing LLM Guardrails with Databricks", Section: "Topical Guardrails").

2. Databricks Documentation, "Monitor model quality and drift": The documentation on monitoring LLMs using LLM-as-a-judge describes evaluating models on criteria like "not being harmful" and relevance. These evaluations are the foundation for implementing safety guardrails that can detect and block off-topic or inappropriate responses, such as political inquiries in an insurance chatbot. (Reference: Databricks Documentation > Machine Learning > MLflow > Monitor model quality and drift > Use LLM as a judge).

3. Stanford University, Center for Research on Foundation Models (CRFM), "On the Opportunities and Risks of Foundation Models": This foundational paper discusses the need for internal and external moderation mechanisms to mitigate risks like generating harmful or biased content. The described function of preventing the chatbot from discussing politics is a form of internal moderation, which is a core concept in AI safety. (Reference: Section 4.2, "Mitigation," which discusses content filtering and moderation as key safety techniques). DOI: https://doi.org/10.48550/arXiv.2108.07258

Scroll to Top