Whenever you're ready, walk me through how you'd approach this.
How do you manage token usage and cost when building LLM-integrated services?
Discuss the techniques you would use across prompt construction, context management, model selection, caching, retries, and observability. Explain how you would measure quality, latency, and spend before and after optimization, including safeguards against truncation, prompt injection, and degraded answers. Include a practical implementation approach using an LLM provider SDK.