Inspiration
Online shopping search often assumes that users know exactly what they want and can describe it in one query. In reality, shoppers start vague, reveal requirements over multiple turns, change their minds, and sometimes have no preference for a requested attribute. We built StateFuse to make e-commerce search more conversational: it should remember the user’s current intent, ask useful follow-up questions, and still recommend products immediately.
What it does
StateFuse is an offline multi-turn shopping search agent for the TikTok TechJam Shopping Copilot track. For each turn, it receives an anonymous user profile, the latest customer message, the current turn, and Top-K. It returns:
- a customer-facing natural-language response;
- one optional clarification attribute;
- a ranked list of valid catalog parent_asin product IDs. It handles Buying, Browsing, Intent Override, and Boundary conversations. In particular, it removes stale preferences when users change their minds and accepts “no preference” answers without adding irrelevant text to the retrieval query.
## How we built it The project is built with Python, SQLite FTS5, and the Python standard library. It uses no external LLM, API key, hosted database, or network connection. The pipeline includes:
- Conversation state management that separates stable product category context from replaceable preference slots.
- Rule-based intent extraction for category, material, color, budget, style, feature, and use case.
- Intent override detection for messages such as “Actually”, “ignore my earlier preference”, and “what I need is”.
- A clarification policy that asks one structured follow-up question while still returning recommendations every turn.
- Multi-route BM25 retrieval over title, categories, features, details, description, and store.
- Reciprocal Rank Fusion and field-aware reranking with budget, rating, and review-count tie-break signals.
## Challenges we ran into The hardest challenge was intent override. A simple conversational search system may append every message to the query, causing conflicts such as “black running shoes” followed by “Actually, I want white casual sneakers.” We solved this by preserving the stable product category while clearing outdated preference slots and replacing them with the new constraint. Another challenge was distinguishing “I have no preference” from “I have no additional preference.” The first means the agent should move on to a new attribute; the second means the current attribute has no more information to reveal. Both cases should remain out of the product search query.
## Accomplishments that we're proud of On the unmodified official local evaluator and released 200 public development sessions, StateFuse achieved:
Metric Result ━━━━━━━━━━━━━━━━━ ━━━━━━━━━━ Hit@10 0.895 ───────────────── ────────── MRR 0.566438 ───────────────── ────────── MTTC 3.135 ───────────────── ────────── Technical Score 0.774731 The official weak BM25 baseline reports Hit@10 of 0.125 and MRR of 0.068034 on the same public set. We are also proud that the system is reproducible, fully offline, has zero token usage and zero model/API cost, and only returns legal product IDs from the frozen catalog.
These are public development-set results only. We do not use private evaluation data or attempt to reconstruct hidden target labels.
## What we learned We learned that conversational recommendation is not only a retrieval problem. High-quality recommendations depend on accurate state management, efficient clarification, and ranking products against the user’s current intent rather than the entire conversation history. We also learned how to build a lightweight but strong agentic retrieval system that runs locally on a normal laptop without relying on paid external services.
## What's next for E-Commerce AI Conversational Search Result Recommendation The next step is to strengthen semantic understanding while preserving reproducibility and offline reliability.We plan to:
- add lightweight dense retrieval and combine it with BM25;
- use a local cross-encoder reranker for the Top-100 candidates;
- choose clarification attributes with candidate-pool information gain instead of a fixed order;
- improve fine-grained negation and preference replacement;
- add explanation snippets so shoppers understand why a product was recommended.
The main current improvement opportunity is the Intent Override scenario, where correct state replacement matters most.
Built With
- agent
- ai
- artificial
- bm25
- conversational
- e-commerce
- fts
- information
- intelligence
- language
- learning
- machine
- natural
- processing
- python
- recommendation
- retrieval
- sqlite
- system

Log in or sign up for Devpost to join the conversation.