#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Use AI to Summarize Customer Reviews into Insights

The reliable way to turn hundreds of reviews into insights is not to paste them all into a chatbot and ask for a summary. Tag each review with aspects and sentiment, count the tags, and only then ask AI to summarise the patterns, with example quotes you can check.

Use AI to Summarize Customer Reviews into Insights

Asking an AI model to "summarise these 2,000 reviews" gives a fluent paragraph, but you cannot tell what it left out, how common each complaint is, or whether it invented a theme. A better approach splits the job: AI reads and labels each review, ordinary code counts the labels, and AI writes the final summary from those counts. Every claim in the summary can then be traced back to numbers and real reviews.

The workflow

  1. Collect reviews with their date, rating, product and source.
  2. Clean them: remove duplicates, empty and spam reviews; keep the original language or translate consistently.
  3. Tag each review with aspects (delivery, price, quality, support…) and a sentiment per aspect.
  4. Aggregate the tags: how often each aspect is mentioned and how negative it is, over time and by product.
  5. Summarise the aggregated table into a short report with representative quotes.
  6. Check a random sample of tags by hand before you share anything.

Step 1–2: collect and clean

Sources include your own website, app store reviews, marketplace seller panels, Google Business Profile and support tickets. Export what the platform allows; respect each site's terms rather than scraping where it is forbidden. Then clean:

  • Drop exact duplicates and reviews with no text.
  • Remove personal data such as phone numbers and emails before sending text to any external AI service.
  • Keep the star rating: it is a useful check on the AI's sentiment labels.

Step 3: tag each review with an LLM

Define a fixed list of aspects first. A fixed list makes results countable; letting the model invent categories gives you "shipping", "delivery" and "courier" as three separate themes.

You label customer reviews. Allowed aspects: delivery, price, quality,
packaging, customer_support, app_experience, other.
For the review below, return JSON only:
{"aspects": [{"aspect": "...", "sentiment": "positive|negative|neutral",
              "quote": "exact words from the review"}]}
Use only aspects that the review actually mentions.

Review: """Product is good for the price but delivery took 9 days."""

Expected output for that review:

{"aspects": [
  {"aspect": "quality",  "sentiment": "positive", "quote": "Product is good"},
  {"aspect": "price",    "sentiment": "positive", "quote": "for the price"},
  {"aspect": "delivery", "sentiment": "negative", "quote": "delivery took 9 days"}
]}

The quote field matters: it forces the model to point at real text, and you can check automatically that each quote appears in the review.

Calling a model from Python with the OpenAI SDK looks like this (any provider with a JSON mode works the same way; the model name is only an example). Here prompt_template is the prompt above with the review text replaced by a {review} placeholder; str.replace is used instead of format because the prompt itself contains JSON braces:

import json
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY from the environment

def tag_review(text, prompt_template):
    resp = client.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": prompt_template.replace("{review}", text)}],
        response_format={"type": "json_object"},
        temperature=0,
    )
    data = json.loads(resp.choices[0].message.content)
    # keep only aspects whose quote really appears in the review
    return [a for a in data.get("aspects", []) if a.get("quote", "") in text]

For thousands of reviews, batch the calls, cache results so you never pay twice for the same review, and log failures. If you cannot send data outside the company, run an open model locally instead; the prompt stays the same. For a classical, non-LLM approach, see building a sentiment analysis tool in Python.

Step 4: aggregate with pandas

Once every review has tags, counting is ordinary data analysis:

import pandas as pd

labels = [
    {"review_id": 1, "aspect": "delivery", "sentiment": "negative"},
    {"review_id": 1, "aspect": "price",    "sentiment": "positive"},
    {"review_id": 2, "aspect": "delivery", "sentiment": "negative"},
    {"review_id": 3, "aspect": "quality",  "sentiment": "positive"},
    {"review_id": 4, "aspect": "delivery", "sentiment": "positive"},
    {"review_id": 5, "aspect": "quality",  "sentiment": "negative"},
]
df = pd.DataFrame(labels)

summary = df.groupby("aspect")["sentiment"].agg(
    mentions="count",
    negative=lambda s: (s == "negative").sum(),
)
summary["neg_share"] = (summary["negative"] / summary["mentions"]).round(2)
print(summary.sort_values("mentions", ascending=False))

Output:

          mentions  negative  neg_share
aspect
delivery         3         2       0.67
quality          2         1       0.50
price            1         0       0.00

On real data, add a month column and compare periods: a sudden rise in negative delivery mentions after a courier change is exactly the kind of insight a manager can act on. If you are new to this kind of analysis, our guide to data manipulation with pandas covers groupby in detail.

Step 5: summarise from the table, not the raw text

Now give the model the aggregated table plus two or three real quotes per aspect, and ask for a short report:

Here is a table of review aspects with mention counts and negative share for
October, compared with September, plus example quotes. Write a 5-bullet summary
for the operations team. Every bullet must cite a number from the table.
Do not mention anything that is not in the table or the quotes.

Because the numbers come from your code, the summary cannot exaggerate how common a problem is without you noticing.

Step 6: check before you share

  • Read 50 random reviews and their tags. If many are wrong, fix the prompt or the aspect list before trusting the counts.
  • Compare sentiment with star ratings: many "positive" labels on 1-star reviews means something is off (often sarcasm or mixed reviews).
  • Watch for fake or incentivised reviews; a burst of similar five-star texts on one day is a warning sign.
  • Small counts are noisy. Five complaints out of 20 reviews is not a trend yet.

Presenting the insights

A useful review report has three parts: what changed (biggest moves in negative share), what it is about (quotes), and what to do (owner and action). A bar chart of mentions by aspect, coloured by sentiment, and a line chart of negative share over time usually say more than a long paragraph. This workflow also makes a good portfolio project; see a customer sentiment tracker in Python and NLP projects for beginners for ideas.

FAQs

Can I just paste all reviews into ChatGPT and ask for a summary?

For a quick look at a few dozen reviews, yes. For decisions, no: you cannot see what was missed or how common each theme is. Tag, count, then summarise.

Do I need an LLM, or is a sentiment model enough?

A classic sentiment model gives one score per review. An LLM can split a mixed review into aspects ("good quality, slow delivery"), which is what makes the insights actionable.

How do I handle Hindi or Hinglish reviews?

Most current LLMs can label Hindi and Hinglish text directly. Keep the aspect names in English so the counts stay consistent, and check a sample by hand.

Uncodemy's data science and AI courses include NLP projects like this, from text cleaning to LLM-based labelling.

Placed Students

Our Clients

Partners

...