Problem 09
Buried Answers
Implement retrieve(documents, query, k): return at most k source passages, best match first.
Requirements
- 01retrieve(documents, query, k) receives an array of passage strings and returns at most k of those original strings, best match first.
- 02Rank direct keyword matches and semantic paraphrases by their likelihood of containing the answer rather than inventing an answer.
- 03Return no duplicates, handle k <= 0 and empty inputs with an empty list, and use deterministic input order for tied scores.
Constraints
- • Submit one compact engineering spec, not implementation code.
- • The generated artifact must use the declared Python adapter.
- • Scoring rewards observable behavior and prompt efficiency, not runtime.
Difficulty
expert
Target
11 min
Acceptance
—
Artifact
library