Inspiration
Online shopping search is still largely built around keywords. Users are expected to know exactly what to type, even when they are unsure about the product, terminology, or which attributes matter. We wanted to build a shopping experience that works more like talking to a knowledgeable store assistant. Instead of asking users to repeatedly reformulate searches, TechJam AI Shopping lets them describe what they want naturally, refine their preferences conversationally, and receive progressively better recommendations. Our goal was not simply to add an LLM chat interface to product search. We wanted to investigate whether a combination of lexical retrieval, semantic understanding, product taxonomy, query expansion, and learned ranking could make conversational product discovery substantially more effective.
What it does
TechJam AI Shopping is a conversational product discovery system built over a frozen catalog of 50,000 products. A user can start with a natural request such as: “I’m looking for comfortable casual shoes for everyday use.” The system retrieves relevant products and allows the user to refine the search naturally: “Prefer something lightweight.” “Maybe something more durable.” The system maintains the preferences expressed during the conversation and uses them to refine subsequent recommendations. Under the hood, TechJam combines: BM25 for strong lexical matching MiniLM semantic embeddings for meaning-based retrieval Protected synonym expansion to handle vocabulary differences without losing important query terms Taxonomy-aware retrieval to leverage the product category hierarchy 24-dimensional feature representations Pairwise learning-to-rank to reorder retrieved candidates based on relevance The final system produces a ranked Top-10 recommendation list while supporting conversational refinement
How we built it
We built TechJam as a multi-stage retrieval and ranking pipeline.
First, we created a searchable representation of the 50,000-product catalog using SQLite FTS5 and BM25-style lexical retrieval.
We then added a semantic retrieval layer using a Sentence Transformers / MiniLM model. This allows the system to recognize that differently worded queries can express similar intent.
Rather than blindly expanding queries, we introduced protected synonym expansion and taxonomy-aware expansion. The original query terms remain protected while additional vocabulary is introduced from the catalog's terminology and category structure.
The resulting candidates are passed into a learned ranking stage. We constructed a 24-dimensional feature representation for candidate products and trained a pairwise ranking model to learn which product should appear above another. We evaluated the system on the released public sessions and used grouped cross-validation when evaluating the learned ranking component.
Challenges we ran into
The biggest challenge was realizing that good retrieval and good ranking are two different problems. A sophisticated reranker cannot recover a product that was never retrieved in the first place. Early experiments therefore focused heavily on candidate recall and diagnosing why relevant products were being missed. We also encountered a vocabulary mismatch problem. Users and product catalogs often describe the same concept using different words. Simply adding more synonyms, however, could introduce irrelevant products and dilute important query signals. This led us to the idea of protected synonym expansion: expand the query while preserving the original intent-bearing terms. Another challenge was balancing multiple retrieval signals. Pure lexical search was too rigid, while semantic retrieval could sometimes return products that were conceptually similar but violated important product constraints. Finally, we had to make the system practical enough to run locally and deploy as an interactive application while keeping the heavy catalog processing and model initialization manageable.
Accomplishments that we're proud of
We are proud that the project evolved beyond a simple conversational UI into a complete hybrid information-retrieval and learning-to-rank system. The largest improvement was at deeper candidate recall: R@100 improved by 18 percentage points, while R@50 improved by 13 percentage points. We also maintained approximately 94–95% candidate coverage, showing that the ranking improvements were built on a strong retrieval foundation rather than simply narrowing the candidate pool. Most importantly, we were able to turn the research experiments into an actual interactive application that users can try through a conversational interface.
What we learned
Our biggest lesson was that better search is not necessarily about using a bigger model. The quality of the entire retrieval pipeline matters. We learned that: Candidate recall comes first. A perfect ranker cannot rank products it never sees. Lexical and semantic retrieval complement each other. Exact terminology matters for product search, while semantic retrieval helps handle natural language variation. Query expansion needs safeguards. More vocabulary is not automatically better. Expansion must preserve the user's original intent. Product taxonomy is valuable information. Category structure provides signals that a generic semantic embedding may not capture. Ranking should be evaluated separately from retrieval. This made it possible to identify where improvements were actually coming from. A conversational interface is only useful when the underlying retrieval system improves. The chat experience should help users express intent, not hide weak search behind a conversational layer.
What's next for TechJam AI Shopping - Conversational Product Discovery
The current system is a strong foundation, but there are several directions we would explore next. Better conversational intent understanding We would build a more sophisticated intent and constraint extraction layer capable of explicitly separating: category → attributes → preferences → constraints → use case → budget This would allow the ranking system to distinguish between hard requirements and softer preferences. More intelligent questioning Instead of simply retrieving products after every message, the assistant could estimate which missing piece of information would most reduce uncertainty and ask the user the most useful follow-up question. Multimodal shopping The next step would be allowing users to provide an image alongside text: “Find me something similar to this, but more casual and under $100.” Personalized ranking With appropriate privacy controls, longer-term preference signals could be incorporated into ranking while keeping the system transparent about why products are recommended. We would also optimize model loading, embedding storage, caching, and candidate generation to make the system faster and cheaper to operate at larger catalog sizes. Ultimately, our vision is to move from searching for products to having a conversation about what you want to buy. Tell us what you want. We'll narrow it down.
Built With
- bm25
- joblib
- numpy
- pandas
- python
- scikit-learn
- sentencetransformers
- streamlit
Log in or sign up for Devpost to join the conversation.