Build the first vector index as an exact inner-product scan that returns stable document IDs.
Required APIdef top_k_similar(query, vectors, k):
return [document_id, ...]BehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
top_k_similar([1, 0], {'a': [1, 0], 'b': [0, 1], 'c': [0.5, 0]}, 2)nearest neighbors should be ranked by similarity
top_k_similar([0, 1], {'a': [1, 0], 'b': [0, 1]}, 1)k controls the returned candidate set
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.