Inspiration

Online shopping becomes difficult when customers do not know the exact product name or keywords. A shopper may begin with a vague request, gradually reveal preferences, or change direction during the conversation. Traditional search systems often process each query independently and lose this evolving context.

We built IntentCart to create a more natural shopping experience: a conversational agent that remembers preferences, asks useful follow-up questions, adapts to changing intent, and retrieves relevant products without depending on an expensive online language model.

What it does

IntentCart is an offline conversational product-search agent for a catalog of 50,000 clothing, footwear, and jewelry products.

It can:

  • understand natural-language shopping requests;
  • distinguish focused buying from exploratory browsing;
  • maintain preferences and constraints across multiple turns;
  • handle replaced or withdrawn preferences;
  • ask targeted clarification questions;
  • return a ranked Top 10 product list on every turn;
  • operate without an API key or network connection.

How we built it

We developed IntentCart in Python and used LangGraph to manage checkpointed conversation state.

The retrieval pipeline combines:

  • SQLite FTS5 candidate retrieval;
  • multiple query routes for categories, attributes, and context;
  • Reciprocal Rank Fusion to combine retrieval results;
  • constraint-aware product reranking;
  • a controlled popularity tie-break signal;
  • progressive shortlist expansion;
  • safety exits for intent changes and conflicting constraints.

The final evaluated configuration is fully deterministic and offline. An optional structured-output LLM path exists, but it is not required for the submitted system.

Challenges we ran into

The first challenge was balancing early recommendations with clarification. Asking too many questions increases the number of turns, while recommending too early can reduce accuracy.

Intent changes were another difficult case. Simply accumulating every preference caused outdated constraints to remain active after the shopper changed direction. We introduced event-based constraint replacement so stale preferences could be retired explicitly.

We also found that optimizing only against the public sessions could encourage overfitting. We created additional validation and stress datasets, ran feature-level ablation studies, and adopted a more conservative ranking strategy designed to generalize beyond the development set.

Accomplishments that we're proud of

On the official 200-session public evaluation, IntentCart achieved:

  • 98.5% HitRate@10, finding the target in 197 of 200 sessions;
  • 0.722583 Mean Reciprocal Rank;
  • 2.715 Mean Turns to Conversion;
  • 0.874975 Technical Score;
  • zero prompt and completion tokens.

The project also includes 21 passing unit tests, reproducible evaluation scripts, scenario-level metrics, ablation experiments, and complete documentation of the final configuration.

What we learned

We learned that conversational search is not only a retrieval problem. Strong performance also depends on structured memory, clarification timing, intent-change detection, and careful control of secondary ranking signals.

We also learned that a higher development-set score does not always mean better generalization. Testing new sessions and stress scenarios helped us make more deliberate engineering decisions.

Most importantly, deterministic retrieval can provide accurate, fast, and reproducible conversational search without calling an LLM on every turn.

What's next for IntentCart

We plan to evaluate IntentCart with more diverse real-world conversations, add calibrated semantic reranking, and improve clarification decisions using user feedback.

Future work also includes a customer-facing interface, clearer recommendation explanations, multilingual conversations, and a hybrid architecture that calls a small language model only for genuinely ambiguous requests while keeping deterministic retrieval as the reliable core.

Built With

  • conversational
  • fts5
  • fusion
  • information
  • langgraph
  • language
  • natural
  • processing
  • pydantic
  • python
  • rank
  • reciprocal
  • retrieval
  • rule-based
  • sqlite
Share this project:

Updates

Submission history