Inspiration
Online shopping can feel less like finding what you want and more like endlessly scrolling through products. We wanted to build a shopping experience where users could describe what they are looking for in natural language instead of relying on rigid keywords and filters. This inspired us to create a conversational shopping agent that understands user preferences and helps them quickly discover relevant products.
What it does
Our agent uses conversational context and product retrieval techniques to recommend relevant products based on the user's preferences. It identifies important constraints such as product category, material, colour, style, and budget, while allowing users to refine or change their preferences throughout the conversation. The system combines BM25 retrieval, attribute filtering, Reciprocal Rank Fusion (RRF), ranking signals, and diversity mechanisms to improve both relevance and variety in its recommendations.
How we built it
We built the system around a specialised retrieval and ranking pipeline rather than relying on a single search method. Product information is indexed using weighted fields such as titles, categories, features, and descriptions. We then combine multiple retrieval routes and ranking signals to produce a final recommendation list. We also implemented conversation state tracking, preference extraction, synonym expansion, intent handling, and override detection so the agent can respond to changing user requirements without losing context.
Challenges we ran into
One of our biggest challenges was balancing natural-language understanding with precise product retrieval. We initially experimented with Gemini as an LLM layer to interpret user messages and convert them into structured shopping queries. However, our evaluations showed that adding the LLM did not consistently improve the overall retrieval performance. In fact, our specialised retrieval system achieved stronger results in several key metrics, so we ultimately removed Gemini from the final model and focused on improving our deterministic retrieval and ranking pipeline. We also had to handle ambiguous requests, changing preferences, and inconsistent product terminology.
Accomplishments that we're proud of
We are proud of building an agent that achieved a 99.5% Hit@10 rate across 200 evaluation scenarios, meaning that in nearly every test case, the relevant product appeared within the top 10 recommendations. The system also achieved an MRR of 0.865, showing that relevant products were not only retrieved, but were generally ranked near the top of the results.
We also improved conversation recovery speed (MTTC) to 2.805, demonstrating that Attune can recover from changing or ambiguous user requirements relatively quickly. Our scenario-level results were particularly encouraging: browsing achieved 100% Hit@10 with an MRR of 0.837, while buying achieved 98.75% Hit@10 and an MRR of 0.900, showing especially strong ranking quality when users have a concrete purchase intent. Boundary scenarios and intent overrides both achieved 100% Hit@10, demonstrating that the system remains robust when users change or clarify their requirements. Beyond retrieval quality, Attune achieved an efficiency score of 0.8195 and a technical score of 0.921, showing that the improvements were not simply about maximising relevance at the expense of system efficiency. These results reinforce what we learned during development: a carefully designed retrieval and ranking pipeline can achieve strong performance while remaining fast, deterministic, and grounded in the catalogue.
Overall, we are especially proud that we were able to improve the system from our earlier versions while simultaneously improving ranking quality and conversation recovery. More than the individual numbers, these evaluations gave us confidence that Attune works reliably across different types of real-world shopping conversations.
What we learned
Our biggest lesson was that more sophisticated AI is not always better AI. An LLM can improve language understanding, but that does not necessarily translate into better product retrieval. We learned that giving each component a focused role and grounding recommendations directly in the product catalogue can produce more reliable results. Metrics such as Hit@10, MRR, and MTTC were especially important in helping us identify what actually improved the agent.
What's next for Attune
Our next step is to make Attune even better at understanding complex and conversational shopping preferences while keeping recommendations fast and grounded in the catalogue. We want to further improve intent detection, preference handling, and ranking so that users can spend less time searching and more time finding products they actually want.
Built With
- collections
- json
- math
- os
- pathlib
- re
- statistics
Log in or sign up for Devpost to join the conversation.