How to shrink an embedding


Almost all my clients face this issue. They want to build a RAG system.

They have:

  • Millions of PDFs
  • That turn into Billions of chunks + embeddings
  • Turns into become petabytes of floats

That's the recipe of nearly every speculative RAG project I've worked on. A mature search team stands up a vector database and can't tame the sheer scale of data they're facing. That drags project timelines out months while costs skyrocket.

It's important to have tools to manage the scale. One often overlooked method: dimensionality reduction

In this blog article, I share how to use PCA as one important, easy-to-use tool:

https://softwaredoug.com/blog/2026/07/24/pca-shrink-ray

-Doug

PS I'm teaching a "Build your Own Vector DB" one-day, small workshop for anyone facing vector scaling conundrum. There's only 8 seats left. Hope to see you there.

---

Slack Community * Events · Consulting · Training (use code search-tips)

You're subscribed to Doug Turnbull's daily search tips where I share tips, blog articles, events, and more. You can always manage your profile:

Doug Turnbull

I share search tips, blog articles, and free events I'm hosting about the search+retreval industry, vector databases, information retrieval and more.

Read more from Doug Turnbull

My work is split between mature search teams and new AI teams. Search teams are often farther along and manage a mature, traditional search product. AI teams, however, often don't know what they don't know yet. They've just been cobbled together, have built a few agent demos, and are often in the process of discovering the three big mistakes I blog here: Evals+measurement need to dominate a lot of your product thinking Retrieval isn't "one thing" (ie classic RAG) - its extremely custom to...

I'm writing about the weak spots in vector databases. Where you should prod and poke when selecting a vendor. Today: Updating Vector Databases If you think about the old vector search regime, it involved Indexing everything up front Never updating the index Search-only We overindexed on this paradigm, creating data structures focused on good search performance that couldn't tolerate updates. I wrote about how sensitive graph-based vector DBs in particular are to updates, picking on Lucene...

Hey all, I wrote a new article about a technique that has come up over and over in my work, especially in my Cheat at Search training, for doing effective query understanding into a large vocabulary. Instead of asking an LLM to classify into a vocabulary. Ask it to hallucinate fake entities, then resolve those to real ones client side. Save yourself a lot of tokens and use cheaper models. https://softwaredoug.com/blog/2026/08/10/hypothetical-classifications -Doug PS - A reminder that Vectors...