Document
Document
2
Introduction
3
applications go beyond text data, marketing materials, and enhance
creating hyper-personalized experiences customer experiences. One of the most
with capabilities like advanced semantic creative uses is to understand the
search or user-prompted conversations. customer needs and preferences that
While implementing AI technology can change continually with season, trends
be risky, complex, and time consuming, and socio economic changes.
the potential for benefits like higher
profits, faster innovation, and lower costs Personalized recommendations and
are driving retailers toward an experiences for customers is a key
AI-powered future. benefit and prime use case for Retailers.
By analyzing customer data and
behavior, genAI can create personalized
The world’s most innovative retailers
product recommendations, customized
haven’t missed a beat in turning robust
marketing materials, and unique
operational data into the ingredients for
shopping experiences that are tailored to
powerful applications with the potential
individual preferences.
to transform the status quo. In this
paper, we will explore the top use cases
Back office use case for genAI is to
across the retail industry that are infused improve inventory management by
with MongoDB Atlas AI capabilities. predicting demand for products and
optimizing inventory levels accordingly.
Let's look closer at the use of generative This can help retailers to reduce waste
AI in retail. GenAI is creating unique and and optimize their supply chain, leading
personalized experiences for customers to cost savings and increased efficiency.
at one end of the spectrum, improving
value in customer touch points as well as Fraud detection is another important
improving back office inventory application of genAI in retail. By
management systems, and optimizing analyzing patterns in transaction data,
marketing campaigns. With the use of retailers can identify and help alert the
genAI, retailers can come up with new fraudulent activity that could be used in
products and offerings, define upsell protecting from financial losses.
strategies, create continually evolving
4
applications, MongoDB Atlas is an manage data of any structure. Unlike
indispensable component of your traditional tabular data models, and
technology stack. From inception to documents afford the flexibility to
deployment, MongoDB Atlas ensures that accommodate diverse data types and
your applications are grounded in application features, facilitating data
accurate operational data while meeting rationalization and utilization in ways
the demands of scalability, security, and previously unattainable.
performance expected by users.
Rapid Querying
MongoDB has already seen widespread
adoption for traditional AI use cases. Paired with the document model, the
Continental selected MongoDB for the MongoDB Query API provides developers
feature engineering platform in its Vision with a unified and consistent approach to
Zero autonomous driving initiative. Both data access & manipulation across
Bosch and Telefonica use MongoDB in various data services. From basic CRUD
their AI-enhanced IoT platforms. Kronos operations to complex analytics and
trades billions of dollars of stream processing, the MongoDB Query
cryptocurrency every day using ML API offers developers the flexibility to
models configured and built with data query and process data according to the
from MongoDB. Iguazio uses MongoDB application's requirements. In the realm
as the persistence layer for its data of Generative AI, this flexibility enables
science and MLOps platform, while developers to define additional filters on
H2O.ai and Featureform support vector-based queries, such as combining
MongoDB as feature stores in their metadata, aggregations, and geo-spatial
respective platforms. search, enriching the user experience and
expanding application capabilities.
MongoDB Atlas stands apart by offering
Flexible Data Model a comprehensive suite of query
At the heart of MongoDB Atlas lies its functionality within a single, unified
flexible document data model and experience. This eliminates the need for
developer-friendly query API. Together, developers to manually integrate query
they empower developers to accelerate results from multiple databases, reducing
innovation, gain a competitive edge, and complexity, errors, costs, and latency.
seize new market opportunities Moreover, it maintains a compact and
presented by generative AI. Documents, agile technology footprint, enabling
which align seamlessly with code objects, developers to focus on building end-user
offer an intuitive and adaptable way to functionality with greater ease and
efficiency.
5
Across the retail industry, companies are into a more usable structure and
often falling short on their ambitions to understanding the benefits of serverless
build data-driven operations as they functions and triggers, which can
struggle to perfect real-time analytics automatically respond to changes in
using real-time events data. data and execute predefined actions with
a dedicated server.
With MongoDB Atlas App Services, these
businesses are able to reinvent pricing
strategies to reflect real-time market
fluctuations, demand surges, or coverage
changes. It’s key to recognizing the
importance of transforming raw data
6
Figure 1. Data is transformed from unstructured internal sources to actionable, impactful insights.
Once data has been transformed into algorithm such as 'Hierarchical Navigable
vector embeddings, it is persisted and Small Worlds' (HNSW).
indexed in a vector store such as
MongoDB Atlas Vector Search. To retrieve
similar vectors, the store is queried with
an Approximate Nearest Neighbor (ANN)
algorithm to perform a K Nearest
Neighbor (KNN) search using an
7
data and behavior, Generative AI can organization. To ensure that the right
also create personalized product products in the right quantities are in the
recommendations, customized marketing right place at the right time, back office
materials, and unique shopping teams leveraged machine learning
experiences that are tailored to individual arithmetic algorithms for years.
preferences. As technology has advanced and the
barrier for entry is lowered for adopting
AI plays a critical role in decision making AI, retailers are moving towards
at retailer enterprises; product decisions data-driven decision making where AI is
such as design, pricing, demand leveraged in real time. Generative AI is
forecasting, and distribution strategies used to consolidate information and
require complex understanding of a vast provide dramatic insights that could be
array of information from across the immediately utilized across the
enterprise.
8
advanced analytical queries or triggering
The first step in truly understanding the an AI model in real time to give an
customer is to build a customer data answer that can be embedded into the
platform that combines data from search ranking in real time.
disparate systems and silos in the
organization: support, ecommerce Then comes the ability to easily update
transactions, in-store interactions, wish the search indexing to incorporate your
lists, reviews, and more. MongoDB’s AI augmentation. As MongoDB has
flexible document model allows for the Search built in, this whole flow can be
easy combination of data of different completed in one data platform- as your
types and formats with the ability to data is being augmented with AI results,
embed sub-documents to get a clear the search indexing will sync to match.
view of the customer in one place. As the
retailer captures more data points about MongoDB vector search brings the next
the customer, they can easily add fields generation of search capability. By using
without the need for downtime in schema LLMs to create vector embeddings for
change. each product and then turning on a
vector index, retailers can offer semantic
Then comes the ability to run analytics in search to their customers. AI will
real time rather than retroactively in calculate the complex similarities
another separate system. MongoDB’s between items in vector space and give
architecture allows for workload isolation, the customer a unique set of results
meaning the operational workload (the matched to their true desire.
customer's actions on the ecommerce
site) and the analytical or AI workload
(calculating what the next best offer
should be) can be run at the same time
without interrupting the other. Then using
MognoDB’s aggregation framework for
9
Figure 5. Architecture of an AI-enhanced search engine explaining the different MongoDB Atlas components
and Databricks notebooks and workflows used for data cleaning and preparation, product scoring, dynamic
pricing, and vector search
Figure 6. Architecture of a vector search solution showcasing how the data flows through the different
integrated components of MongoDB Atlas and Databricks
10
Personalized Marketing & Content Generation
The retailer must also understand in real The key in creating content that is
time what the impact of campaigns are personalized to the customer and the
so they can quickly redirect their brand is in leveraging the vast amount of
marketing spend and strategy to reflect data that retailers have in house to
what is working. In an industry where provide an LLM with context. In
marketing and branding budgets are MongoDB, the Apache Spark Connector
high and the opportunity to reach allows for model training of LLMs, so that
customers extremely valuable if done prompts such as “create a personalized
correctly, insight is key. newsletter for each customer suggesting
an item based on what is on offer and
11
their previous purchases” can use data, catalog, or new images and visuals,
images, tonal or language references to change streams can be used to trigger
create outreach. the vectorization of new data so that the
process becomes seamless. Keeping the
With the MongoDB platform approach, model training with your internal data
as new items are added to the product provides an invaluable resource to
retailers in reaching their audience easily.
Figure 7. Architecture showing how MongoDB can be used with a vector embedding model. Data in MongoDB
e.g. customer data will be fed into the model (via Spark or other connector), and the generated vector
embeddings will be added to each document in the collection. Then an Atlas Vector Search index can be
added to the collection in MongoDB for Vector Search to be activated. An event-based architecture in
MongoDB using Change Streams and Triggers can be set up so that vectors stay up to date and new
additions to the database are automatically vectorized.
12
Figure 8. Example of the data flow for an AI-generated personalized newsletter. The prompt is entered by a
user on the left hand side and context is added via the vectorised data in MongoDB- wishlist, loyalty data,
purchase history and customer behavior. Using RAG, the LLM can produce a personalized newsletter per
customer in seconds, allowing the retailer to create vast amounts of personalized content.
13
Generative AI can be used to enhance wrong predictions. Subsequently, feature
supply chain efficiency by accurately engineering to extract seasonality,
predicting demand for products, promotions impact and general
optimizing/coordinating with production economic indicators. A retrieval
schedules, and ensuring adequate augmented generation model can be
inventory levels in warehouses or incorporated to improve demand
distribution centers. Data requirements forecasting predictions and avoid
for such endeavors include historical hallucinations. The same datasets could
sales data, customer orders, and current be utilized from historical data to train
multichannel sales data and trends. This and fine-tune the model for improved
information can be integrated with accuracy. Such efforts lead to the
external datasets, such as weather following business benefits:
patterns and events that could impact
demand. This data must be consolidated ● Precision in demand forecasting
in an operational data layer that is ● Optimized product / Supply planning
cleansed for obvious reasons of avoiding ● Efficiency improvement
● Enhanced customer satisfaction
14
● Interpretability and explainability: Traditional ML models, such as deep neural
networks, may lack interpretability, making it challenging to understand and
explain their decisions.
● Long development cycles: Building ML models from scratch can lead to long
development cycles, delaying time-to-market for applications.
15
explainable to customers, regulators, and shareholders. Users should understand
how AI is adopted and used to make decisions and have access to explanations
for recommendations or actions taken by systems employing AI models.
● Privacy and data protection: Protecting customer data and privacy is one of the
MOST key activities that any enterprise must not ignore. By implementing robust
security measures and complying with relevant data protection laws and
regulations, enterprises not only save themselves from tremendous regulatory
oversight but also save themselves from reputational risk. Only collect and use
customer data with explicit consent and use it (document it) responsibly.
● Safety and reliability: Ensure that all systems and applications including those
using AI are safe and reliable. Implement safeguards to prevent
systems/applications from causing harm to customers or negatively impacting
their experience.
16
A Checklist for Responsible AI Adoption
Adopting the following responsible AI principles helps to ensure that AI used in the retail
industry is developed and used in an ethical and socially beneficial manner, fostering trust
and long-term relationships with customers. Any deviation, especially unintended, will
cause a major impact and run a reputational risk to the enterprise.
Now let’s look at a way to adopt the above-mentioned principles into enterprise software
development practices. Here's a checklist of items a retailer should put together prior to
engaging in adopting Generative AI into their application usage:
Business objectives: Clearly define the business objectives and use cases for
incorporating Generative AI into retail applications. Identify specific areas where
Generative AI can add value, such as personalized recommendations, product
design, or customer support.
Data privacy and compliance: Ensure compliance with data privacy regulations
and obtain necessary permissions from customers for data usage. Develop robust
data privacy and security measures to protect customer information.
Data quality: Assess the quality, accuracy, and completeness of the data. Clean
and preprocess the data to ensure it is suitable for training and generating reliable
insights.
Model selection: Research and choose the appropriate Generative AI model for the
specific use case. Consider factors like model size, performance, and compatibility
with your infrastructure.
Creating, communicating and following these best practices, retail enterprises can
optimize their implementation of genAI that aligns with business objectives, drives
meaningful outcomes (revenues), and enhances customer experiences. Implementing
17
genAI in a thoughtful and iterative manner empowers retailers to stay at the forefront of
AI-driven innovation in the dynamic retail landscape.
Conclusion
Across the retail industry, AI has captured the imaginations of executives and consumers
alike. Whether you’re a customer of a grocer, ecommerce site, or retail conglomerate, AI
has and will transform and enhance the way you do business with corporations. For the
retailers that matter most globally, AI has created opportunities to minimize risk and
fraud, perfect user experiences, and save companies from wasting labor and resources.
From creation to launch, MongoDB Atlas guarantees that AI applications are cemented in
accurate operational data and fulfill the demands of scalability, security, and
performance by developers and consumers alike.
To learn more about industry-specific solutions for AI developers, visit the MongoDB
Solutions Library to access reference architectures, product guides, and key tools for
building your next generative AI application. If you are ready to dive in even further with
our experts, schedule an Innovation Workshop with our team today.
Contact Information
18