SB
Soban Bin NadeemAI ENGINEER
INDEX // ALL PROJECTS
PRODUCTION SPECIFICATION
AI Product Research / Web IntelligenceWeb Intelligence Enginegit: main

MarketLens

An AI-powered product research agent that gathers product data from Daraz, OLX, and the wider web, analyzes prices, compares new versus used markets, and produces a final market intelligence report.

Repository: [MARKETLENS_REPOSITORY_URL]@Nabos23 ↗
SYSTEM TELEMETRY & SPECIFICATIONProduction Pipeline
RoleAI Research Engineer
Primary FocusMulti-Source Extraction & Market Synthesis
Integrations
Daraz ScraperOLX ScraperDDGS SearchPythonLLM Reasoning
01 // THE CHALLENGE

The Problem Context

Conducting competitive product research across regional e-commerce platforms and classifieds (like Daraz and OLX) requires tedious manual search queries, copying price outliers, distinguishing brand-new retail items from secondhand listings, and synthesizing price elasticity by hand.

⚠WHY THIS WAS TECHNICALLY DIFFICULT:
  • ›E-commerce sites have drastically different HTML markup, search algorithms, and pagination mechanics.
  • ›Classified listings frequently lack structured attributes, mixing accessories, parts, and complete items under confusing headlines.
  • ›Search results from open web queries contain noisy duplicates and irrelevant sponsored links.
02 // THE SOLUTION

Engineering Architecture

Developed MarketLens: an automated research agent that coordinates concurrent scrapers across Daraz, OLX, and open-web search (DDGS), normalizes inconsistent product specs and currencies, classifies listings into new vs. used tiers, and feeds clean data into an LLM synthesis engine for executive market intelligence reports.

Execution Sequence:

STEP 1User submits a product query (e.g., 'Sony WH-1000XM4' or 'MacBook Air M2').
STEP 2Agent dispatches parallel fetchers to Daraz, OLX, and DDGS web search.
STEP 3Raw listing details (title, price, condition, seller rating, URL) are scraped and normalized.
STEP 4AI classification layer sorts listings into verified new retail vs. secondhand/used markets.
STEP 5Price analytics engine computes median, lowest, highest, and interquartile price spreads.
STEP 6Synthesis engine drafts an executive report detailing price trends, marketplace disparities, and purchasing recommendations.
03 // SYSTEM TOPOLOGY

Interactive Architecture & Data Flow

Parallel multi-source data ingestion pipeline with automated condition classification and LLM synthesis.

marketlens // parallel-multi-source-intelligence
IQR Outlier Filter: Enabled
Query Engine: Target Product Keyword
Daraz ScraperOfficial retail & ratings
OLX ScraperClassifieds & secondhand
DDGS Web SearchTech specs & external reviews
Condition Classifier & IQR Price NormalizerSeparates brand-new retail from used listings • Strips outlier zero/fake bids
Structured Market Intelligence Report (Median, Spreads, Best-Value Recommendations)
01User Research Query

Target product search terms and boundary filters submitted.

02Multi-Source Fetchers

Parallel crawlers query Daraz, OLX, and DDGS Search.

03Normalization Engine

Cleans irregular text, strips currencies, standardizes attributes.

04New vs Used Classifier

Categorizes retail inventory vs private classifieds.

05Statistical Price Modeling

Computes quartile ranges, outliers, and average discounts.

06Market Intelligence Report

Synthesizes structured findings into an actionable brief.

04 // ENGINEERING DEEP-DIVE

Key Technical Challenges

CHALLENGE 01

Multi-Source Data Inconsistency

Problem:OLX presents unstructured classified text while Daraz presents structured catalog cards.

✓ Engineering Solution:Constructed an abstraction pipeline where scrapers normalize to a unified Pydantic ProductRecord model before feeding downstream analytics.
CHALLENGE 02

Accurate New vs. Used Differentiation

Problem:Sellers on classified sites often label used products as '10/10 condition' or 'box packed'.

✓ Engineering Solution:Engineered an AI heuristic combining listing title keywords, description signals, and platform source origin to reliably tag condition status.
CHALLENGE 03

Filtering Outlier & Fake Listings

Problem:Zero-price listings, bait ads, or accessory parts skew average market valuations.

✓ Engineering Solution:Applied interquartile range (IQR) outlier filtering on price distributions before passing datasets to the synthesis stage.
05 // STACK & LIBRARIES

Verified Technology Stack

Languages & Core
PythonFastAPI
Backend Services
Multi-source HTTP ClientData Normalizers
AI & Orchestration
Market Analysis SynthesisNew vs Used ClassifierDDGS Web Intelligence
Infrastructure
Data PipelineMarkdown/JSON Exporter
06 // ARCHITECTURAL TRADE-OFFS

Design Decisions & Rationales

Decoupled Fetchers with Resilient Async HTTP

If one marketplace experiences rate-limiting or downtime, the agent continues aggregating data from remaining sources gracefully.

Structured Intermediate JSON before LLM Synthesis

Feeding the model pre-aggregated statistics rather than 100 raw webpage dumps significantly reduces token costs while preventing calculation errors.

07 // PRODUCTION OUTCOME

Technical Results

  • ✓Built multi-source product scraping across Daraz, OLX, and search engines.
  • ✓Automated new vs. used price segmentation and outlier detection.
  • ✓Generated structured market analysis reports synthesizing retail spreads and secondary market dynamics.

Lessons Learned

  • •LLMs excel at high-level market commentary and synthesis, but statistical metrics (medians, spreads) should always be calculated deterministically in code.

Future Improvements

  • •Implement scheduled price tracking cron jobs to monitor price drops over weeks.
  • •Add automated currency conversion for international marketplaces.

Have questions about this architecture?

Let's discuss multi-agent systems, backend scaling, or custom integrations.