PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Amazon

Implement Review Content Moderation

Last updated: Jun 5, 2026

Quick Overview

This question evaluates backend engineering competencies including content-moderation logic, request handling, stateful user persistence, HTTP status management, and test-aware behavior around prohibited content tracking.

  • medium
  • Amazon
  • Software Engineering Fundamentals
  • Software Engineer

Implement Review Content Moderation

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

You are given an existing backend service for online reviews. The service already supports adding a review and editing an existing review. Successful review creation currently returns HTTP `201`, and successful review editing returns the service's normal success status. The codebase also contains a content-checking utility that can parse a user comment and detect prohibited or sensitive words. Extend both the add-review and edit-review flows so that moderation is enforced consistently. Requirements: 1. When a user adds or edits a review, check the review text using the existing content-checking utility. 2. If the review contains prohibited content, block the request and return HTTP `403` instead of creating or updating the review. 3. Each prohibited submission increments the user's `violationCount` by `1`. 4. After incrementing the violation count, persist the user record with `await user.save()` or the equivalent persistence call used by the codebase. 5. If `violationCount` becomes greater than `3`, set `user.isFlagged = true` and persist that change. 6. If `user.isFlagged` is already true, the user must remain blocked even when the new review text is clean. 7. Whenever prohibited words are detected, update the user's stored list of violated content words so that it reflects the detected words expected by the unit tests. 8. Apply the same moderation behavior to both add-review and edit-review paths. The unit tests verify status codes, violation count updates, flagged-user behavior, persistence, and the saved prohibited-word list.

Quick Answer: This question evaluates backend engineering competencies including content-moderation logic, request handling, stateful user persistence, HTTP status management, and test-aware behavior around prohibited content tracking.

Related Interview Questions

  • Validate AI-Generated Code Safely - Amazon (medium)
  • Fix the Password Reset Workflow - Amazon (medium)
  • Design an In-Memory Pub-Sub Model - Amazon (medium)
  • Implement a Single-Node Priority Pub/Sub - Amazon (medium)
  • Build a responsive grid of fixed boxes - Amazon (medium)
Amazon logo
Amazon
May 24, 2026, 12:00 AM
Software Engineer
Take-home Project
Software Engineering Fundamentals
1
0

You are given an existing backend service for online reviews. The service already supports adding a review and editing an existing review. Successful review creation currently returns HTTP 201, and successful review editing returns the service's normal success status.

The codebase also contains a content-checking utility that can parse a user comment and detect prohibited or sensitive words. Extend both the add-review and edit-review flows so that moderation is enforced consistently.

Requirements:

  1. When a user adds or edits a review, check the review text using the existing content-checking utility.
  2. If the review contains prohibited content, block the request and return HTTP 403 instead of creating or updating the review.
  3. Each prohibited submission increments the user's violationCount by 1 .
  4. After incrementing the violation count, persist the user record with await user.save() or the equivalent persistence call used by the codebase.
  5. If violationCount becomes greater than 3 , set user.isFlagged = true and persist that change.
  6. If user.isFlagged is already true, the user must remain blocked even when the new review text is clean.
  7. Whenever prohibited words are detected, update the user's stored list of violated content words so that it reflects the detected words expected by the unit tests.
  8. Apply the same moderation behavior to both add-review and edit-review paths.

The unit tests verify status codes, violation count updates, flagged-user behavior, persistence, and the saved prohibited-word list.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.