← Field Notes / archive

I only learned this to spend fewer tokens

The thought

I did not want a proper AI stack. I wanted the small local model to stop swallowing a huge prompt for every question.

Tools & topics

The longer version

I did not set out to learn LiteLLM, RAG, gateways, any of it. I was wasting tokens. Every question went out with the whole tool list attached, whether I asked about a virtual machine or something I could have grepped. For a while the compose file was just names I copied.

The picture that stuck: chat talks to LiteLLM, LiteLLM talks to the model. RAG is not memory. It is a search over notes I already wrote, stuffed back into the prompt so the model can quote me instead of guessing. I have to load those files myself. They do not update on their own. I found that out by getting an old answer.

The router came after I measured the waste. Keywords pick a smaller set of tools. Some two-part questions get split so the second half actually gets asked. It is string matching. I had been waiting for something cleverer, and that was the mistake.

I did not need a smarter model to spend fewer tokens. I needed to stop sending the whole workshop when the question only needed one drawer.

Archive directory

Type to filter. ↑ ↓ to move. Enter to open.