Design a retrieval layer for code search, docs, and tests.

Instruction: Explain how you would build retrieval for a coding agent.

Context: Assesses whether the candidate can design a practical architecture and explain the main tradeoffs. Explain how you would build retrieval for a coding agent.

Official answer available

Preview the opening of the answer, then unlock the full walkthrough.

I would combine symbol-aware code search, doc retrieval, and test retrieval into one relevance layer that can assemble task-specific evidence rather than three disconnected result lists. The agent should see the implementation, the intended behavior, and the likely validation path together.

I also...

Related Questions