Guardrails to Stop Chatbot Prompt Injection
Short answer
D Implement guardrails that constrain the chatbot's inputs, outputs, and permitted actions so prompt injections cannot trigger an unauthorized 99% vehicle discount.
Question
Key Takeaways
The question tests which control makes an LLM robust to jailbreaks and prompt injection; the trap is picking a system prompt (which injection itself bypasses) or log monitoring (which only detects harm after it happens).
When a customer-facing AI chatbot is jailbroken via prompt injection and begins granting an unauthorized 99% vehicle discount, the corrective control is model guardrails. This page explains why input/output guardrails outperform system prompts, log monitoring, and bias filtering for hardening an LLM against injection attacks.
Common mistake: The most common wrong pick is B, System prompt. Learners assume instructions in the system prompt protect the model, but prompt injection is precisely the technique for overriding or subverting those instructions, so a system prompt alone does not enhance robustness.
Expert Analysis
Why the Answer Is Correct
Guardrails (D) are runtime enforcement controls that validate, filter, and constrain both what goes into a model and what it is permitted to do — such as capping discount authority, blocking policy-violating outputs, and requiring human approval for high-impact actions. Kristen8730's comment captures this precisely: guardrails "Enforce restrictions on model inputs/outputs and actions, making the application more resistant to jailbreaks and prompt injection." Because the failure mode here is a manipulated model taking a business action (a 99% vehicle discount), only a control that constrains outputs and downstream actions directly raises the model's robustness against the attack class described.
Why the Other Options Are Wrong
A, Bias filtering, addresses fairness and discriminatory outputs (stereotype or demographic skew) — it is not a defense against adversarial instruction hijacking. B, System prompt, is a static instruction that defines role and behavior, but prompt injection works by overriding or corrupting exactly those instructions, so it is the attack surface rather than the fix. C, Log monitoring, is a detective control that surfaces the anomalous discount after the transaction is initiated or completed; it improves detection and forensics but does not make the model itself more robust to the injection.
Community Comment Notes
The single comment on this item lands on D and the reasoning is sound: resistance to jailbreaks and prompt injection comes from enforcing restrictions on inputs, outputs, and actions. There is no contradicting vote data or counter-argument in the thread, so the community consensus and the vendor-style exam doctrine align on guardrails as the appropriate preventive hardening control.
Official Reference
- https://owasp.org/www-project-top-10-for-large-language-model-applications/
- https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.600-1.pdf
These links open the official vendor documentation in a new tab.
Exam Strategy
On CompTIA AI+ style items, separate preventive, detective, and fairness controls: anything that blocks or constrains malicious inputs/outputs is a guardrail, whereas logging is detective and bias filtering is fairness-related. If the stem asks for enhanced robustness or prevention, choose the runtime enforcement control, not the monitoring control.
Frequently Asked Questions
Why is a system prompt not enough to stop this jailbreak attack?
Why isn't log monitoring the right answer for enhancing model robustness?
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
TonytheTiger 👍 1 Answered DAI guardrails are security controls designed to prevent generative AI systems from producing unauthorized, harmful, or inappropriate outputs.
-
Kristen8730 👍 1 Answered DEnforce restrictions on model inputs/outputs and actions, making the application more resistant to jailbreaks and prompt injection.
-
22dae7c 👍 1 Answered BGuardrails are created in the System prompt which sits above the User Prompt
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.