Engineering tasks

The 30 production-style implementations

Task 1
Implementation of retrieval engine with cosine similarity
Task 2
Implementation of exact top-k selection
Task 3
Heap-based top-k with fixed memory
Task 4
Implementation of retrieval reranker
Task 5
Two-stage retrieval pipeline with reranker
Task 6
Dynamic top-k with mutable scores
Task 7
Sliding window rate limiter
Task 8
Token bucket rate limiter
Task 9
Distributed rate limiter using Redis
Task 10
LRU cache with O(1) operations
Task 11
TTL cache
Task 12
Cache simulator with hit-ratio and stall-time statistics
Task 13
Text chunker with sentence awareness
Task 14
Token-aware chunker
Task 15
PII span merging and regex/NER detection
Task 16
Redaction utility with PII spans
Task 17
Brier score and reliability diagrams
Task 18
Expected calibration error
Task 19
NDCG, MRR, Recall@K retrieval evaluation
Task 20
Thread-safe inference batcher
Task 21
Retry with exponential backoff and jitter
Task 22
Circuit breaker
Task 23
Count-Min Sketch
Task 24
Bloom filter
Task 25
HyperLogLog
Task 26
Consistent hashing
Task 27
Weighted load balancer
Task 28
Snowflake ID generation
Task 29
Leaky bucket rate limiter
Task 30
Sliding-window counter (global)
Engineering practice

40 timed drills

Retrieval, rate limiting, caching, chunking, PII, calibration, ranking metrics, batching, resilience, sketches, routing, and concurrency - each drill is 10–30 minutes with a core pattern and a clear target.

Drill 1
Vector dot product using native Python vs NumPy
Drill 2
Parallel dot product with multiprocessing and shared memory
Drill 3
Thread-safe vector addition with locks
Drill 4
Thread-safe vector addition with atomic operations
Drill 5
Concurrent dictionary with counters
Drill 6
Concurrent counters with Redis
Drill 7
Implement a semaphore
Drill 8
Reader-writer lock
Drill 9
Producer-consumer queue with condition variables
Drill 10
Work queue with channel semantics
Drill 11
Token bucket rate limiter
Drill 12
Sliding window rate limiter with timestamp list
Drill 13
Sliding window rate limiter with counter + timestamp
Drill 14
LRU cache
Drill 15
TTL cache
Drill 16
Randomized load balancer
Drill 17
Round-robin load balancer
Drill 18
Weighted round-robin load balancer
Drill 19
Rendezvous hashing
Drill 20
Consistent hashing
Drill 21
PII redactor
Drill 22
PII detector with spans
Drill 23
Batch processor with queue
Drill 24
Batch processor with reservation and timeout
Drill 25
Retry wrapper with exponential backoff
Drill 26
Retry wrapper with circuit breaker
Drill 27
Count-Min Sketch
Drill 28
Bloom filter
Drill 29
HyperLogLog
Drill 30
Snowflake ID generator
Drill 31
KNN with cosine similarity
Drill 32
KNN with euclidean distance
Drill 33
Two-stage retrieval with reranker
Drill 34
Stream top-k with heap
Drill 35
Chunker with fixed-size windows
Drill 36
Chunker with sentence awareness
Drill 37
Token-aware chunker
Drill 38
LRU cache with TTL
Drill 39
Thread-safe LRU cache
Drill 40
Concurrent batch processor with timeout