Personal tools
You are here: Home Research Trends & Opportunities New Media and New Digital Economy Data Science and Analytics Workflows and Pipelines in AI and ML

Workflows and Pipelines in AI and ML

Iceland_082423B
[Iceland - Janis R.]


- Overview

An AI and machine learning (ML) workflow or pipeline is an automated, repeatable sequence of connected steps that moves raw data through processing, model training, deployment, and monitoring. 

While an AI workflow describes the overall strategic phases or human-centered processes of a project, an AI pipeline is the technical, automated implementation that programmatically passes outputs from one computational step to the next.

In artificial intelligence (AI) and machine learning (ML), workflows and pipelines are structured processes that help manage and develop models. Workflows define the phases of a project, while pipelines are a series of components that automate those phases. 

1. Core Stages of an AI/ML Pipeline:

  • Data Ingestion: Collecting raw data (structured, unstructured, logs, or streams) from external databases, APIs, or storage buckets.
  • Preprocessing & Cleaning: Handling missing values, removing duplicates, and standardizing data formats.
  • Feature Engineering: Transforming raw fields into meaningful signals or embeddings that models can learn from effectively.
  • Model Training: Fitting algorithms using prepared datasets, tuning parameters, and validating against held-out data.
  • Evaluation & Approval: Testing model accuracy and performance thresholds against blind test data before release.
  • Deployment & Monitoring: Pushing the approved model to a live production endpoint and tracking data drift to trigger automated retraining.

 

2. Key Differences: Workflows vs. Pipelines vs. Data Pipelines:

  • AI Workflow: The high-level blueprint or project management lifecycle - from defining business objectives and manual experimentation to final production oversight.
  • AI Pipeline: The automated code sequence that executes the workflow steps programmatically without manual intervention.
  • Traditional Data Pipeline: Moves and transforms data (via ETL/ELT) strictly for reporting, dashboards, and basic analytics.
  • AI Data Pipeline: Accommodates complex ML needs like feature engineering, text chunking for Generative AI/RAG, and continuous model feedback loops.


3. Common Orchestration Tools:

  • Kubeflow: Kubernetes-native orchestration for scalable ML tasks.
  • Apache Airflow: General workflow scheduler and dependency manager.
  • MLflow / Weights & Biases: Used for tracking experiments, versioning models, and managing artifacts.

 

Please refer to the following for more information:

 

- Workflows

A "Workflow" is a general term referring to a series of well-organized and repeatable activity patterns established by systematically organizing resources into processes capable of transforming materials, delivering services, or processing information. 

It can be described as a sequence of operations, the work performed by individuals or teams, the tasks of organizational staff, or the functioning of one or more mechanisms—whether simple or complex.

From a more abstract perspective, a workflow can be viewed as a representation or model of actual work. The processes described may involve the movement of documents, services, or products from one step to the next.

Workflows can be considered fundamental building blocks that integrate with other organizational components, such as information technology, teams, projects, and hierarchical structures.

 

- AI Workflows 

An AI workflow is a structured, automated sequence of tasks where one or more steps rely on artificial intelligence (AI). Unlike traditional automation that follows rigid rules, AI workflows use machine learning (ML) to process unstructured data, understand context, and make intelligent decisions to streamline business operations. 

1. How an AI Workflow Works: 

A typical AI workflow consists of an interconnected pipeline that moves tasks forward automatically: 

  • Input: Data is collected from sources like documents, emails, forms, or databases.
  • AI Analysis: The AI "brain" (such as a Large Language Model) parses, categorizes, or summarizes the data.
  • Decision & Execution: Based on the analysis, the system follows predefined orchestration logic to route the work or execute a task.
  • Human in the loop: If the AI flags a low-confidence decision or complex issue, it is routed to a human specialist.


2. Common Use Cases: 

  • Customer Support: Classifies incoming support tickets, pulls relevant information from a knowledge base, and drafts replies.
  • Invoice Processing: Extracts vendor names and amounts from various document formats, checks them against purchase orders, and routes them for payment.
  • Content Moderation & SEO: Summarizes text, writes metadata, and scores content against brand guidelines before publishing. 


3. AI Workflows vs. AI Agents: 

While they are often used together, AI workflows and AI agents differ in how they make decisions. An AI workflow follows a structured, predefined map of IF-THEN logic (with AI serving as a step within the chain). An AI agent, on the other hand, is given an ultimate goal and autonomously figures out the steps and paths to take in real-time. 

 

- Data Wrangling

Data wrangling, sometimes referred to as data munging, is the process of transforming and mapping data from one "raw" data form into another format with the intent of making it more appropriate and valuable for a variety of downstream purposes such as analytics. 

Data wrangling is the process of gathering, selecting, and transforming raw data into a more useful format for analysis. It involves six steps: data discovery, data structuring, data cleaning, data enriching, data validating, and data publishing.  

Data wrangling is important because it ensures that data is reliable before it's analyzed. 

Data wrangling is a manual process that's exploratory and iterative. Some say that data wrangling costs analytics professionals as much as 80% of their time, leaving only 20% for exploration and modeling.

 

- ML Pipelines

Developing production-ready AI and ML systems involves a structured workflow that governs how models are developed, deployed, monitored and maintained. Pipelines provide this structure, offering a repeatable, scalable development process comprising a series of interconnected stages. 

ML pipelines automate the workflow by breaking down the ML task into multiple, connected steps. Each step can receive input data, perform a calculation or transformation, and then pass the output to the next step. This allows data scientists to focus on other tasks, such as model evaluation and data exploration. Pipelines can also help standardize best practices, improve model building efficiency, and reduce training costs. 

A typical ML workflow includes the following phases:

  • Data collection: Gathering raw data from various sources to train the model's algorithms.
  • Data preprocessing: Cleaning, preparing, and evaluating data sources to identify issues with quality.
  • Building datasets: Creating datasets.
  • Model training and improvements: Training and refining the model.
  • Evaluation: Evaluating the model.
  • Deployment and production: Deploying the model and putting it into production.

 

- Data Pipelines

A data pipeline is a series of processing steps that prepare enterprise data for analysis. Organizations have vast amounts of data from a variety of sources, including applications, Internet of Things (IoT) devices, and other digital pipes. 

However, raw data is useless; it must be moved, sorted, filtered, reformatted, and analyzed to gain business intelligence. Data pipelines include techniques for validating, summarizing, and finding patterns in data to inform business decisions. Well-organized data pipelines support a variety of big data projects such as data visualization, exploratory data analysis, and machine learning tasks.

Data pipelines are used to generate business insights. For example, data pipelines can be used for: 

  • ETL (Extract-Transform-Load) Processes
  • Data Warehousing and Analytics
  • Data Science and Machine Learning
  • eCommerce Recommendation Engine
  • Social Media Sentiment Analysis
  • Fraud Detection in Financial Transactions
  • IoT Data Processing

 

- Data Pipelines vs. ML Pipelines

Data pipelines and machine learning (ML) pipelines are both processes that link multiple modules and are essential components of organizations. However, they have different purposes and are built by different people.

Data pipelines used for reporting and analytics. Data pipelines transport data to a warehouse or lake and are typically built by data engineers for business users. Data pipelines may process data at regular intervals, such as every hour or 30 minutes, and store the results. They also need to be scalable, secure, and hosted on the cloud, and they require regular monitoring and maintenance. 

ML pipelines used to learn and make predictions. ML pipelines automate the process of building and deploying ML models and are typically built and used by data scientists. ML pipelines involve building, training, and deploying ML models, which may include offline predictions or batch jobs. A crucial part of ML pipelines is data cleaning and standardization, which may include tasks like removing null values, binning ages, and ensuring consistent date formats. 

Data pipelines and ML pipelines have many similarities, including:

  • Both access data from corporate systems and intelligent devices
  • Both store collected data in data stores
  • Both go through data transformation to prepare it for analysis or learning
  • Both keep historical data

 

Joining a data pipeline and an ML pipeline together can create a collaborative platform that allows data engineers and data scientists to work together, and can benefit business users with predictive models.

 

The Flower Shop_022023A
[The Flower Shop - Gerald Harvey Jones]

- MLOps

MLOps is a paradigm designed to reliably and efficiently deploy and maintain ML models in production. The word is a compound of “machine learning” and the continuous delivery practice (CI/CD) of DevOps in the software field.

ML models are tested and developed in isolated experimental systems. When the algorithm is ready to launch, MLOps exercises take place between data scientists, DevOps, and ML engineers to transition the algorithm to production systems. 

Similar to DevOps or DataOps approaches, MLOps seeks to increase automation and improve the quality of production models, while also focusing on business and regulatory requirements. 

 

- CI/CD Pipelines

A CI/CD pipelines, or Continuous Integration and Continuous Deployment pipeline for data, are becoming increasingly important for data engineering and data science. They can help data science teams deliver high-quality machine learning models to businesses in a timely manner. 

A CI/CD pipeline is a software development or engineering process that combines automated code building and testing with deployment. A CI/CD pipeline is used to deploy new and updated software safely. 

 

- DevOps, Data Pipelines, and CI/CD Pipelines

DevOps can be defined as the union of people, process, and products to enable continuous delivery of value to the business. It's an iterative process of "Developing", "Building & Testing", "Deploying", "Operating", "Monitoring and Learning" and "Planning and Tracking". 

The application of DevOps principles to Data can be understood through the concepts of Data and CI/CD pipelines. 

In DevOps, a data pipeline is a series of steps that prepare raw data for analysis, and a CI/CD pipeline is a way to continuously update data pipelines as new ideas are developed and tested. 

Here's some more information about data pipelines and CI/CD pipelines: 

  • Data pipelines: Data pipelines are used to prepare data for analysis by moving, sorting, filtering, and reformatting it. They can help improve data quality by removing redundancy and standardizing formats. Data pipelines can be used for exploratory data analysis, data visualizations, and machine learning.
  • CI/CD pipelines: CI/CD pipelines are a critical part of DevOps that continuously update data pipelines in different environments. They are often called innovation pipelines because they enable the change process.
  • Data pipeline ownership: Data engineers are typically responsible for the data ingestion, transformation, and sharing processes that are part of data pipelines.
  • CI/CD pipeline ownership: The Platform automation and operations team typically owns the maintenance of CI/CD pipelines.

 

 [More to come ...]
Document Actions