AISim › Chapter 5: Advanced
One user, half your bill
Level 22. A few scripted accounts are eating everyone's capacity.
You launched a free tier. Within a week, a handful of accounts started hammering your API from scripts, with huge prompts, hundreds of times a minute. Half your traffic is now them. Real users are getting 429 errors, and your cost per real request has nearly tripled.
Goals
- error rate at most 1%
- cost per 1,000 requests at most $7
- accuracy at least 85%
Concepts: Abuse, Per-user limits, Cost control.
Hint
Your provider rate-limits you, but nothing rate-limits your users. How many messages a minute does a real person send?
What you learn
Your provider's rate limits protect them, not you. Anything that's free, or billed per seat while you pay per token, needs per-user limits on requests, on tokens per day and on spend, so a single script can't burn your capacity or your budget. Set them generously for people and tightly for machines.
More in this chapter
- The walkie-talkie (Level 21)
- Same question, different answers (Level 23)
- The evals say it's fine (Level 24)
- The email that hijacked the agent (Level 25)
- The agent goes public (Chapter 5 boss)
This interactive level needs JavaScript. Built by Joshua Paul (cybernerdie).