Question
An attacker successfully completes a denial-of-service (DoS) attack through the context window of an AI system. Thousands of characters are obfuscated and hidden behind an emoji. Which of the following techniques best mitigates this type of attack?
- A. Fraud detection
- B. Large language model (LLM)-as-a-judge
- C. Pattern recognition
- D. Prompt filter Correct
Explanation
A prompt filter inspects and normalizes input before it reaches the model, so it can reject or strip oversized input and hidden characters, such as thousands of invisible Unicode characters smuggled behind an emoji, that exhaust the context window. Using an LLM as a judge would itself consume the same malicious input, fraud detection targets transactions, and generic pattern recognition does not limit what enters the context window.