AiTeky Original Interactive Learning & Practice Intermediate
Vector databases: similarity search, indexes, filters and memory
Find the nearest vectors by brute force, speed the search up with clusters and see exactly how much recall you trade, find out why a strict filter can break results, and size the memory for millions of vectors.
A vector database stores lists of numbers (vectors) that stand for the meaning of a text, an image or a product, and finds the stored vectors closest to a query vector. It is the lookup behind "similar products", semantic search and the retrieval step of chatbots that answer from your own documents.
The hard part is not the maths of "closest". It is doing it fast over millions of vectors, which forces trade-offs between speed, memory and accuracy. In this course you measure those trade-offs on a small data set you generate, with plain NumPy. The sizes for the big case in the last lesson are calculations, not benchmarks of any product.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
You need basic Python and NumPy. The course on vector search and knowledge graphs in AI & Data Science shows how the embeddings themselves are made; here we look after them.
- ▶ Run code in your browser. Nothing to install
- ✓ Exercises that check themselves
- 📖 Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 30 min Free sample 🔒 AiTeky Pass Nearest neighbours by brute force Turn items into vectors, measure closeness with cosine similarity, find the top matches by comparing the query with every vector, and see that the work grows in step with the number of vectors, which is what a vector database exists to avoid.
- 02 40 min 🔒 AiTeky Pass Approximate search: look in a few clusters, not everywhere Group 8,000 vectors into clusters, search only the few clusters nearest to the query, and measure on real runs how much work you save and how many of the true nearest neighbours you still find, so that "approximate" becomes a number you can choose.
- 03 35 min 🔒 AiTeky Pass Filters and metadata: why "similar AND in stock" is harder than it sounds Combine similarity with a filter such as category or price, see how filtering after the search returns too few results when the filter is strict, and compare it with filtering before the search and with searching inside the filtered set.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

