Project Story

Github link

Inspiration

We wanted to explore how conversational AI can make e-commerce search more natural and effective by asking useful follow-up questions instead of relying only on keyword searches.

What it does

棉羊 is a conversational shopping agent built for the TechJam challenge. It receives a customer message and preference profile, asks targeted clarification questions, tracks preferences and exclusions, and recommends products from a 50,000-item catalog. The goal is to identify the customer’s target product within 10 turns.

How we built it

We built an offline Python agent using only the standard library. It combines a provenance-aware conversation tracker with SQLite FTS5 for multi-route candidate generation. Candidates are reranked using constraint coverage, exclusions, price proximity, profile preferences, and catalog-valid fallbacks.

Challenges we ran into

We had to handle ambiguous requests, changing intent, exclusions, boundary cases, and limited conversation turns. A key challenge was deciding when to ask a question and when to return recommendations so that each turn meaningfully improves the search.

Accomplishments that we're proud of

On the released 200-session public set, our agent achieved a Hit Rate@10 of 0.91, an MRR of 0.616841, and an average first-hit time of 3.22 turns. It also runs offline without API keys or network access.

What we learned

Conversational product search requires more than matching text similarity. Maintaining structured constraints, recording question history, handling intent overrides, and combining retrieval with reranking are all important for finding the right product efficiently.

What's next for 棉羊

We plan to improve performance on unseen private sessions, strengthen handling of complex and changing preferences, refine candidate ranking, and make the agent’s questions and recommendations even more efficient.

Built With

Share this project:

Updates

Submission history