The problem
Amazon product data is huge and numeric: prices, ratings, rankings, categories. Keyword search can’t answer questions like “which budget headphones have the best rating?”, which need filtering, sorting and aggregating across the whole catalog. This project lets anyone ask those questions in plain English and get an answer backed by real data.
Approach
- Users ask a question in a ChatGPT-style chat interface built with Next.js
- A Flask API passes the question to OpenAI’s models, which translate it into a SQL query
- The query runs against a SQLite database of Keepa data covering ~55K Amazon products
- The returned rows go back to the LLM as context, so the final answer is grounded in the data (retrieval-augmented generation) rather than the model’s memory
- Frontend and backend are separate apps: the Next.js client talks to the Flask API over HTTP, and each has its own setup and docs
Highlights
- Text-to-SQL RAG pipeline over ~55K products
- Product data from Keepa, stored in SQLite
- Answers come from query results rather than model memory
- Co-built with a team of 3 across a Flask backend and Next.js frontend