Build agents that predict needs, manage risks, and forecast with KumoRFM MCP Server.

Learn More
News/ Collaboration /

Smart Grocer: From Empty Fridge to Full Cart - Building a Predictive Grocer with KumoRFM

October 1, 2025
Alessandra Breschi

Alessandra Breschi

Written by Alessandra Breschi, Data Scientist at Verily

In this technical blog post, Alessandra describes how she built Smart Grocer during our KumoRFM August hackathon in San Francisco.

Her article shows how KumoRFM enabled her to transform relational shopping data into a predictive engine that can forecast entire grocery baskets, streamline the shopping experience, and highlight the power of combining predictive and generative AI.

Introduction

Our project answers a simple question: "Can we accurately predict a user's next complete grocery basket based on their historical, relational shopping data?"

Weekly grocery shopping is a universal, time-consuming chore filled with repetitive scrolling and forgotten items. We introduce Smart Grocer, an AI-powered application that transforms this routine into an effortless, personalized task. By leveraging KumoRFM, our app predicts a user's entire shopping cart before they even begin, saving time and reducing mental load.

The online grocery market has grown exponentially, yet the user experience often remains a tedious digital replica of walking through physical aisles. Users repeatedly search for the same items, struggle with meal planning, and spend valuable time building a cart from scratch every week. This is a high-frequency problem space where small improvements in efficiency can lead to significant gains in customer satisfaction and loyalty.

This work benefits two main groups:

  • End-Users: Shoppers who want a faster, more intuitive, and helpful way to manage their weekly groceries.
  • Businesses: Grocers who want to increase customer loyalty, raise the average basket size, and create a stickier, more differentiated digital experience.

Our Approach with KumoRFM

We vibe coded a prototype app using Replit to show the potential of KumoRFM to enhance grocery shopping experience. The system is composed of three main parts:

  1. A Predictive Engine (KumoRFM): KumoRFM is used to power every aspect of online grocery shopping.
  2. A Generative AI Feature (LLM): For our "Inspire Me" feature, we call a Large Language Model to generate recipes based on the current contents of the user's cart.
  3. A Front-End Application: A clean, interactive React web app built and deployed on Replit. It communicates with our predictive and generative backends via secure serverless functions.

Experiments & Results

Datasets Used

To simulate a realistic environment for the hackathon, we generated a synthetic dataset using a Python script. The dataset consists of:

  • 100 Users: With varied household sizes and dietary preferences.
  • ~800 Products: A diverse catalog generated by an LLM to ensure realistic item names, brands, and categories, such as produce, dairy, bakery.
  • 2,000 Orders: Spanning two years, with logical purchasing affinities (e.g., users who buy pasta also buy sauce). This yielded a total of almost 30,000 ordered items.

How We Used KumoRFM

KumoRFM is the predictive engine that powers every "smart" feature in the application. We implemented a suite of interconnected models to create a seamless user journey from start to finish:

  • Next Basket Prediction This is the core prediction that populates the user's initial cart. KumoRFM analyzes a user's entire order history to predict the set of products they are most likely to purchase.
  • Purchase Quantity Prediction For each item in the predictive cart, KumoRFM predicts the required quantity.
  • Real-Time Recommendations As the user shops, KumoRFM powers a sidebar that suggests complementary items. The recommendations are context-aware, updating in real-time based on what's currently in the cart.
  • Substitution Ranking If an item is unavailable, KumoRFM predicts and ranks the best alternatives. This model considers product attributes and the user's brand affinities to find the most suitable replacement.
  • Preferred Brand & Size Prediction When a new item type is added from a suggested recipe, KumoRFM predicts the user’s preferred brand and size. This removes the friction of having to search through multiple product variations.
  • Delivery Method Prediction At checkout, the model predicts whether the user will prefer home delivery or in-store pickup. This choice is pre-selected to streamline the final step.
  • Delivery Time Prediction Finally, KumoRFM predicts the user's most likely preferred time window for their order. This is based on their historical order times and their primary shopping day.

Applications & Impact

While our demo focused on the initial cart creation, the underlying engine has broad real-world applications for any e-commerce platform:

  • In-App Recommendations: Powering a "You might also need..." sidebar that updates in real-time.
  • Personalized Marketing: Sending automated emails or push notifications like, "Hi Sarah, looks like you might be running low on milk and eggs."
  • Inventory Forecasting: Aggregating predictions across all users to help grocers predict demand for specific items.

Lessons Learned

  • What worked well: The power of relational data was immediately evident. KumoRFM's ability to natively understand the connections between users, products, and orders was key to the model's accuracy. Using a serverless architecture with Replit allowed for incredibly fast prototyping.
  • What was challenging: Simulating a dataset with believable, long-term user behavior was a significant but crucial upfront challenge. Crafting the right logical rules for purchasing affinity was a project in itself.
  • What surprised you: The "Inspire Me" feature, initially a stretch goal, proved to be a surprisingly powerful engagement driver. It highlighted the immense value of combining predictive AI with generative AI.

Conclusion / Key Takeaways

Smart Grocer demonstrates that by leveraging predictive AI on relational data, we can transform routine chores into delightful, time-saving, and deeply personal experiences. The key takeaway is that the most powerful AI applications don't just provide answers; they anticipate our needs.