This article introduces the Two-Stage AI-Enhanced Retail Search powered by Azure AI Search and Azure OpenAI services. It addresses the limitations of traditional keyword-based search engines by offering a dynamic, contextually aware, and highly personalized search experience. The solution aims to transform customer experience for retailers and e-commerce giants by understanding context, intent, and personal preferences
This article was written by the AI GBB Team: Samer El Housseini, Setu Chokshi, Aastha Madaan, and Ali Soliman.
If you've ever struggled with a retailer's website search—typing in something simple like "snow boots" and getting random results, e.g. garden hoses—you're not alone. Traditional search engines often miss the mark because they're stuck in an outdated world of keyword matching. Modern shoppers want more. They want searches that understand context, intent, and personal preferences. Enter the game-changer: Two-Stage AI-Enhanced Search, powered by Azure AI Search and Azure OpenAI services.
What's the Big Idea?
Several retailers and e-commerce giants in the UK and Australia are already looking to transform customer experience using AI-enabled cutting-edge solutions. Customers often wish to search for products that they may want to give as a gift, something nice to wear for an occasion, something that is of daily use or solves a problem. This mandates a search system that can understand customer’s intention and provide them with relevant results without the customers having to spend several hours browsing through 1000s.
In addition, a lot of retailers, fashion and e-commerce giants want to enhance the search experience for their customers through a hyper-personalized search experience based on their purchasing behavior, preferences and personal style. For example, if a customer types in a search phrase - “find a gift for my sister who loves hiking under 100$”, the search should return hiking gear, accessories based on the customers budget, brand preference and season.
For the search systems to return top results for users search phrase need improve the relevancy of the search results which is complex task. For this we need to discover all possible product searches customer wants to perform and map them to product categories available in the product catalogue and recommend the most relevant products.
Our solution builds on these two stages discovery, query expansion and recommendation to understand customers’ search context and enhance the search relevancy by using advanced reasoning models. For example, if a customer types in “It snowed today", “the system will intelligently expand search terms such as “winter gear in neutral shades”, or “hand warmer for cold weather", then searches the product categories such as, jackets, thermal leggings to recommend.
How Does the Two-Stage AI Work?
Stage 1: Discovery & Query Expansion
The first step tackles the vague or lifestyle queries users often input:
- Contextual Query Expansion: When a customer says, "It snowed today," the AI doesn't merely match the keyword "snow." It understands potential purchase intent, offering winter apparel or practical cold-weather gear. The queries take into account the purchaser’s buying behavior inferred from their customer profile. For example, if the user shows a high-purchasing power through their purchasing history, then the system will show them premium and luxury items.
- Automatic Filtering & Categorization: The solution identifies product categories like "Cold Weather Coats" or "Automotive" and applies relevant filters such as price, brand, or past purchasing patterns.
This ensures comprehensive coverage of products that match the user's real intent, transforming general queries into highly precise recommendations.
Stage 2: Intelligent Personalization & Recommendation
Once Stage 1 generates an initial list of potential products that comprehensively addresses the user’s query across product categories, Stage 2 refines it:
- Personalized Ranking: Leveraging user profiles, purchase histories, and brand affinities, the AI ranks and re-ranks products to match personal preferences.
- Contextual Storytelling: The system doesn't stop at listing items. It provides a compelling story or justification—like highlighting how a coat pairs perfectly with previously purchased boots or why a certain scarf is ideal for snowy conditions.
- Cross-selling & Upselling: By thoughtfully combining related products, the AI encourages users to add complementary items to their carts, boosting basket size and completion rates.
Why the Old Ways Aren't Enough Anymore
Traditional methods have significant drawbacks:
- Pure keyword matching leads to irrelevant results.
- The lack of personalization produces results that are generic, missing individual customer needs.
The Two-Stage AI approach demolishes these barriers by offering a dynamic, contextually aware, and highly personalized search experience.
Inside the Two-Stage System
Deep Dive into Phase 1
- Phase 1 (Discovery) uses hybrid semantic search and structured filters to generate broad yet targeted product sets.
- Expands vague queries into precise, contextually relevant search terms and categories.
- Uses search engine filters to dynamically manage product categories selection, ensuring maximum relevance.
Deep Dive into Phase 2
- Phase 2 (Recommendation) applies advanced personalization and re-ranking algorithms, crafting tailored recommendations.
- Refines the discovery set using detailed customer profiles.
- Reorders products and creates engaging narratives explaining product suitability.
Real-World Business Benefits & Impact
Retailers can expect significant business advantages:
- Higher Conversion Rates: Personalized results boost conversions by 30–50%.
- Increased Average Order Value: Intelligent product combinations naturally encourage larger purchases.
- Reduced Search Abandonment: Accurate context interpretation means customers find what they want faster, reducing frustration and bounce rates.
- Enhanced Customer Loyalty: Personalized shopping experiences foster repeat visits and brand affinity.
- Competitive Edge: Advanced AI capabilities clearly set businesses apart in the fiercely competitive retail landscape.
- Enhanced Fashion Relevancy: The retailers can provide hyper personalized recommendations to their customers
Easy Integration and ROI Measurement
Thanks to Azure AI Search and Azure OpenAI, implementation is straightforward. The solution easily integrates with existing e-commerce platforms, and comprehensive analytics make measuring KPIs (like conversion rates, average order values, and abandonment rates) simple. Continuous optimization is built right into the model, ensuring ongoing improvements.
Check out the technical details and get started on GitHub: retail-search-with-ai GitHub Repository
The Smart Shopping Assistant transforms online shopping by tailoring product recommendations to your unique preferences and shopping style. The platform adapts its search results and product rankings based on your selected shopping persona, ensuring you discover products that truly align with the priorities. To do that we created four distinct shopping personas that represent different consumer priorities:
- Luxury Diva: Prioritizes premium brands and high-quality products.
- Smart Saver: Focuses on value and finding the best deals.
- Tech Maven: Favors innovation and the latest technologies.
- Eco Warrior: Emphasizes sustainable and environmentally friendly options.
This approach eliminates hours of product comparison by instantly identifying items that match the user specific preferences. The transparent reasoning ensures you understand exactly why certain products are recommended, giving you confidence in your purchasing decisions while maintaining complete control over your shopping. This can augment the experience to not only augment existing reasoning but also transform the website based on their previous shopping or purchasing preferences.
Standard Product Search
The platform provides a conventional search experience where you can enter keywords (such as "headphones") to find relevant products. In standard mode, results are displayed based on traditional ranking factors without personalization.
AI-Powered Personalization
When you enable AI Reasoning mode via the toggle switch, the system activates its advanced recommendation engine. This feature:
- Dynamically reranks products based on your selected persona's preferences’
- Displays match percentage scores on each product card, indicating compatibility with the user profile.
- Shows ranking changes through visual indicators, allowing you to see how products move up or down in relevance.
Transparent Recommendation Logic
Unlike typical "black box" recommendation systems, we wanted to show how the recommendations was made and we thought about transparency into why certain products are recommended:
- Product cards can be flipped to reveal detailed reasoning behind each recommendation.
- The system displays feature-by-feature analysis of how each product attribute was evaluated.
- Quality, brand recognition, price sensitivity, and other factors are scored based on your persona's preference weights.
Evaluations
The below results benchmark the AI models against pure hybrid search (keyword + semantic) which we call the “baseline”. The methodology we used is to provide a set of 60 queries to each model and then benchmark the performance versus the baseline. All models have performed significantly better versus pure hybrid search. Interestingly, the reasoning models have produced performance results in the same range as one-shot models like GPT-4o and GPT-45.
A Note on System Latency
This solution is not considered “real-time” by today’s e-commerce search standards. The 2-stage search solution will take anywhere between 15 seconds up to 70 seconds depending on the LLM model used. This means that this should be marketed to end users as a separate “intelligent tool” that will take more time but will eventually produce much more targeted results. The UI should indicate and prepare the end users for this, including managing the expectations that the “wait is very much worth it”.
Roadmap
The roadmap for this solution will include the following features – which we will be experimenting with:
- Building and loading a search index with generic products for demonstrations
- Enhancement to the 2-stage solution process by adding a third stage that will further reason over the entire product search result set, going deeper into product features and past customer search and purchasing history. The aim here for the third stage is to maximize relevancy of proposed products to the customer preferences and expectations
- Introduce a feedback loop from the end of the second stage (or third stage if implemented) that feeds back into the input of the first stage. The objective for closing this loop is to refine the generated search terms and product categories filters, therefore leading to more targeted product results that trickle down the solution 2-stage (or 3-stage) pipeline.
Wrapping It Up
The future of retail search is intelligent, personalized, and context-aware. With Two-Stage AI-Enhanced Search, businesses can significantly improve customer satisfaction, boost sales, and build lasting brand loyalty.
Ready to move beyond outdated search methods and embrace AI-driven retail innovation? Explore our GitHub Repo, watch the demo, and transform your customer journeys from uncertainty to satisfaction!
Want to Learn More?
- Implementation Details: GitHub Repo
- Contact: Reach out to our Strategic X-Pod—we're excited to help you elevate your retail game!