Author(s): Garvit Agarwal

Originally published on Towards AI.

In Part 2, we focused on optimizing how requests are constructed before they reach the language model. We explored how techniques like Model Routing, Prompt Caching, and Conversation Summarization reduce unnecessary token usage without affecting the user experience.Those optimizations alone can significantly reduce production costs. But here’s something that surprised me when I started studying production AI systems.

Many applications continue to spend thousands — or even millions — of unnecessary tokens after the request has already been optimized.

How?