Video demo

Github Repo

Inspiration

Traditional e-commerce search relies on rigid keyword matching, failing to capture shifting shopper psychology—from open-ended browsing to mid-conversation reversals ("actually, make that sneakers instead"). Meanwhile, standard LLM shopping bots suffer from high latency, steep API bills, hallucinations, and slow convergence.

We built ShopScout to prove a conversational shopping agent can achieve high-precision product discovery with 100% deterministic, offline-first execution at $0 default cost (0 tokens), keeping LLMs strictly as an optional, safety-gated fallback.


What it does

ShopScout navigates a 50,000-product Amazon catalog across four real-world customer scenarios: Buying (high-intent), Browsing (exploratory), Intent Override (preference changes), and Boundary (no-preference/edge cases).

  • Dynamic Dual-Track Routing: Estimates an evidence-based focus score in real time to smoothly balance high-precision constraint matching against diverse candidate discovery.
  • Atomic State & Override Tracking: Parses dialogue into granular operations (add, replace, exclude, set_any) so preference reversals retire old constraints without corrupting untouched attributes (like size or budget).
  • Adaptive Clarification Policy: Uses attribute entropy and historical answerability priors to ask clarifying questions only when they meaningfully partition the remaining candidate pool.
  • Benchmark Performance: Reaches a 0.871 TechnicalScore and 0.668 MRR (vs. 0.107 and 0.068 baseline), cutting Mean Turns to Conversion to 2.34 turns (down from 9.81) at $0 / 0 token cost.

How we built it

  • 6-Route Heterogeneous Retrieval: Combines multi-field FTS5, exact title matching, category search, category popularity, rarest constraint tokens, and gated structural bucket ranking.
  • Weighted RRF & Multi-Signal Reranking: Merges candidate routes using dynamic focus-weighted Reciprocal Rank Fusion, then reranks on IDF term coverage, exact phrases, profile alignment, log popularity, and price budget signals.
  • Safety-Gated Architecture: Combines an atomic StateReducer, an information-theoretic QuestionPolicy, and an optional OpenAI Responses adapter strictly bounded to structured hypothesis proposals with local schema verification.

Challenges we ran into

  • Intent Overrides Without Context Loss: Natural reversals like "Actually, make that navy instead, under $50" often wipe prior state or blend contradictory constraints. We built an atomic delta reducer that surgically mutates target slots while preserving unaffected attributes.
  • Popularity Rank Collapse: Ungated category popularity caused generic best-sellers to drown out niche, high-relevance products. We introduced evidence gating, requiring verified positive preference evidence before structural popularity joins fusion.
  • Sparse Metadata & Latency: Incomplete catalog tags made strict boolean filtering brittle, and remote LLM calls introduced latency spikes. We treated missing attributes as neutral evidence and moved the entire core pipeline offline into SQLite FTS5.

Accomplishments that we're proud of

  • Rapid Convergence & High Precision: Cut conversational turns to conversion by 76% (2.34 MTTC vs. 9.81 baseline) with 0.668 MRR and 0.995 Hit Rate@10 across 200 public evaluation sessions.
  • Zero Cost & Sub-30ms Latency: Engineered a 100% Python standard library + SQLite FTS5 pipeline that runs in ~27ms per turn with $0 default API spend.
  • Interactive Full-Stack Console: Built an end-to-end Streamlit web application (app.py) for live multi-turn dialogues, product inspection, and real-time state debugging.

What we learned

  • Deterministic Information Retrieval is Powerful: A tailored lexical/structural ensemble (FTS5 + dynamic RRF + multi-signal reranker) delivers greater speed, reliability, and precision for structured e-commerce catalogs than unconstrained LLM pipelines.
  • State as an Operations Stream: Modeling conversation history as an immutable stream of delta operations on a state machine prevents the hallucination and context drift common in transcript-based prompts.
  • Value-Gated Clarifications: Asking questions without estimating attribute entropy increases cognitive load; clarifications must be quantitatively justified by their ability to partition candidates.

What's next for ShopScout

  • On-Device Quantized Embeddings: Integrate a lightweight local ONNX bi-encoder (e.g., MiniLM) for semantic retrieval on metaphorical or subjective queries without external APIs.
  • Multi-Modal Visual Search: Accept customer photo uploads for joint image-text similarity search against visual product embeddings.
  • Cross-Category Basket Recommendations: Extend the state tracker from single-product search to multi-item cart building (e.g., matching outfits across categories).

Built With

Share this project:

Updates

Submission history