PROFESSIONAL-MACHINE-LEARNING-ENGINEER practice question 13 of 35

Your company manages an application that aggregates news articles from many different online sources and sends them to users. You need to build a recommendation model that will suggest articles to readers that are similar to the articles they are currently reading. Which approach should you use?

Full set: 283 questions
Answer options
A: Create a collaborative filtering system that recommends articles to a user based on the user’s past behavior.
B: Encode all articles into vectors using word2vec, and build a model that returns articles based on vector similarity. Correct answer
C: Build a logistic regression model for each user that predicts whether an article should be recommended to a user.
D: Manually label a few hundred articles, and then train an SVM classifier based on the manually classified articles that categorizes additional articles into their respective categories.
Correct Answer:
B. Encode all articles into vectors using word2vec, and build a model that returns articles based on vector similarity.
Explanation

The core task is to recommend articles based on content similarity to the article a user is currently reading. This is a classic item-to-item, content-based filtering problem. Encoding articles into high-dimensional vectors (embeddings) using a model like word2vec captures the semantic meaning of the text. Once each article is represented by a vector, "similarity" can be calculated using a distance metric like cosine similarity. The system can then efficiently find and recommend the articles whose vectors are closest to the vector of the article currently being viewed. This approach is scalable and directly addresses the problem of finding semantically similar content.

Why Incorrect

A. Collaborative filtering recommends items based on user-item interaction history (e.g., what similar users read), not the content of the specific article being read now.
C. Building a separate logistic regression model for each user is computationally expensive, does not scale, and is designed for classification, not for finding similar items based on content.
D. An SVM classifier assigns articles to predefined categories. This is less granular than semantic similarity; two articles in the same category can have very different content.

References

1. Google Machine Learning Crash Course, "Content-Based Filtering": This official Google courseware explains the principle of using item features for recommendations. It states, "The model only has to recommend items with similar features to the items the user is currently looking at." This directly aligns with the problem statement and the solution in option B.

Source: Google. (n.d.). Recommendation Systems: Content-Based Filtering. Machine Learning Crash Course. Retrieved from https://developers.google.com/machine-learning/crash-course/recommendation-systems/content-based (specifically, the section describing using item features).

2. Google Machine Learning Crash Course, "Embeddings": This resource details how embeddings are used to represent discrete items like words or articles as vectors in a way that captures semantic relationships. The distance between vectors in the embedding space indicates the similarity between the items, which is the core mechanism of the proposed solution.

Source: Google. (n.d.). Embeddings. Machine Learning Crash Course. Retrieved from https://developers.google.com/machine-learning/crash-course/embeddings/video-lecture

3. Stanford University, CS224n Courseware, "Word Vectors I: Introduction, SVD and Word2Vec": This course material from a reputable university details the word2vec algorithm. It explains how such models learn vector representations of words from text corpora. These word vectors can be aggregated (e.g., averaged) to create vector representations for entire documents (articles), which can then be used for similarity comparisons.

Source: Manning, C. D., Socher, R., & Gimpel, K. (2021). Lecture 2: Word Vectors and Word2Vec. Stanford CS224n: Natural Language Processing with Deep Learning. Retrieved from https://web.stanford.edu/class/cs224n/readings/cs224n-2019-notes01-wordvecs1.pdf (Section 3, "Word2vec introduction").

Scroll to Top