Skip to content
All projectsNext: DocuIntel
Retrieval & RAG · 2024

AI Review Management System

A review intelligence platform built over about ten months. It scrapes reviews from many websites, cleans them, extracts structured sentiment with an LLM, and indexes them in Pinecone with product and category metadata. A per-product chatbot then answers questions from those reviews, finding them with semantic and keyword search together.

ShippedDeployed as a FastAPI service on AWS EC2
Role
Main developer
Team
3 developers
Timeline
About 10 months
Stack
Python · LangChain · OpenAI · Pinecone · FastAPI · AWS EC2
AI Review Management System
ProblemReviews were spread across sites as free text: impossible to search, compare or question at scale.
ApproachAn ingestion pipeline into Pinecone, then metadata-filtered hybrid retrieval that grounds a per-product chatbot.
TechnologyPython, Selenium, Playwright, OpenAI, LangChain, Pinecone, Langfuse, FastAPI, AWS EC2.
OutcomeProduct questions answered from real customer reviews, served as an API on AWS.

Problem

The business had a large body of customer reviews across many products, categories and websites, almost all of it unstructured text. Reading it by hand did not scale, keyword search missed paraphrased answers, and a general chatbot would answer from its training data instead of from what customers actually wrote. The system had to collect the reviews, make them consistent, analyse them, and retrieve the right ones for each question.

Approach

One record shape from many sitesSource-specific extractors built on Selenium and Playwright handle dynamic pages and different layouts, then cleaning and normalisation with pandas give every review the same shape. Mistakes here would flow into sentiment, embeddings and every answer, so this stage came first.
LLM output as a data contractSentiment analysis runs through OpenAI with structured output instead of free text, so each review's analysis is machine-readable and feeds storage and retrieval directly, with no fragile parsing step.
Narrow first, then search two waysEach question is scoped to the right product or category with metadata filters. Semantic search catches paraphrases; lexical search catches product names and model numbers. Eleven candidate records are retrieved and re-scored for relevance before the LLM sees them.
Traceable and servedLangfuse traces each step of the chain, from filters and retrieved reviews to the prompt and the reply, so a wrong answer can be traced to its cause. The pipeline is exposed through FastAPI and deployed on AWS EC2.

Architecture

How the system fits together, in two views.

Ingestion: from web pages to searchable records
Review sitesmany layoutsBrowser scrapingSelenium · PlaywrightClean + normalisepandasLLM analysisstructured sentimentEmbed + metadataproduct · categoryPineconevectors + metadata
Every review takes the same path, so the retrieval layer only ever sees one consistent record: cleaned text, structured sentiment, an embedding and product/category metadata.
Answering a question about one product
QuestionMetadata filterSemantic searchLexical search11 candidatesLLM answerLangfuseGrounded reply
Metadata filtering scopes the search before any ranking. Semantic and lexical results are merged, eleven records are re-scored, and only the relevant reviews become the model's context. Langfuse records the whole chain.

Decisions

  1. Hybrid retrieval, not vector search aloneOver: Pure semantic searchExperiments showed vector similarity handled paraphrased questions but could miss exact product names, model numbers and terms. Lexical search covers exactly that gap, so both run on every question.
  2. Filter by metadata before rankingWith many products and categories in one corpus, searching everything pulled in reviews of the wrong product. Storing product and category metadata with each vector lets retrieval start from the right subset.
  3. Structured output for review analysisOver: Free-form LLM textDownstream code needs sentiment in a predictable shape. A schema turns the LLM into a dependable step in a data pipeline instead of text that has to be parsed.
  4. Pinecone for the final systemOver: ChromaDB, FAISSAll three were tried during retrieval experiments; Pinecone became the vector store for the deployed system.
  5. Tracing from the startAn answer depends on the query, filters, retrieved reviews, prompt and model. Langfuse traces make each of those visible, which ordinary request logs do not.

Technology

Language
Python
Extraction
Selenium, Playwright
Data
pandas, scikit-learn, Matplotlib
LLM
OpenAI API with LangChain
Retrieval
Pinecone with metadata filtering, semantic + lexical hybrid search
Evaluated
Pinecone, ChromaDB and FAISS
Observability
Langfuse tracing
Serving
FastAPI on AWS EC2

Outcome

2024
review records retrieved and re-scored before each answer
retrieval strategies fused: semantic and lexical
vector stores evaluated before choosing Pinecone
10 mofrom first scraper to deployment on EC2

My role

Main developer in a team of three, working across the core AI and backend workflow. The split of individual components inside the team is not claimed here.

  • Review extraction and data cleaning
  • LLM structured-output experiments
  • Vector database evaluation
  • Metadata-aware, hybrid retrieval
  • Product-specific chatbot
  • Langfuse tracing
  • FastAPI backend and EC2 deployment
AI Review Management System detail 1
AI Review Management System detail 2
Next projectDocuIntelTurns PDFs, Word files, spreadsheets, text and images into validated records. You name the fields; the backend builds the schema at runtime and runs it on your own LLM key.