Machine Learning Engineer • Mid-Level
Machine Learning Engineer • Mid-Level
High QualityPrep Other Coding Questions Asked by Harvey
Continue with targeted prep from Harvey's coding question bank.
Interview Summary
The Harvey onsite ML coding round involved implementing a simple Retrieval-Augmented Generation (RAG) pipeline inside a Google Colab notebook.
Interview Details
ML Coding — Build a RAG Retrieval Pipeline
The interviewer provided a Colab notebook containing a partially implemented retrieval pipeline. Some helper functions were already available. The task was to fill in the missing pieces and make the retrieval and evaluation workflow function correctly.
-
Part 1 — Generate Document Embeddings
The first task was to process text stored in a pandas DataFrame. The notebook contained document text that needed to be converted into vector embeddings. The implementation involved:
- Reading the relevant text column from the DataFrame
- Generating embeddings for the documents
- Associating each embedding with its original document
- Preparing the embedding data for similarity search
The focus was on using the provided utilities and handling the data correctly in Python.
-
Part 2 — Retrieve Top 10 Documents Using Cosine Similarity
The second part asked for a retrieval function. Given a user query:
- Generate
Unlock Full Details
Create a free account to unlock this interview experience report.