Inspiration

Shopping requests are often incomplete at first and can change over several turns. The project addresses the TechJam objective of finding a hidden target product early and ranking it highly, while preserving the customer's current intent as the conversation evolves.

How it works

The integrated pipeline is:

Catalog -> ParsedUpdate -> SearchContext -> Candidate Pool -> Ranked Top 10

The official entrypoint in starter/agent.py keeps session-scoped memory, converts the current state into a structured SearchContext, and retrieves a candidate pool from the canonical read-only ProductStore. Candidate retrieval combines SQLite FTS5/BM25 lexical multi-query search with exact structured-attribute and price retrieval. An optional offline dense route is supported when a prebuilt local model and vector asset are provided.

The reranking stack deduplicates candidates, preserves evidence from multiple retrieval routes, scores hard constraints, soft preferences, typed exclusions, and price bounds, and returns a deterministic Top 10 ordered by final score and product ID. Clarifications are driven by the active memory state. Candidates seen earlier in the same task remain eligible after clarification, but stale retrieval scores are not reused after the state changes.

What we learned

Retrieval recall, conversation state, and final ranking have to be evaluated together. The implementation includes explicit intent and attribute updates, same-task preference overrides, unknown-versus-mismatch handling for missing product metadata, valid and unique catalog IDs, and regression coverage for retrieval, understanding, memory, exclusions, and override behavior. Runtime logic does not use evaluation labels or hidden target information.

Results

On the current main branch, the local public-set evaluator reports HitRate@10 = 0.95, MRR = 0.649167, MTTC = 2.785, and a recommended technical score of 0.83405. The repository includes setup instructions, the evaluator contract, tests, and reproducible commands.

Challenges and limitations

The main challenges were preserving useful context across turns, handling explicit overrides without discarding unrelated constraints, and combining scores whose directions and scales differ across retrieval routes. The default setup is dependency-free apart from Python and SQLite FTS5; dense retrieval is optional and no model is downloaded automatically.

Built With

Share this project:

Updates

Submission history