Problem library
ML building blocks, one implementation at a time.
Practice the functions, model classes, and training loops inside production ML systems.
Top-K Heap
Select highest-scoring items efficiently with deterministic heap ordering.
Cosine Similarity
Compare vectors while handling zero norms safely.
Brute-Force Nearest Neighbor
Find exact nearest neighbors by exhaustively ranking Euclidean distances.
Inverted Index
Build token posting lists and evaluate deterministic conjunctive queries.
BM25
Score documents using term frequency, IDF, and length normalization.
Two-Stage Ranker
Retrieve a bounded candidate set before applying a stronger ranking signal.
Reranker Interface
Preserve candidate identity while fusing and ranking aligned score batches.