This was a very strange interview experience. It was the interviewer's first time interviewing, and she asked me to handwrite a binary-classification machine learning loader and trainer.
The data was not a real dataset, so I could not write code that would actually run. She asked for pseudocode but did not explain what level of detail she wanted. She also did not clarify what the model was supposed to be. Near the end, she insisted that I handwrite an MLP. I started writing the data loader, and then she said that part was unnecessary. Overall, the interview felt inexplicable.
The prompt said that many recommendation tasks could be modeled as information retrieval and relevance scoring. Member profiles supplied much of the text, so it was possible to build a recommender using only textual embedding features. The supplied boilerplate implemented a basic recommender training pipeline, and I had to complete every TODO method, with permission to add helper methods or classes.
The profile data had a member ID, headline, title, positions, and education records. Positions included a company, description, start date, and nullable end date. Education records included a school, description, start date, and nullable end date. Item records had an item ID and text, while labeled examples linked a member ID and item ID with a label such as clicked or skipped.
A provided LocalLLM class had initialization and generate_embeddings methods. I had to implement the following trainer skeleton:
class RecommenderTrainer:
def __init__(...):
raise NotImplementedError("Complete this method.")
def load_data(profile_text_path, item_text_path, labeled_dataset_folder):
raise NotImplementedError("Complete this method.")
def prepare_features(...):
raise NotImplementedError("Complete this method.")
def train(...):
raise NotImplementedError("Complete this method.")
Discussion
Loading comments…