Challenge - 5 Problems
Content Filtering Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What is the main purpose of content filtering in AI?
Content filtering is used in AI systems to manage what kind of content is shown or blocked. What is the main goal of content filtering?
Attempts:
2 left
💡 Hint
Think about why some AI systems block certain words or images.
✗ Incorrect
Content filtering helps AI systems avoid showing harmful, offensive, or inappropriate content to users, ensuring safer and more responsible AI use.
❓ Predict Output
intermediate2:00remaining
What is the output of this content filtering code snippet?
Given the following Python code that filters out banned words from a list of messages, what is the output?
Prompt Engineering / GenAI
banned_words = {'bad', 'ugly'}
messages = ['This is good', 'This is bad', 'Ugly truth']
filtered = [msg for msg in messages if not any(word.lower() in banned_words for word in msg.split())]
print(filtered)Attempts:
2 left
💡 Hint
Check which messages contain words in the banned_words set.
✗ Incorrect
The code removes messages containing any banned word. 'This is bad' contains 'bad' and 'Ugly truth' contains 'Ugly' (case insensitive), so only 'This is good' remains.
❓ Model Choice
advanced2:00remaining
Which model type is best suited for real-time content filtering in chat applications?
You want to filter harmful content in a chat app instantly as users type. Which AI model type is best for this task?
Attempts:
2 left
💡 Hint
Consider speed and resource use for real-time filtering.
✗ Incorrect
Lightweight rule-based models with keyword matching are fast and efficient for real-time filtering, unlike large or heavy models that cause delays.
❓ Hyperparameter
advanced2:00remaining
Which hyperparameter adjustment helps reduce false positives in a content filtering model?
You have a content filtering model that blocks too many safe messages (false positives). Which hyperparameter change can help reduce this?
Attempts:
2 left
💡 Hint
Think about how threshold affects model sensitivity.
✗ Incorrect
Increasing the classification threshold makes the model more strict before blocking content, reducing false positives but possibly increasing false negatives.
🔧 Debug
expert2:00remaining
Why does this content filtering code fail to block the word 'Bad'?
Examine the code below. It should block messages containing the word 'bad' regardless of case, but it does not block 'Bad'. Why?
Prompt Engineering / GenAI
banned_words = {'bad'}
message = 'This is Bad'
if any(word.lower() in banned_words for word in message.split()):
print('Blocked')
else:
print('Allowed')Attempts:
2 left
💡 Hint
Check how case sensitivity affects membership tests.
✗ Incorrect
The code checks words as-is against banned_words which only has lowercase 'bad'. 'Bad' with uppercase B does not match, so it is not blocked.