/ overview
A shopping assistant with distinct tools.
ShopSageAI explores a conversational shopping workflow that classifies intent, selects a handler, and uses tools to retrieve product and policy context.
The implementation combines FastAPI, Gemini, conversational memory, a LangGraph ReAct workflow, SQLite product data, and FAISS-based policy retrieval.
/ problem
Different questions need different data paths.
A product filter, a return-policy question, and a casual conversation should not all trigger the same retrieval strategy. Routing makes that distinction explicit before the agent chooses its next action.
/ architecture
Intent before orchestration.
FastAPI receives the message. A semantic router separates general conversation from shopping requests. The shopping workflow uses product search against SQLite and policy retrieval against FAISS, then generates a response with the selected context.
- Semantic routing selects the conversational path.
- LangGraph coordinates the shopping agent and its tools.
- Structured inventory and unstructured policy data use different retrieval mechanisms.
/ Engineering decisions
Match the storage model to the question.
Structured product constraints are a good fit for database queries. Policy text needs semantic retrieval. Keeping the two paths distinct avoids forcing every information need through a vector index.
A separate general-conversation handler avoids unnecessary product-tool calls for messages that do not require them.
/ challenges
Routing is itself a decision to evaluate.
Ambiguous messages can sit between conversation and shopping intent. Agent behavior also depends on tool outputs and conversational state. Routing errors and tool-selection errors should be evaluated separately from final answer quality.
/ results
A public agent workflow with concrete retrieval paths.
The code and documentation expose the router, agent tools, conversational interface, and local setup. Product queries and policy questions have separate, inspectable paths through the same shopping workflow.
/ learnings
A small set of useful tools beats an opaque prompt.
Explicit routing and separate data paths make the workflow understandable. Further evaluation could focus on intent confusion, tool selection, policy grounding, and memory behavior over repeated turns.
Source record
Sources & technical context
Architecture summaries are based on the linked documentation and source. Current implementation details and limits live in the repository.