Dev Chiniwala.
Selected workShopSageAI
Engineering case studyAgentic product search

ShopSageAI.

Route the intent. Retrieve the right evidence.

A conversational shopping agent using semantic routing, LangGraph workflows, and distinct product and policy retrieval paths.

Engineering in brief

Constraint
Product filters and policy questions need different retrieval paths.
Decision
Route intent first; query SQLite for products and FAISS for policy text.
Boundary
Ambiguous requests and tool selection need evaluation alongside the final answer.
Role & ownership

Creator · Semantic routing, agent tools, and conversational interface

Project status

Public project

Technology
  • Python
  • LangGraph
  • FastAPI
  • FAISS
  • SQLite

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

Architecture overview

ROUTE → SELECT TOOLS → RESPOND

FastAPImessage + conversation
01
Semantic routerconversation / shopping
02
LangGraph agentSQLite products · FAISS policies
03
Gemini responseselected context + memory
04
Condensed from documented components

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.

Continue exploring

ControlSurface.

Make agent failures useful.