BackCase Study

Case Study: SkinWise AI Skincare Product Recommendation System

Client: Malav Shah Project Type: AI / ML Tool RAG-based Recommendation System Role: Solo Developer Timeline: 1–2 Weeks


Overview

SkinWise is an AI-powered skincare recommendation system that takes a user's unique skin profile as input and returns the most compatible products from a structured dataset. The system is built on a Retrieval-Augmented Generation (RAG) architecture, combining vector search with an LLM to deliver accurate, context-aware recommendations.


1. The Problem

The client had a well-structured dataset of skincare products stored in Excel sheets but no intelligent layer on top of it. Users had no way to determine which products actually suited their skin type, concerns, or lifestyle.

A simple search or filter wouldn't cut it. The client needed a system that could understand multiple skin parameters simultaneously and recommend products with a high compatibility match (85% or above) not just return keyword matches.


2. The Goal

Build a RAG-based recommendation API that:

  • Reads and processes the client's existing Excel product dataset
  • Accepts multi-parameter user skin profiles as input
  • Retrieves and ranks the most relevant products per category
  • Returns recommendations with a compatibility score of 85% or higher

3. Research & Approach

Before writing any code, I researched:

  • How Retrieval-Augmented Generation (RAG) pipelines are architected
  • Methods for converting structured Excel data into vector embeddings
  • Suitable vector databases for similarity search
  • Available LLM APIs capable of grounding responses in retrieved data

After evaluating the options, I designed a pipeline that separates the retrieval step (finding relevant products via embeddings) from the generation step (having the LLM analyze and rank them) ensuring recommendations stayed grounded in actual product data rather than model hallucination.


4. The Solution

I built a Flask/FastAPI-based REST API that processes the skincare dataset and returns personalized product recommendations.

How the system works end-to-end:

  1. Data ingestion The Excel product dataset is parsed and each product entry is converted into vector embeddings
  2. Vector storage Embeddings are stored in ChromaDB for fast similarity retrieval
  3. User input The user submits their skin profile via the interface, which captures:
    • What they're looking for (free text)
    • Product preferences (e.g. Fragrance-free, Vegan, Cruelty-free)
    • Skin concerns (e.g. Acne, Wrinkles, Hyperpigmentation)
    • Skin type
    • Environment (where they spend most time)
    • A free-text skin description
  4. Retrieval The system queries ChromaDB to fetch the most semantically relevant products
  5. Generation Google Gemini analyzes the retrieved products against the user's profile and returns ranked recommendations per category

5. Tech Stack

TechnologyUsage
PythonCore backend language
FastAPI / FlaskREST API framework
Google Gemini APILLM for recommendation generation
LangChainRAG pipeline orchestration
ChromaDBVector database for embedding storage & retrieval
VercelFrontend deployment

6. Challenges

Model Hallucination

The most significant challenge was the LLM occasionally generating recommendations that weren't fully grounded in the actual dataset a common problem in RAG systems where the model "fills in gaps" with invented information.

To solve this, I:

  • Refined prompts to strictly instruct the model to only recommend products present in the retrieved context
  • Adjusted retrieval strategies to improve the relevance of what was passed to the LLM
  • Conducted extensive testing across different skin profiles to catch and eliminate inconsistent outputs

Prompt engineering became a core part of the project not an afterthought.


7. Results & Outcome

  • System successfully returns product recommendations based on 6 skin input parameters
  • API performs accurately during testing with results grounded in the dataset
  • Hallucination rate significantly reduced through prompt refinement
  • Frontend interface developed successfully
  • Backend deployment currently in progress

Key Takeaway

This project deepened my understanding of RAG architecture and the real engineering challenge it presents getting an LLM to stay grounded in retrieved data. It taught me that in AI systems, prompt engineering and retrieval quality are just as important as model selection.


Built & designed solo by [Unil Prajapati]