Inspiration
Traditional e-commerce search works well when shoppers know the exact product name, but real requests are rarely that precise. People search with phrases such as “comfortable shoes for travelling,” “a black dress under $80,” or “something similar, but without leather.” We built this project to bridge the gap between how people naturally describe their needs and how product catalogs are structured. Our goal was to create a conversational shopping agent that can interpret intent, respect constraints, and surface the right product from a catalog of 50,000 items within ten turns.
What it does
The system searches and reranks products using the shopper’s message and anonymized preference profile. It recognizes signals such as:
- Product category and intended use
- Budget ranges and maximum prices
- Preferred features, materials, colors, and brands
- Explicit exclusions such as “not leather”
- Whether the shopper is ready to buy or still browsing For focused buying requests, the system prioritizes strict relevance and constraint satisfaction. For exploratory requests, it introduces controlled diversity while protecting the strongest search results. ## How we built it We built the project in Python using SQLite FTS5 as a lightweight full-text search engine. Product information—including titles, categories, features, descriptions, stores, and structured details—is indexed and retrieved using weighted BM25 scoring. The top candidates then pass through a deterministic reranking pipeline that combines:
- Retrieval rank
- Query-term coverage
- Field-level relevance
- Budget compatibility
- Negative-preference detection
- Structured hard-constraint evaluation
- Intent-specific ranking policies
- Diversity-aware selection for browsing queries We also developed a local evaluator, automated tests, and ranking diagnostics to measure Hit Rate@10, Mean Reciprocal Rank, and Mean Turns to Conversion. On the 200-session public evaluation set, our system improved Hit Rate@10 from 12.5% to 13.5%, increased MRR from 0.0680 to 0.0726, and reduced MTTC from 9.81 to 9.71. The entire pipeline runs locally using Python’s standard library, requiring no paid API calls and reporting zero model-token usage.We built the project in Python using SQLite FTS5 as a lightweight full-text search engine. Product information—including titles, categories, features, descriptions, stores, and structured details—is indexed and retrieved using weighted BM25 scoring. The top candidates then pass through a deterministic reranking pipeline that combines:
- Retrieval rank
- Query-term coverage
- Field-level relevance
- Budget compatibility
- Negative-preference detection
- Structured hard-constraint evaluation
- Intent-specific ranking policies
- Diversity-aware selection for browsing queries We also developed a local evaluator, automated tests, and ranking diagnostics to measure Hit Rate@10, Mean Reciprocal Rank, and Mean Turns to Conversion. On the 200-session public evaluation set, our system improved Hit Rate@10 from 12.5% to 13.5%, increased MRR from 0.0680 to 0.0726, and reduced MTTC from 9.81 to 9.71. The entire pipeline runs locally using Python’s standard library, requiring no paid API calls and reporting zero model-token usage. ## Challenges we ran into One major challenge was working with inconsistent product metadata. Important attributes may appear in a title, feature list, description, or structured detail—or may be missing entirely. We learned that missing evidence must be treated differently from a confirmed constraint violation. Another challenge was balancing relevance and diversity. Diversifying too aggressively can push the correct product out of the Top 10, while returning near-duplicate products creates a poor browsing experience. We addressed this with protected top results, relevance bands, near-tie thresholds, and minimum diversity-gain requirements. Finally, reranking itself introduced risk: a sophisticated scoring rule can perform worse than the original retrieval order. We therefore made every ranking decision deterministic and inspectable, with diagnostics showing each candidate’s signals, score contributions, policy adjustments, and final position. ## What we learned We learned that effective product search is not simply keyword matching or a single relevance score. Buying, browsing, exclusions, budgets, and incomplete metadata each require different treatment. Most importantly, we learned the value of building an explainable and measurable foundation. A lightweight deterministic system makes every improvement reproducible—and gives us a strong base for future conversational clarification and semantic retrieval.
Log in or sign up for Devpost to join the conversation.