Company
Picnic
Title
Enhancing E-commerce Search with LLM-Powered Semantic Retrieval
Industry
E-commerce
Year
2024
Summary (short)
Picnic, an e-commerce grocery delivery company, implemented LLM-enhanced search retrieval to improve product and recipe discovery across multiple languages and regions. They used GPT-3.5-turbo for prompt-based product description generation and OpenAI's text-embedding-3-small model for embedding generation, combined with OpenSearch for efficient retrieval. The system employs precomputation and caching strategies to maintain low latency while serving millions of customers across different countries.

LLM-Enhanced Search Retrieval at Picnic

Company Overview and Challenge

Picnic is a grocery delivery e-commerce platform operating across the Netherlands, Germany, and France. They face the unique challenge of presenting tens of thousands of products effectively through a mobile interface while serving customers across multiple languages and culinary preferences. Their search system needs to handle millions of different search terms while accommodating various user behaviors, including typos, spelling variations, and cross-language queries.

Technical Implementation

LLM Selection and Architecture

  • Chose GPT-3.5-turbo over GPT-4-turbo due to comparable performance with faster response times
  • Utilized OpenAI's text-embedding-3-small model for embedding generation
  • Implemented OpenSearch as the primary search infrastructure

Performance Optimization Strategies

  • Implemented extensive precomputation of embeddings
  • Deployed robust caching mechanisms throughout the system
  • Focused on maintaining millisecond-level latency

Pipeline Components

  • Prompt-based product description generation
  • Embedding generation and matching
  • Quality Assurance

Testing and Deployment Strategy

Offline Optimization

  • Initial parameter tuning and configuration testing
  • Experimentation with:
  • Used historical search data for preliminary validation
  • Acknowledged limitations of offline evaluation due to imperfect ground truth

Online Testing

  • Implemented comprehensive A/B testing
  • Gradual feature rollout to controlled user groups
  • Continuous collection of user interaction data
  • Iterative optimization based on real-world usage
  • Careful monitoring of system performance and stability

Scaling Considerations

  • Systematic approach to scaling successful features
  • Continuous monitoring of system load and performance
  • Ongoing optimization based on increased user interaction data
  • Focus on maintaining system stability during scaling

Infrastructure and Reliability

System Architecture

  • OpenSearch deployment for distributed search capabilities
  • Robust caching infrastructure
  • Redundancy and failover mechanisms
  • 24/7 service uptime maintenance

Dependency Management

  • Careful handling of third-party dependencies
  • Strategic use of caching to minimize external service reliance
  • Focus on system reliability and availability

Monitoring and Evaluation

Performance Metrics

  • Conversion rates tracking
  • Click-through rate analysis
  • Customer satisfaction monitoring
  • Response time measurements
  • System stability metrics

Continuous Improvement

  • Regular performance reviews
  • Iterative enhancement of search algorithms
  • Ongoing prompt optimization
  • Regular model performance evaluation

Future Directions

Planned Enhancements

  • Exploration of hybrid approaches combining literal and LLM-based search
  • Investigation of more sophisticated ranking mechanisms
  • Integration of recipes and articles in search results
  • Further personalization of search results

Scalability Considerations

  • Designed for future growth
  • Flexible architecture to accommodate new features
  • Emphasis on maintaining performance at scale

Implementation Results

The system successfully handles millions of search queries across multiple languages while maintaining fast response times. The combination of LLM-powered semantic understanding with efficient precomputation and caching strategies has enabled Picnic to provide improved search accuracy without sacrificing performance. The system effectively handles multilingual queries, typos, and various user intents while maintaining the speed and reliability required for e-commerce applications.

Start your new ML Project today with ZenML Pro

Join 1,000s of members already deploying models with ZenML.