The last step of every retrieval pipeline: you have similarity scores and you want the best few.
Given a 1-D array of scores and an integer k, return the indices of the k highest scores, ordered best first.
Sorting the whole array is O(n log n) and you only need the top k. At 80 million candidates that difference is the difference between a usable system and a timeout.
Ties may be broken arbitrarily. If k exceeds the number of scores, return every index in order.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen