Chapter one
When a request comes in
Every call goes through the same front door. The gateway checks who is asking, looks for an answer it already has, and only pays for a model when it has to.
- 1Authorization Layer
The caller is checked
The Authorization engine determines who is allowed to use which LLMs, before anything is spent.
- 2Vector DB
Similar past requests are looked up
The Vector engine finds earlier inputs that mean nearly the same thing, so their responses can be reused.
- 3File Server
A cached answer is served
Only when a close enough match existsThe File engine holds a long-term cache of answers, so a close enough match comes back without a model call.
- 4LLM Plane
A model is chosen and called
Only when nothing can be reusedThe LLM engine finds an available model that fits the budget, the complexity, and the response time the request needs, and calls it.
- 5File Server
The new answer joins the cache
Only after a new model callThe fresh response is stored in the long-term cache, so the next similar request does not need a model at all.