Line chart of recall@5 against stored vector width (384, 256, 128, 64 dims) for snowflake-arctic-embed:33m at three index sizes. The 50-fact store stays at 0.983 and 0.967 for 384 and 128 dims; the 800-fact store falls from 0.650 to 0.550 over the same 3x byte cut.

Ollama dimensions for Agent Memory: What Cutting Vector Width Costs in Recall

Your agent memory table has become the biggest thing you own. The embedding model is small, the code is small, but a million stored vectors at 384 float32 dimensions is 1.5 GB of payload before any index overhead, and Ollama’s embed API exposes a dimensions option that looks like a free discount: ask for 128 instead of 384 and the payload drops to one third. The discount is real. The question is what it does to retrieval, and the documentation does not answer it. The embed API reference declares the parameter in a single line — “Number of dimensions to generate embeddings for” — and says nothing about how the shorter vector is produced. If your agent memory is full of near-duplicate facts (the same preference restated four ways, the same project detail rephrased across sessions), the shorter vector is exactly where those paraphrases start colliding, and the failure mode is silent: the wrong paraphrase wins the top-k, and only questions that need one specific variant come back wrong. ...

November 21, 2026 · 15 min · baeseokjae