Your agent re-embeds the same product catalog on every request to answer questions, and traffic is climbing…
Your agent re-embeds the same product catalog on every request to answer questions, and traffic is climbing fast.
- ABuy a higher rate limit from the provider.
- BCache the repeated, unchanging work so it isn’t recomputed every request.
- CSwitch to a faster embedding model and add more server replicas, so re-embedding on every request keeps up with traffic.
- DAdd more server replicas.
Answer: B
Cache the repeated, unchanging work so it isn’t recomputed every request.
Why
Repeated identical work should be cached, not recomputed. Caching cuts cost and latency at the source; more hardware or a faster model just pays to redo the same work.
- ScalingUnder load your agent fires many parallel model calls at once and starts getting 429 rate-limit errors.
- ScalingYou classify millions of short messages a day with your most capable (and priciest) model, and accuracy on this task is already…
- ScalingYour bill tripled this month.
- ScalingOne heavy user’s retry storm eats the shared rate limit, and everyone else’s requests stall.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path