← All work
Applied AI project Retail / E-commerce

Retail review intelligence

Topic analysis across thousands of e-commerce clothing reviews. Feedback categorized into themes with semantic and similarity search over customer sentiment.

Industry

Retail / E-commerce

Pattern

Business-aware search and analysis

Stack

OpenAI embeddings · ChromaDB · t-SNE · Cosine similarity · pandas / scikit-learn

Status

Applied project

The problem

A women's clothing retailer holds thousands of customer reviews. Too many to read, too valuable to ignore.

What was engineered

Every review embedded as a vector, making meaning computable. The embedding space is visualized with t-SNE to expose the natural structure of the feedback, reviews are categorized against four themes (quality, fit, style, comfort) by cosine similarity, and the full corpus is loaded into a vector database for semantic search: describe a sentiment in plain language and retrieve the reviews that express it, whether or not they share a single word with the query.

Search by meaning, not keywords

Query

"silky, comfortable, wore it all day"

Quality
Comfort
Fit
Style
Top semantic matches
  • "Fabric feels luxe against skin, wore it straight through dinner."
  • "Soft enough for a full workday without adjusting."
  • "Drapes well; didn't need to tug at the hem once."

Thousands of reviews embedded and searchable, cosine similarity over vectors, not keyword overlap.

Key systems

Vector embeddings

Every review embedded as a vector, making meaning computable. The embedding space is visualized with t-SNE to expose the natural structure of the feedback.

Theme categorization

Reviews are categorized against four themes (quality, fit, style, comfort) by cosine similarity.

Semantic search

The full corpus is loaded into a vector database for semantic search: describe a sentiment in plain language and retrieve the reviews that express it.

From the build

categorize_and_search.py
similarities = [
    {class="code-string">"distance": cosine(review_embedding, category_emb),
     class="code-string">"index": i}
    for i, category_emb in enumerate(category_embeddings)
]
closest = min(similarities, key=lambda s: s[class="code-string">"distance"])
category = categories[closest[class="code-string">"index"]]

class=class="code-string">"code-comment"># Semantic search over the full corpus: describe a
class=class="code-string">"code-comment"># sentiment in plain language, retrieve the reviews
class=class="code-string">"code-comment"># that express it.
results = collection.query(
    query_texts=[class="code-string">"silky, comfortable, wore it all day"],
    n_results=3,
)

Why it matters

This is business-aware search in miniature. Find feedback, documents, or customers by what they mean, not what they say. The same architecture powers the search and analysis work in our client applications.

Thousands of product reviews categorized by theme and searchable by sentiment, without a single keyword match.

Stack

OpenAI embeddingsChromaDBt-SNECosine similaritypandas / scikit-learn

All work has been anonymized.

Get in touch

Every business's work is unique. Contact us to make an educated decision.

We specialize in things that are unique to individual businesses. If that's you, contact us. A conversation is enough to make an educated decision.

Get in touch

Every business's work is unique.

Contact us to make an educated decision. We specialize in things that are unique to individual businesses.
Contact Us