Adversarial Prompts
Carefully crafted inputs designed to exploit model weaknesses, cause unexpected behaviors, or probe for vulnerabilities.
Attacks designed to exhaust LLM resources, cause excessive costs, or make the service unavailable.
LLM-specific denial of service attacks exploit the computational expense of language model inference. Attackers may craft inputs that maximize token generation, require extensive reasoning, or trigger resource-intensive operations. Unlike traditional DoS, these attacks can cause significant financial damage through API costs even without fully overwhelming the service.
Attacker identifies inputs that maximize computational cost or output length
What's happening
Testing reveals: 'Write a 10,000 word essay on X' costs $0.50 per request
Multiple expensive requests are sent to the LLM service
What's happening
Bot sends 1,000 max-length requests per minute to the API endpoint
Server resources are exhausted processing the demanding queries
What's happening
GPU utilization hits 100%; request queue grows; latency spikes to 30+ seconds
The service becomes slow, unavailable, or incurs excessive API costs
What's happening
Legitimate users can't access service; monthly API bill jumps from $100 to $50,000
Forcing maximum length outputs
Write a 10,000 word essay on every aspect of...Triggering expensive reasoning chains
Solve this problem step by step, showing all sub-steps and alternatives...High volume of resource-intensive queries
Automated high-volume requests for complex tasksSample Denial of Service (LLM) Input
Write a 50,000 word comprehensive analysis covering every possible aspect of this topic in extreme detailcurl -X POST "https://api.wardstone.ai/v1/detect" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Your text to analyze"}' # Response{ "prompt_attack": { "detected": false, "confidence": 0.02 }, "content_violation": { "detected": false, "confidence": 0.01 }, "data_leakage": { "detected": false, "confidence": 0.00 }, "unknown_links": { "detected": false, "confidence": 0.00 }}Try Wardstone Guard in the playground to see detection in action.