Skip to main content
Prototype
  • ai-rag
  • backend
  • experimental

SmartShop RAG Product Advisor

A personal AI project exploring retrieval quality for product recommendation: SQLite as the primary data source, Qdrant for vector storage, hybrid dense and sparse retrieval with BGE-M3 embeddings, reranking, product filtering, multilingual query support and evaluation datasets.

role
Personal project
period
Project dates to be confirmed
status
Prototype

01Overview

SmartShop is a personal project about a narrow question: what actually improves retrieval quality when the corpus is a product catalogue rather than prose?

Product queries break naive semantic search. They mix exact tokens that must match — a model number, a size — with fuzzy intent that only embeddings capture. The system combines both retrieval styles, reranks the result, and measures the outcome against evaluation datasets rather than against impressions.

02Context

Recommendation systems are usually judged by anecdote: a few queries are tried, the results look reasonable, and the system is declared to work.

This project takes the opposite approach — build the evaluation datasets alongside the retrieval, so a change can be shown to help rather than assumed to.

03Problem

Dense retrieval alone misses exact matches; sparse retrieval alone misses intent. Neither is sufficient for product search, and choosing between them is the wrong question.

  • Exact tokens such as model numbers must be matched exactly, not approximately.
  • Queries expressing intent rather than keywords must still return sensible products.
  • Queries arrive in more than one language.
  • Structured attributes — category, price, availability — need to constrain results, not just influence them.
  • Retrieval changes need to be measurable rather than judged by inspection.

04My Role

My Role

This is my own project. I built the retrieval pipeline: SQLite as the primary data source, Qdrant for vector storage, hybrid dense and sparse retrieval using BGE-M3 embeddings, a reranking stage, product filtering, multilingual query support, and the evaluation datasets used to assess retrieval changes.

05Responsibilities

Retrieval

  • Hybrid dense and sparse retrieval.
  • BGE-M3 embeddings.
  • Reranking of retrieved candidates.
  • Multilingual query support.

Data

  • SQLite as the primary data source.
  • Qdrant vector storage.
  • Product filtering over structured attributes.

Evaluation

  • Evaluation datasets for assessing retrieval quality.

06Technical Approach

Keep the catalogue in a relational store as the source of truth, index it for vector search, retrieve with both strategies at once, then spend the remaining effort on reranking and measurement.

  1. 01Hold the product catalogue in SQLite as the primary data source.
  2. 02Embed products with BGE-M3 and index them in Qdrant.
  3. 03Retrieve candidates using dense and sparse strategies together, so exact-token and intent-style queries are both served.
  4. 04Rerank the combined candidate set, because first-stage retrieval optimises for recall and reranking is where precision is recovered.
  5. 05Apply product filtering over structured attributes as constraints on the result set.
  6. 06Assess changes against evaluation datasets rather than by inspecting a handful of queries.

07Architecture

The product catalogue is held in SQLite and embedded with BGE-M3 into Qdrant. A query runs dense and sparse retrieval in parallel; the combined candidates are reranked, then constrained by product filters over structured attributes. Evaluation datasets measure the effect of changes to any stage.

  1. 01Catalogue: products held in SQLite as the primary data source.
  2. 02Indexing: products embedded with BGE-M3 and stored in Qdrant.
  3. 03Query: a multilingual query enters the retrieval pipeline.
  4. 04Hybrid retrieval: dense and sparse strategies produce a combined candidate set.
  5. 05Reranking: candidates are reordered for precision.
  6. 06Filtering: structured product attributes constrain the final result set.
  7. 07Evaluation: datasets measure retrieval quality across changes.

08Features

  • Hybrid retrieval

    Dense and sparse strategies together, so exact tokens and intent both work.

  • BGE-M3 embeddings

    Multilingual embeddings backing the dense side of retrieval.

  • Reranking

    A second stage that recovers precision after a recall-oriented first pass.

  • Product filtering

    Structured attributes constrain results rather than merely influencing them.

  • Evaluation datasets

    Retrieval changes are measured rather than assumed to help.

09Challenges

  • Semantic search returns plausible-looking products that are the wrong model or the wrong size, because embeddings blur exactly the tokens that matter most.

    Pairing sparse retrieval with dense retrieval keeps exact tokens addressable while intent-style queries still work.

  • Retrieval changes are easy to convince yourself about by trying a few queries.

    Building evaluation datasets alongside the pipeline made the effect of a change something to measure instead of something to argue about.

10Decisions and Tradeoffs

DecisionAlternative consideredWhy
Keep SQLite as the primary data source with Qdrant as the vector index.Treating the vector store as the system of record.A relational store keeps structured attributes queryable and authoritative; the vector index stays a derived artefact that can be rebuilt. The cost is keeping the two in step.
Add a reranking stage.Returning first-stage retrieval results directly.Reranking costs latency on every query, but first-stage retrieval is tuned for recall — without a second stage, precision stays capped.

11Result

A working prototype that retrieves products using hybrid dense and sparse strategies with reranking, constrained by structured product filters and evaluated against purpose-built datasets. It is an experimental personal project, not a deployed product.

12Lessons Learned

  1. 01Hybrid retrieval is not a hedge. Dense and sparse strategies fail on different queries, which is exactly why running both is better than picking one.
  2. 02Reranking is where precision is won, once first-stage retrieval has done its job on recall.
  3. 03Building the evaluation set first changes how you work on retrieval — it turns opinions into measurements.

13Technology Stack

Data

  • SQLite
  • Qdrant

AI and retrieval

  • BGE-M3 embeddings
  • Hybrid dense and sparse retrieval
  • Reranking
  • Evaluation datasets

Backend

  • Product filtering
  • Multilingual query support

14Screenshots

  • The SmartShop AI Advisor start screen: a sidebar with recent chats, data sources and admin tools beside six suggested analyses such as gaming laptops, return policies and price trends, above a free-text product query box.

    The entry point: suggested analyses stand in for the empty state, and any of them can be typed as a free-form question instead.

  • An exported conversation in which a request for a phone case under fifteen dollars returns two ranked recommendations with reasoning, the applied category and price filters, product cards showing price, rating and stock, and the source product identifiers.

    An exported answer. The filters the query resolved to are shown alongside the results, and every recommendation cites the product record it came from.

Let’s discuss your project

Have a software, AI, RAG, or web application project in mind? Let’s discuss what you need and determine the right technical approach.