Skip to content
echogeco
Retrieval, and when not to · The search pipeline

Do we need a vector database?

Design the retrieval store for 8,000 chunks and 200 queries a day, and name the corpus size and query rate at which a dedicated index earns its place.

designmediumExercise · 3 min · 37 of 77
On this page

A proposal to deploy a managed vector database for internal documentation is on the table. The design question is what the retrieval store has to do, and the arithmetic says how little that is.

The situation

A 40-engineer company keeps about 3,000 pages of engineering documentation in a wiki, which the pipeline has split into roughly 8,000 chunks of 400 tokens, embedded at 1,024 dimensions with the same model used for queries. Engineers will ask about 200 questions a day. Around 50 pages change in a typical week. The existing stack is a Postgres database and a Python service with a few hundred MB of free memory. The proposal is a three-node managed vector database cluster, chosen "so retrieval scales". Nobody has written down what it needs to scale to.

Constants: a 1,024-dimension float32 vector is 4 KB; a round trip inside a datacenter is about 0.5 ms; a single core does on the order of a few billion multiply-adds a second and streams memory at about 10 GB/s.

The question

Design the retrieval store — where the vectors and the keyword index live, how a query runs, how changes get in — and state the corpus size or query rate at which the design should change.

A strong answer · Rubric · Where answers go wrong

Write your answer first, then open