ShopSense — TikTok TechJam

ShopSense is our TikTok TechJam conversational shopping copilot, built by Team TikTechToe.

It addresses the challenge by building a multi-turn shopping agent that helps a user find a hidden target product from a frozen 50,000-product e-commerce catalog. The agent:

  • Asks useful follow-up questions
  • Tracks the user's preferences across turns
  • Handles "no preference" answers
  • Handles changes in user intent
  • Returns a ranked Top 10 list of product recommendations using valid parent_asin IDs

Technical Approach

Our solution works through the official backend entry point, starter.agent.Agent.

The evaluator:

  1. Calls reset(session_id, user_profile) once at the start of each session.
  2. Calls respond(session_id, user_message, turn, top_k) for up to 10 turns.

Each response contains:

  • A natural-language message
  • A structured ask_attribute
  • A ranked list of recommendations containing valid parent_asin values

Scoring Formula

The technical score is calculated as:

$$ \text{TechnicalScore} = 0.50 \times \text{HitRate@10}

  • 0.30 \times \text{MRR}
  • 0.20 \times \text{Efficiency} $$

where:

$$ \text{Efficiency} = \text{clip}\left(\frac{11 - \text{MTTC}}{10}, 0, 1\right) $$

Team Contributions

We built ShopSense by splitting the project into three main areas:

Shayna

  • Preference extraction
  • Dialogue state
  • Conversation memory
  • Follow-up question strategy

Leon

  • Offline catalog retrieval
  • Candidate filtering
  • Ranking
  • Validation

Rhea

  • Integration
  • Release management
  • Official Agent contract compliance
  • Evaluator verification
  • README and documentation
  • Demo packaging

Development Tools

We used the following tools throughout development:

  • VSCode — local code editing
  • GitHub — source control and public repository hosting
  • GitHub Desktop — branch management and pull requests
  • Terminal — running tests and the evaluator
  • Codex — integration support, release checks, documentation, and demo preparation

No external runtime APIs are required.

The final submitted agent:

  • Runs offline
  • Runs deterministically
  • Does not require OpenAI, Google, TikTok, or any paid external API key during evaluation
  • Has a runtime model/API cost of $0
  • Uses 0/0 prompt/completion tokens

Libraries and Frameworks

The final runtime system uses:

  • Python standard library — official agent implementation
  • sqlite3 — offline catalog search support
  • unittest — automated testing
  • http.server — optional local demo UI
  • HTML, CSS, and JavaScript — optional frontend demo

No Hugging Face, PyTorch, scikit-learn, pandas, or external ML framework is required for the final runtime system.

Datasets and Assets

The project uses:

  • The official frozen 50,000-product Clothing, Shoes, and Jewelry catalog derived from Amazon Reviews 2023
  • The official 200-session public development set provided by the challenge organizers

Organizer-held private evaluation sessions were not included or accessed.

The demo bundles no third-party:

  • Images
  • Logos
  • Music
  • Video
  • Font files

The interface is team-authored.

Textual product metadata shown in the demo comes from the official challenge catalog and may contain names or marks belonging to their respective owners.

Evaluation Results

On the public evaluator, ShopSense achieved:

Metric Result
Hit Rate@10 0.98
MRR 0.690403
MTTC 2.96
TechnicalScore 0.857921

Runtime Performance

Measurement Result
Initialization 9.66 seconds
Response p50 110.94 ms
Response p95 314.99 ms
Response max 498.60 ms
Evaluator wall time 78.29 seconds
Whole-process peak working set 608.77 MiB

What We Learned

During this hackathon, we learned how important integration and reproducibility are when building an AI system as a team.

It was not enough to only build a ranking model or a conversation module. Everything had to work through the official Agent interface, follow the required response format, and run correctly with the evaluator.

One major challenge was making the agent handle multi-turn conversations instead of treating each interaction as a single search query.

Another challenge was working with a large 50,000-product catalog while keeping the solution:

  • Offline
  • Deterministic
  • Reproducible
  • Independent of paid APIs

We also learned that release management matters. We had to:

  • Clean up duplicate files
  • Avoid committing the large catalog file
  • Verify SHA256 checksums
  • Run tests
  • Document setup steps
  • Ensure the README matched the actual submission

These steps were just as important as building the core system because they ensured that our final submission could be reliably evaluated.

Future Improvements

Given more time, we would improve ShopSense by adding:

  • Semantic retrieval for better product matching
  • Richer recommendation explanations
  • Broader synonym handling
  • More validation and ranking tuning

Overall, ShopSense taught us that building an effective AI system is not just about creating individual components. It is about making retrieval, conversation, ranking, integration, testing, and release management work together as one reliable system.

Built With

  • and
  • html/css/javascript
  • python-standard-library-for-the-backend-agent
  • sqlite3-for-offline-catalog-search
  • unittest-for-testing
+ 5 more
Share this project:

Updates

Submission history