Inspiration
Shopping search works well when users know the exact keywords, but real customers often begin with vague needs, add constraints gradually, or change their minds halfway through a conversation. We wanted to build an agent that behaves more like a thoughtful shopping assistant: asking useful questions, remembering confirmed preferences, and adapting without starting over.
What it does
Durian Men is an offline conversational shopping agent that searches a catalog of 50,000 products. It understands natural-language requests, asks targeted follow-up questions, tracks preferences across turns, and returns up to 10 ranked recommendations.
The agent supports Buying, Browsing, Boundary, and Intent Override scenarios. It recognizes hard requirements such as category, brand, material, color, and budget while using softer ideas—such as “breathable for summer”—to improve ranking. When a user changes their mind, it removes outdated constraints and reranks using the new intent.
How we built it
We combined deterministic parsing with learned retrieval and ranking.
Our parser extracts constraints, negations, alternatives, budgets, and preference changes from natural language. Exact category and attribute indexes then filter the catalog so recognized hard requirements cannot be ignored by the ranking model.
We route different conversational intents to different rankers. Clear Buying requests use a Linear model, while exploratory and uncertain requests use a Hybrid Factorization Machine with explicit context–product interaction features. Intent Override is handled through conversation state that atomically removes obsolete preferences.
For free-form requests, we use a local BGE-small embedding model to rank the filtered candidates semantically, then fuse those results with the routed Linear/FM ranking. Everything runs offline with no API calls, network dependency, token usage, or model cost.
## Challenges we ran into
The biggest challenge was balancing strict correctness with natural-language flexibility. Hard filters are safe, but overly aggressive parsing can eliminate the correct product. Semantic retrieval understands broader meaning, but embeddings cannot reliably enforce requirements such as “not leather” or “under $50.”
The catalog was also highly sparse and inconsistent. Some products had detailed materials and features, while attributes such as size and use case had limited structured coverage.
Another challenge was model selection. The Factorization Machine performed better on controlled interaction benchmarks, but the simpler Linear model performed better for direct Buying scenarios. Instead of forcing one model across every situation, we introduced intent-based routing.
Finally, only 200 labeled public conversations were available, so we had to avoid overfitting and be careful not to treat small metric differences as conclusive.
Accomplishments that we're proud of
Our routed agent found the correct product in 199 out of 200 public evaluation sessions, achieving:
- 99.5% Hit Rate@10
- 0.704468 MRR
- 2.12 mean turns to conversion
- 0.886440 Technical Score
- 30 out of 30 successful Intent Override sessions
We are especially proud that the final system is fully offline and deterministic where correctness matters. Recognized hard constraints cannot be overridden by semantic retrieval, and the agent can safely recover when users replace earlier preferences.
Our free-form dense-retrieval pipeline also achieved 100% Success@10 and 0.7210 nDCG@10 on the development benchmark while recording zero measured hard-constraint violations.
What we learned
We learned that the most sophisticated model is not automatically the best model for every user intent. Routing between specialized models was more effective than selecting a single universal ranker.
We also learned that conversational search requires more than retrieval. State management, question selection, constraint replacement, and failure-safe behavior can matter as much as the ranking algorithm itself.
Most importantly, deterministic and learned techniques work best together: rules provide safety and consistency, while machine learning provides generalization and better ranking.
What's next for Durian Men
Next, we want to improve generalization to unseen phrasing, worded budgets, implicit sizes, and more complex requests. A confidence-gated catalog entity linker could recognize additional synonyms without turning uncertain interpretations into destructive filters.
We also plan to improve question selection using expected information gain, strengthen personalization using privacy-safe profile information, reduce cold-start latency and memory usage, and evaluate the system against a larger unseen conversation set.
Built With
- bge-small-en-v1.5
- dense-retrieval
- factorization-machines
- fastembed
- natural-language-processing
- numpy
- onnx
- python
- rapidfuzz
- semantic-search
- sqlite
Log in or sign up for Devpost to join the conversation.