AISim › Chapter 1: Getting it working
The holiday rush
Level 3. It works. Now 40× more people want it.
Quality is great — you're running the large model on everything. Then you hit the front page: traffic jumps to 60 req/s. The provider starts returning 429s and finance asks why the bill looks like a phone number. Lots of these questions are repeats, and most are easy.
Goals
- error rate at most 1%
- cost per 1,000 requests at most $15
- accuracy at least 80%
Concepts: Semantic cache, Model routing, Rate limits.
Hint
Do repeat questions need the model at all? Do easy questions need the large model?
What you learn
At scale, the expensive part of an AI system is tokens through your biggest model. A semantic cache removes repeats entirely, and a router sends easy traffic to a model that's ~100× cheaper with its own rate limit. You kept the large model — just for the requests that need it.
More in this chapter
- The store chatbot (Level 1)
- The wrong error code (Level 2)
- Where's my order? (Level 4)
- The refund trick (Level 5)
- Launch week (Chapter 1 boss)
This interactive level needs JavaScript. Built by Joshua Paul (cybernerdie).