How vishwashn12/grace works
GRACE is an e-commerce support product combining grounded order/seller assistance with policy and complaint knowledge retrieval, plus operational and seller analytics. The main workflow takes a customer query through the chat API into the RAG orchestrator, which selects agent or retrieval-based answering and returns a grounded response; the frontend also exposes dashboard, seller, and insights views. Some backend and page implementations were not sampled, so those relationships are included only where the README or source index supports them.
Main entry points: App.jsx Web application · rag_system.py Answer orchestrator · hybrid_retriever.py Hybrid retrieval · Chat.jsx Support chat
Components 21
Support interface
- Web application
frontend/src/App.jsx - Support chat
frontend/src/pages/Chat.jsx - Operations dashboard
frontend/src/pages/Operations.jsx - Seller analytics
frontend/src/pages/Sellers.jsx - Support insights
frontend/src/pages/InsightsPage.jsx
API and orchestration
- Chat endpoint
backend/routes/chat.py - RAG client
backend/services/rag_client.py - Answer orchestrator
backend/core/rag_system.py
Agent support
- Agent graph
backend/agent/graph.py - Agent nodes
backend/agent/nodes.py - Support tools
backend/agent/tools.py
Knowledge retrieval
- Hybrid retrieval
backend/retrievers/hybrid_retriever.py - FAISS search
backend/retrievers/faiss_retriever.py - BM25 index
backend/retrievers/bm25_builder.py - RAG query stages
backend/rag
Business analytics
- Analytics endpoint
backend/routes/analytics.py - Operations metrics
backend/services/operations_service.py - Insights endpoint
backend/routes/insights.py - Seller KPI service
backend/services/seller_service.py - Dataset loader
backend/services/data_service.py
Other components
- Customer
Connections 21
- Customer → Web application: uses
- Web application → Support chat: routes to
frontend/src/App.jsx - Web application → Operations dashboard: routes to
frontend/src/App.jsx - Web application → Seller analytics: routes to
frontend/src/App.jsx - Web application → Support insights: routes to
frontend/src/App.jsx - Support chat → Chat endpoint: submits queries
- Chat endpoint → RAG client: calls
backend/routes/chat.py - RAG client → Answer orchestrator: invokes
backend/services/rag_client.py - Answer orchestrator → Agent graph: dispatches agent path
- Answer orchestrator → Hybrid retrieval: retrieves documents
- Agent graph → Agent nodes: uses nodes
backend/agent/graph.py - Agent nodes → Support tools: executes tool calls
backend/agent/nodes.py - Hybrid retrieval → FAISS search: dense search
backend/retrievers/hybrid_retriever.py - Hybrid retrieval → BM25 index: sparse search
backend/retrievers/hybrid_retriever.py - Answer orchestrator → RAG query stages: uses query stages
backend/core/rag_system.py - Operations dashboard → Analytics endpoint: requests metrics
- Analytics endpoint → Operations metrics: calls
backend/routes/analytics.py - Operations metrics → Dataset loader: loads data
backend/services/operations_service.py - Seller analytics → Insights endpoint: requests seller data
- Insights endpoint → Seller KPI service: calls
backend/routes/insights.py - Seller KPI service → Dataset loader: loads data
backend/services/seller_service.py