Lab build

Flipkart product assistant

Answers product questions from Flipkart reviews using AstraDB vector search and conversation-aware retrieval.

Role
Builder, end to end
Group
LLMOps and AIOps
Services
AI & LLM systems · MLOps & cloud

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

  1. 01

    Data converter turns each review into a document with the product title as metadata.

  2. 02

    Ingestor embeds reviews with BAAI/bge-base-en-v1.5 and loads them into an AstraDB collection, or reuses the existing one.

  3. 03

    History-aware retriever rewrites follow-up questions into standalone queries before fetching the top three reviews.

  4. 04

    Per-session chat history is kept with RunnableWithMessageHistory so answers follow the conversation.

  5. 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.

  1. L1Data

    • Flipkart review CSV
    • Document converter
  2. L2Vector store

    • BGE-base embeddings
    • AstraDB collection
  3. L3RAG

    • History-aware retrieval chain
    • Groq Llama 3.1 8B
    • Session chat history
  4. L4Serving

    • Flask chat UI
    • Minikube on GCP VM
  5. L5Monitoring

    • Prometheus scrape
    • Grafana dashboards

Stack

  • LangChain
  • AstraDB
  • BGE embeddings
  • Groq
  • Llama 3.1
  • Flask
  • prometheus_client
  • Docker
  • Kubernetes
  • Minikube
  • Prometheus
  • Grafana

Next lab build · 04 / 46

Study Buddy AI quiz generator

Generates multiple-choice and fill-in-the-blank quizzes on any topic, shipped through Jenkins and ArgoCD.

Previous: Multi AI agent with web search

Need a system like this in production? Tell us about it.