How gopalvutukuri14-netizen/retailmindai works
RetailMind AI is a conversational smartphone recommendation product. The main path runs from a shopper’s query and profile through intent parsing, conditional routing, product retrieval and preference lookup, ranking, explanations and follow-up suggestions, then a structured response in the chat UI. The README also documents an offline sentiment-and-embedding preparation pipeline. Source excerpts establish several calls and graph transitions; README statements support documented branches and data stages where implementation details were not sampled.
Main entry points: nodes.py Agent wrappers and routing · graph.py LangGraph workflow · agent.py Response synthesis · App.jsx Chat interface
Components 23
Chat experience
- Chat interface
frontend/src/App.jsx - Chat views
frontend/src/components/MessageBubble.jsx - Recommendation client
frontend/src/api/recommend.js
API and orchestration
- FastAPI endpoints
backend/main.py - LangGraph workflow
backend/orchestrator/graph.py - Pipeline state
backend/orchestrator/state.py - Agent wrappers and routing
backend/orchestrator/nodes.py
Recommendation agents
- Query understanding
backend/Agents/query_understanding/agent.py - Retrieval agent
backend/Agents/retrieval/agent.py - Preference memory
backend/Agents/memory/agent.py - Product ranking
backend/Agents/ranking/agent.py - Product explanations
backend/Agents/xai/agent.py - Follow-up suggestions
backend/Agents/follow_up/agent.py - Response synthesis
backend/Agents/response/agent.py
Catalog and data preparation
- Semantic product search
backend/pipeline/retrieval.py - Sentiment aggregation
backend/pipeline/aggregate_sentiment.py - Sentiment analysis
backend/pipeline/sentiment_full.py - Embedding generation
backend/pipeline/generate_embeddings.py - Catalog loading
backend/pipeline/load_chromadb.py
External services
- Product vector store
- SQLite profiles
- Gemini service
Other components
- Shopper
Connections 26
- Shopper → Chat interface: submits query
frontend/src/App.jsx - Chat interface → Recommendation client: requests recommendations
frontend/src/App.jsx - Recommendation client → FastAPI endpoints: calls API
- FastAPI endpoints → LangGraph workflow: runs workflow
backend/main.py - LangGraph workflow → Agent wrappers and routing: dispatches nodes
backend/orchestrator/graph.py - Agent wrappers and routing → Query understanding: parses query
- Agent wrappers and routing → Retrieval agent: retrieves candidates
- Retrieval agent → Semantic product search: searches products
backend/Agents/retrieval/agent.py - Semantic product search → Product vector store: queries catalog
backend/pipeline/retrieval.py - Agent wrappers and routing → Preference memory: loads preferences
backend/orchestrator/nodes.py - Preference memory → SQLite profiles: reads profiles
- Agent wrappers and routing → Product ranking: scores candidates
- Agent wrappers and routing → Product explanations: explains rankings
- Agent wrappers and routing → Follow-up suggestions: suggests actions
- Agent wrappers and routing → Response synthesis: synthesizes response
- Response synthesis → Gemini service: generates response
- Product explanations → Gemini service: generates explanations
- LangGraph workflow → Pipeline state: accumulates results
backend/orchestrator/graph.py - Chat interface → Chat views: renders messages
frontend/src/App.jsx - Sentiment analysis → Sentiment aggregation: feeds aggregation
- Sentiment aggregation → Embedding generation: prepares catalog data
- Embedding generation → Catalog loading: loads embeddings
- Catalog loading → Product vector store: loads catalog
- LangGraph workflow → Retrieval agent: routes product queries
backend/orchestrator/graph.py - LangGraph workflow → Response synthesis: routes general replies
- LangGraph workflow → Response synthesis: routes context replies