AnnouncementIntroducing MongoDB 8.0, the fastest MongoDB ever! Read more >
NEWSLearn why MongoDB was named a leader in the 2024 Gartner® Magic Quadrant™ Read the blog >
AnnouncementIntroducing Search Demo Builder, the newest addition to the Atlas Search Playground Learn more >

SOLUTIONS

Predictive Maintenance Excellence with MongoDB Atlas

Transform equipment maintenance with AI-powered analytics that help predict failures, generate repair plans, and reduce downtime.
Start FreeView the demo
An image of an AI digital data processing
Solution Overview

MongoDB Atlas powers an end-to-end predictive maintenance solution that helps manufacturers prevent equipment failures and optimize maintenance operations through four strategic stages:

  1. Machine prioritization and criticality analysis
    • Addresses the question: "Which machine should I prioritize for predictive maintenance and why?"
    • Uses machine learning and RAG-based analysis to prioritize critical equipment
    • Leverages historical data and expert knowledge to make informed decisions
  2. Failure prediction
  3. Maintenance plan generation
    • Focuses on: "How should I schedule the repair procedure?"
    • Automatically generates detailed repair plans using large language models
    • Combines maintenance manuals, inventory data, and resource information
  4. Maintenance guidance generation
    • Addresses: "How do I get better guidance on fixing machines?"
    • Provides enhanced maintenance guidance by integrating service notes and repair instructions
    • Delivers instructions directly to technicians' mobile devices through Change Streams
Four stages of predictive maintenance workflow
Figure 1: Four stages of predictive maintenance workflow
This is an image

Reference Architectures
1. Machine prioritization architecture

This architecture leverages RAG (retrieval-augmented generation) to determine which machines require predictive maintenance. The system processes two types of input data:

  • Structured data: Production parameters and machine breakdown frequency
  • Unstructured data: Institutional knowledge in documents

The workflow aggregates and operationalizes both data types as vector embeddings in MongoDB Atlas. Using Vector Search, it performs semantic search to provide relevant context to an LLM (via AWS Bedrock or Cohere in this case), which generates contextual responses to prioritization queries. This helps maintenance teams make data-driven decisions about which machines need attention first.

AI system diagram for machine prioritization recommendations
Figure 2: AI system diagram for machine prioritization recommendations
2. Sensor data processing architecture

This real-time architecture processes machine sensor data through six key stages:

  1. Data collection: A prioritized milling machine with DAQ (data acquisition) captures critical metrics (product type, temperature, speed, torque, tool wear)
  2. Stream processing: Real-time transformation of raw sensor data
  3. Data storage: Centralized storage in MongoDB Atlas with single view capability
  4. Change detection: Monitoring for significant data changes
  5. ML inference: Running trained models to predict potential failures
  6. Dual output: Visualization through Atlas Charts and mobile notifications via Change Streams
Real-time sensor monitoring with MongoDB Atlas
Figure 3: Real-time sensor monitoring with MongoDB Atlas
3. Work order generation architecture

This architecture automates maintenance work order creation through:

  1. Document processing: Machine manuals and old work orders are chunked and converted to vectors using AWS/Cohere embedding models
  2. Vector storage: Embeddings stored in MongoDB Atlas
  3. Work order generation: A specialized app that:
    • Uses LLMs to generate appropriate work order templates
    • Pulls inventory and resource information through aggregation
    • Creates detailed repair plans based on machine documentation
 AI-powered work order generation system diagram
Figure 4: AI-powered work order generation system diagram
4. Maintenance guidance architecture

This architecture enhances operator instructions through a RAG approach:

  1. Service note processing: Converts multilingual PDF service notes to text
  2. Translation: Processes non-English content (Spanish in this case) through translation models
  3. Instruction generation: Combines translated service notes with original repair plans using LLMs
  4. Delivery: Provides updated maintenance instructions to technicians through a mobile app
RAG workflow enhances technician repair instructions
Figure 5: RAG workflow enhances technician repair instructions

Each architecture integrates with MongoDB Atlas core capabilities while leveraging external services (AWS Bedrock, OpenAI, Cohere) for AI/ML functionality, creating a comprehensive predictive maintenance solution.

Building the Solution

1. Set up MongoDB Atlas environment

a. Configure cluster, database and collections for machine failures, sensor data (raw and transformed), ML models, maintenance history, and repair documentation

b. Set up MongoDB Atlas Search and Vector search indexes for repair manuals and maintenance history

c.

d. Configure Stream Processing for real-time data transformation

e. Create Atlas Charts dashboards for monitoring and visualization

2. Configure AI services integration

a. Select one LLM provider for your implementation:

  • Option 1 - AWS Bedrock: Configure access to Cohere models for embeddings and completions (Examples of available models: cohere.embed-english-v3 for embeddings, cohere.command-r-10 for completions)
  • Option 2 - OpenAI: Set up API access and select appropriate model

b. Set up Google Cloud Translation API for multilingual support

3. Application setup

a. Configure environment variables including MongoDB connection strings, database settings, and required API credentials

b. Deploy inference script for continuous system monitoring

c. Install and configure alerts application

d. Launch main demo application

e. Perform system testing and validation to ensure proper data flow and functionality

For complete implementation details, including code samples, configuration files, and tutorial videos, visit the GitHub repository: https://github.com/mongodb-industry-solutions/Leafy-Predictive-Maintenance. This repository provides a production-ready template for implementing predictive maintenance using MongoDB Atlas' comprehensive feature set.

Key Learnings
  • MongoDB Atlas provides a unified platform for predictive maintenance by combining structured sensor data and unstructured maintenance documents, enabling both real-time monitoring and AI-powered analysis through a single-view architecture.

  • The solution leverages a four-stage approach (prioritization, prediction, plan generation, guidance delivery) that integrates multiple MongoDB features including Atlas Stream Processing for real-time data, Vector Search for semantic analysis, and Change Streams for mobile alerts.

  • Organizations can achieve significant operational improvements through this approach: 15-20% reduction in downtime, 5-20% increase in labor productivity, and 30-60% reduction in maintenance costs.

  • The implementation combines multiple AI technologies (RAG, LLMs, ML models) with MongoDB's developer data platform capabilities to create an automated maintenance workflow—from machine prioritization to mobile repair guidance delivery.

Technologies and Products Used
MongoDB developer data platform:
Partner technologies:
  • Google Cloud
  • AWS Bedrock
Authors
  • Dr. Humza Akhtar, MongoDB
  • Rami Pinto, MongoDB
  • Sebastian Rojas Arbulu, MongoDB
Related resources
general_content_developer

GitHub Repository: Leafy-Predictive-Maintenance

Create this demo for yourself by following the instructions in this solution’s repository.

general_action_read

Generative AI in Predictive Maintenance Applications

Discover in depth how generative AI enhances predictive maintenance to reduce downtime and optimize manufacturing operations.

general_content_play

Real-Time Diagnostics with Audio-Based AI and MongoDB Vector Search

A fun and quick demo of MongoDB's Vector Search capabilities for anomaly detection through sound input, using a basic handheld fan as our makeshift wind turbine.

general_content_ebook

E-book: Innovate with AI

Discover how leading industries are transforming with AI and MongoDB Atlas.

Get started with Atlas today

Get started in seconds. Our free clusters come with 512 MB of storage so you can experiment with sample data and get familiar with our platform.
Try FreeContact sales
Illustration of hands typing on a laptop in the foreground and a superimposed desktop window and coffee cup in the background.