Flipkart product assistant
Answers product questions from Flipkart reviews using AstraDB vector search and conversation-aware retrieval.
What it does
Flipkart review rows become LangChain documents tagged with product titles and are embedded with BGE-base into an AstraDB vector collection. A history-aware retrieval chain rewrites follow-up questions, retrieves three reviews and answers with Groq Llama 3.1 behind a Flask chat UI. The app runs on Minikube in a Google Cloud VM, exposes a Prometheus /metrics endpoint and is charted in Grafana.
What was built
- 01
Data converter turns each review into a document with the product title as metadata.
- 02
Ingestor embeds reviews with BAAI/bge-base-en-v1.5 and loads them into an AstraDB collection, or reuses the existing one.
- 03
History-aware retriever rewrites follow-up questions into standalone queries before fetching the top three reviews.
- 04
Per-session chat history is kept with RunnableWithMessageHistory so answers follow the conversation.
- 05
Flask exposes a request counter at /metrics; Prometheus in a monitoring namespace scrapes it every 15 seconds for Grafana.
The pipeline, layer by layer
Five layers, one pipeline.
L1Data
- Flipkart review CSV
- Document converter
L2Vector store
- BGE-base embeddings
- AstraDB collection
L3RAG
- History-aware retrieval chain
- Groq Llama 3.1 8B
- Session chat history
L4Serving
- Flask chat UI
- Minikube on GCP VM
L5Monitoring
- Prometheus scrape
- Grafana dashboards