What is content-based filtering in recommendation systems?
Content-based filtering recommends items to a user based on the features of items the user liked before. It looks at item details and matches similar items to the user's preferences.
Click to reveal answer
beginner
How does content-based filtering use item features?
It creates a profile of the user's preferences by analyzing features of items they liked, such as genre, keywords, or attributes, then finds new items with similar features to recommend.
Click to reveal answer
intermediate
What is a common way to measure similarity between items in content-based filtering?
Cosine similarity is often used to measure how close two items are based on their feature vectors. It calculates the angle between two vectors to find similarity.
Click to reveal answer
intermediate
What is a limitation of content-based filtering?
It can only recommend items similar to what the user already knows and likes, so it may not suggest diverse or novel items outside the user's past preferences.
Click to reveal answer
intermediate
Explain how a user profile is built in content-based filtering.
A user profile is built by collecting features from items the user liked and combining them, often by averaging or weighting features, to represent the user's taste for future recommendations.
Click to reveal answer
What does content-based filtering primarily rely on to make recommendations?
AFeatures of items the user liked
BRatings from other users
CRandom item selection
DPopularity of items
✗ Incorrect
Content-based filtering uses the features of items the user liked to find similar items.
Which similarity measure is commonly used in content-based filtering?
AEuclidean distance
BManhattan distance
CJaccard index
DCosine similarity
✗ Incorrect
Cosine similarity measures the angle between feature vectors and is commonly used to find similar items.
What is a key limitation of content-based filtering?
AIt ignores item features
BIt requires many users' data
CIt cannot recommend new or diverse items
DIt always recommends popular items
✗ Incorrect
Content-based filtering tends to recommend items similar to what the user already liked, limiting diversity.
How is a user profile created in content-based filtering?
ABy averaging features of liked items
BBy counting user clicks
CBy using other users' preferences
DBy random sampling
✗ Incorrect
User profiles are built by combining features of items the user liked, often by averaging.
Content-based filtering is best described as:
AUsing social network data
BUsing item features to recommend similar items
CRecommending items based on popularity
DUsing collaborative user ratings
✗ Incorrect
Content-based filtering recommends items similar to those the user liked based on item features.
Describe how content-based filtering creates recommendations for a user.
Think about how the system learns what the user likes and finds items like those.
You got /4 concepts.
What are the main advantages and disadvantages of content-based filtering?
Consider what it does well and where it struggles.
You got /4 concepts.
Practice
(1/5)
1. What is the main idea behind content-based filtering in recommendation systems?
easy
A. It recommends items based on what other users liked.
B. It recommends items similar to what the user liked before based on item features.
C. It randomly suggests items without any user data.
D. It recommends items based on the most popular items overall.
Content-based filtering uses the features of items a user liked to find similar items.
Step 2: Compare with other recommendation methods
Unlike collaborative filtering, it does not rely on other users' preferences but on item features.
Final Answer:
It recommends items similar to what the user liked before based on item features. -> Option B
Quick Check:
Content-based filtering = Recommend similar items [OK]
Hint: Focus on item features and user history for content-based filtering [OK]
Common Mistakes:
Confusing content-based with collaborative filtering
Thinking recommendations are random
Assuming popularity drives recommendations
2. Which of the following is the correct way to represent item features for content-based filtering in Python?
easy
A. item_features = [1, 2, 3, 4]
B. item_features = ['item1', 'item2', 'item3']
C. item_features = {'item1': 'popular', 'item2': 'new'}
D. item_features = {'item1': [0.2, 0.8], 'item2': [0.5, 0.5]}
Solution
Step 1: Identify correct data structure for features
Features should be numeric vectors representing item properties, stored in a dictionary keyed by item IDs.
Step 2: Check each option
item_features = {'item1': [0.2, 0.8], 'item2': [0.5, 0.5]} uses a dictionary with lists of numbers, suitable for feature vectors. Others are lists or strings, not suitable for numeric features.
A. Replace '*' with a dot product function like numpy.dot
B. Change user_profile and item_features values to strings
C. Use '+' instead of '*' to combine lists
D. No error, code runs fine
Solution
Step 1: Understand the operation on lists
Multiplying two Python lists with '*' is invalid and causes a TypeError.
Step 2: Correct the operation to compute similarity
Use numpy.dot or equivalent to compute dot product between vectors for similarity.
Final Answer:
Replace '*' with a dot product function like numpy.dot -> Option A
Quick Check:
List multiplication invalid, use dot product [OK]
Hint: Use dot product for vector similarity, not '*' on lists [OK]
Common Mistakes:
Trying to multiply lists directly
Using '+' which concatenates lists, not similarity
Ignoring error messages
5. You want to recommend movies to a user using content-based filtering. The user liked movies with genres ['Action', 'Adventure']. You have a movie database with genre tags. Which approach best personalizes recommendations?
hard
A. Calculate similarity by counting overlapping genres between user liked movies and candidate movies.
B. Recommend the most popular movies regardless of genre.
C. Recommend movies liked by other users who watched 'Action' movies.
D. Randomly select movies from the database.
Solution
Step 1: Understand content-based filtering with genre tags
Content-based filtering uses item features (genres) to find similar items to what the user liked.
Step 2: Choose method that compares genre overlap
Counting overlapping genres directly measures similarity between user preferences and candidate movies.
Final Answer:
Calculate similarity by counting overlapping genres between user liked movies and candidate movies. -> Option A
Quick Check:
Genre overlap similarity = Calculate similarity by counting overlapping genres between user liked movies and candidate movies. [OK]
Hint: Match user liked genres with movie genres for recommendations [OK]
Common Mistakes:
Using popularity instead of user preferences
Confusing collaborative filtering with content-based
Random recommendations ignoring user data
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.