Name two situations where Flat brute force search is still the correct production choice in a 2026 vector pipeline.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Despite ANN dominating production retrieval, Flat (brute force) search remains the right call in two specific situations. Name and briefly justify both.
Two situations: (1) tiny corpora under ~100k vectors where ANN's build overhead exceeds the savings, and (2) generating the exact recall@K ground truth used to tune any ANN index.
Imagine you have a shoebox of 500 baseball cards and a friend hands you one card asking 'which of mine is closest to this?' The dumbest possible answer, flip through every single card, takes a few seconds and you're done. Building a fancy filing system would take longer than the answer itself. **That's the tiny-corpus case.** The other situation is when you're tuning the fancy filing system: you need to know the right answer to grade it on, and the only way to know the right answer is to flip through every card. Flat is slow but it never lies, which is exactly what you need when you're measuring how often a fast method tells the truth.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: name both situations (tiny corpora + recall ground truth), justify each with concrete numbers, cite a vendor that exposes Flat, mention the regulated-context niche.
| Property | Flat | HNSW | IVF |
|---|---|---|---|
| Recall | 1.0 (exact) | Tunable, typically 0.90-0.99 | Tunable, typically 0.85-0.97 |
| Build time | Zero | Minutes to hours | Minutes (k-means) |
| Memory overhead | Just the vectors | Vectors + graph edges | Vectors + centroids |
| Query latency at 100M vectors | Seconds-minutes | Sub-millisecond | Single-digit milliseconds |
| Query latency at 10k vectors | <1 ms | <1 ms (but build overhead) | <1 ms (but build overhead) |
| Use case in 2026 | Small corpora + ground truth + regulated | Default production ANN | Large corpora + compression |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming Flat is always obsolete because ANN is faster. Flat is the only exact method, which means it is the only valid ground truth for measuring an ANN index's recall, and it is the cheapest option on small corpora.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.