Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →To detect fake reviews with AI, an e-commerce site combines three kinds of evidence: behaviour signals (unverified purchases, bursts of reviews from one account, new accounts), text signals (copied or templated wording, which a trained classifier or language model can spot) and network signals (groups of accounts that keep reviewing the same products). Each review gets a risk score, high-risk reviews are held or sent to a human moderator, and the model is retrained on the moderators' decisions. This guide shows how each layer works, with Python you can run.

A fake review is one that does not reflect a genuine customer's experience. Common types are paid five-star reviews, reviews written by the seller or their staff, one-star attacks on a competitor, reviews in exchange for refunds or gifts that are not disclosed, and reviews copied from another product. Regulators treat this seriously: the US Federal Trade Commission finalised a rule banning fake reviews and testimonials in 2024, and in India the Bureau of Indian Standards published IS 19000:2022, a standard for how platforms collect, moderate and publish online consumer reviews.
Behaviour is often more reliable than text, because a fraudster can rewrite words easily but finds it harder to fake a purchase history. Useful signals:
| Signal | Why it matters |
|---|---|
| Verified purchase | Reviews without an order behind them carry more risk. |
| Account age and history | A new account whose only activity is five-star reviews is suspicious. |
| Bursts | Many reviews for one product, or from one account, within hours. |
| Rating deviation | Ratings far from the product's long-run average, especially in a burst. |
| Shared devices, IPs or payment details | Several "different" reviewers using the same device or card. |
Here is a small, runnable example that turns some of these into a simple risk score with pandas:
import pandas as pd
reviews = pd.DataFrame({
"review_id": [1, 2, 3, 4, 5, 6],
"user": ["u1", "u2", "u3", "u3", "u4", "u5"],
"rating": [4, 5, 5, 5, 2, 4],
"verified": [True, False, False, False, True, True],
"date": ["2026-03-01", "2026-03-02", "2026-03-02", "2026-03-02", "2026-03-05", "2026-03-09"],
"text": [
"Battery lasts two days, camera is average in low light.",
"Best product ever!!! Must buy!!!",
"Best product ever!!! Must buy!!!",
"Amazing amazing amazing, buy now",
"Stopped charging after a week, replacement took 10 days.",
"Good value, a bit heavy for one-hand use.",
],
})
reviews["dup_text"] = reviews.duplicated("text", keep=False).astype(int)
reviews["burst"] = (reviews.groupby(["user", "date"])["review_id"].transform("count") > 1).astype(int)
reviews["shouty"] = (reviews["text"].str.count("!") >= 3).astype(int)
reviews["unverified"] = (~reviews["verified"]).astype(int)
reviews["score"] = reviews[["dup_text", "burst", "shouty", "unverified"]].sum(axis=1)
print(reviews["score"].tolist())
print(reviews.loc[reviews["score"] >= 2, "review_id"].tolist())
Output:
[0, 3, 4, 2, 0, 0]
[2, 3, 4]
Reviews 2 and 3 share identical text, are unverified and use heavy exclamation marks; review 4 comes from the same account on the same day. In production these rules become features for a model rather than a fixed score, because hand-set weights are easy to game.
Paid reviewers often reuse a template with small changes. Convert each review to a TF-IDF vector or a sentence embedding and flag pairs with very high cosine similarity across different accounts or products.
If you have reviews labelled genuine or fake (from past moderation, or a research dataset such as the Deceptive Opinion Spam corpus of hotel reviews by Ott and colleagues), a simple baseline is TF-IDF plus logistic regression with scikit-learn:
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
from sklearn.pipeline import make_pipeline
# texts: list of review strings, labels: 1 = fake, 0 = genuine
X_train, X_test, y_train, y_test = train_test_split(
texts, labels, test_size=0.2, stratify=labels, random_state=42)
model = make_pipeline(
TfidfVectorizer(ngram_range=(1, 2), min_df=2, sublinear_tf=True),
LogisticRegression(max_iter=1000, class_weight="balanced"),
)
model.fit(X_train, y_train)
print(classification_report(y_test, model.predict(X_test)))
risk = model.predict_proba(["Best product ever!!! Must buy!!!"])[0, 1]
Text models trained on one domain (hotels) transfer poorly to another (phone accessories), so retrain on your own catalogue. Fine-tuned transformer models usually beat TF-IDF, at higher cost.
A large language model can read a flagged review with its context (product, reviewer history) and explain why it looks genuine or not, which speeds up human moderators. It should assist the moderator, not make the final call, because LLMs cannot verify a purchase and can be fooled by well-written fakes.
Organised fraud shows up as groups. Build a graph with reviewers and products as nodes and reviews as edges. Groups of accounts that review the same set of products within days of each other form dense clusters, which community-detection or graph neural network methods can find even when each single review looks normal.
No. A careful fraudster with a real purchase and natural wording is hard to catch. AI raises the cost of faking reviews and catches patterns at scale; human moderation handles the hard cases.
Review text, rating, timestamp, reviewer ID, whether the purchase is verified and, ideally, a few hundred reviews labelled by moderators.
No. Sentiment tells you whether a review is positive or negative, not whether it is genuine. It is one feature among many.
To build the text side, start with a sentiment analysis tool in Python and a customer sentiment tracker with NLP. The main Python libraries for machine learning covers the tools used above, and the CRISP-DM process is a good way to plan the project.