Inspiration
Online shopping often means translating a natural need into the right keywords, opening dozens of tabs, and repeatedly adjusting filters. We wanted shopping search to feel more like a conversation with a knowledgeable assistant—one that remembers preferences, understands changing intent, and explains what it needs next.
What it does
SALE Agent is a conversational product-discovery assistant that helps shoppers move from a broad idea to relevant recommendations. It remembers constraints across turns, distinguishes between browsing and buying intent, handles exclusions and “no preference” responses, asks clarifying questions when necessary, and adapts when the shopper changes direction.
Everything runs locally without external APIs, network access, or generative-model costs.
How we built it
We built SALE Agent as a deterministic, offline search pipeline:
- Conversation-state parsing accumulates preferences and constraints separately for each session.
- An explainable router identifies whether the shopper is browsing or ready to buy.
- Multiple BM25 retrieval routes search the catalog using the current message, conversation context, categories, constraints, and use cases.
- Weighted reciprocal-rank fusion combines these routes into a candidate pool.
- Structured matching evaluates hard requirements, soft preferences, exclusions, and profile signals.
- A guarded reranker improves ordering while preserving the strongest validated recommendations.
- A question policy selects an appropriate attribute to clarify when the candidate set is still too broad.
The implementation uses Python and SQLite FTS5 and requires no external model, vector database, credentials, or internet connection.
Challenges we ran into
The largest challenge was understanding conversational intent without relying on an LLM. Product language is noisy, attributes are inconsistently represented, and short replies such as “black,” “either,” or “not waterproof” only make sense in context.
We also had to distinguish between an attribute that does not match and one that is simply missing from the catalog. Another difficult case was intent override: when someone switches from running shoes to hiking boots, the agent must discard irrelevant constraints without forgetting compatible preferences.
Finally, improvements to ranking did not always improve retrieval. We introduced a guarded reranking strategy after discovering that stronger semantic scoring could accidentally remove useful candidates from the top results.
Accomplishments that we're proud of
SALE Agent is fully offline, deterministic, reproducible, and compatible with the challenge interface. It maintains isolated multi-turn state, handles explicit intent changes, prevents negated values from becoming positive search terms, and provides deterministic fallbacks if a pipeline component fails.
On the frozen 200-session public evaluation set, our final system achieved:
- 0.855 Hit Rate@10
- 0.495 MRR
- 4.745 mean turns to completion
- 0.701 technical score
Our guarded reranker preserved the baseline Hit Rate@10 while improving MRR from 0.471 to 0.495—placing better recommendations earlier without sacrificing candidate recall.
What we learned
We learned that reliable conversational search depends as much on state management and constraint semantics as it does on retrieval. Knowing when to forget information is just as important as remembering it.
We also learned to validate every “smarter” component through ablation testing. More complex logic does not automatically produce better recommendations, especially when catalog data is incomplete. Conservative, measurable improvements often outperform impressive but fragile ones.
Most importantly, explainability and reproducibility can be product strengths—not merely technical limitations.
What's next for SALE Agent
Next, we want to improve long-tail attribute understanding, category-specific size normalization, and semantic matching for unfamiliar paraphrases. We also plan to evolve the clarification policy from fixed priorities toward candidate-aware value-of-information scoring, so every question meaningfully narrows the remaining choices.
Longer term, we would explore a small, locally packaged neural reranker, richer recommendation explanations, and user feedback signals—while preserving SALE Agent’s privacy, offline operation, and deterministic fallback path.
Built With
- 0:43-python
- bm25
- natural-language-processing
- sqlite
- sqlite-fts5

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