PROBLEM SET
Coding problems for AI engineers
Implement the functions behind real AI systems, sharpen your data structures and algorithms, and practise SQL. Every problem has worked examples, hints and hidden tests.
- Problems
- Easy
- Medium
- Hard
#TitleTopicAcceptanceDifficulty
1Cosine SimilarityEmbeddings—easy2Chunk Text with OverlapRAG—easy3Precision at KEvaluation—easy4Token Budget TruncationLLM Engineering—medium5Reciprocal RankEvaluation—medium6Exponential Backoff ScheduleProduction AI—medium7Euclidean DistanceEmbeddings—easy8Normalize a VectorEmbeddings—easy9Mean Pool Token EmbeddingsEmbeddings—medium10Stable SoftmaxTensors—medium11Apply ReLUNeural Networks—easy12Binary F1 ScoreEvaluation—medium13Confusion MatrixEvaluation—easy14Recall at KEvaluation—easy15Discounted Cumulative GainEvaluation—medium16Reciprocal Rank FusionRAG—hard17Deduplicate Retrieved ChunksRAG—easy18Sliding Token WindowsRAG—medium19Select Top K ScoresRetrieval—easy20Token FrequencyNLP—easy21Generate N-gramsNLP—easy22Batch by Token BudgetInference—medium23Latency PercentileProduction AI—medium24Cache Hit RateInference—easy25Circuit Breaker DecisionsProduction AI—medium26Fixed Window Rate LimitProduction AI—medium27Majority VoteAgents—easy28Tool Permission FilterAgents—easy29Validate Structured OutputLLM Engineering—medium30Conversation Token TrimLLM Engineering—medium31Min-Max Feature ScalingMachine Learning—easy32Daily Active AI UsersSQL for AI—easy33Average Retrieval ScoreSQL for AI—easy34Slowest Model EndpointsSQL for AI—medium35Agent Tool Failure RateSQL for AI—medium36Latest Document VersionsSQL for AI—hard37KV Cache Memory EstimateInference—medium38Append to a KV CacheInference—medium39Reusable Prompt PrefixInference—medium40Paged KV Block AllocationInference—medium41Continuous Batching AdmissionInference—hard42Decode Step CapacityInference—medium43Stable Masked SoftmaxAttention—hard44Causal Attention MaskAttention—easy45Embedding Batch DeduplicationProduction AI—medium46Model Fallback RouterProduction AI—medium47Idempotent Inference RequestsProduction AI—medium48Retrieval Score ThresholdRAG—medium49KV Cache Eviction by BudgetInference—hard50Speculative Decode AcceptanceInference—medium