This paper presents the applications of Artificial Intelligence (AI) and Machine Learning (ML) in optimizing oil and gas drilling operations and then presents how macro-level drilling Key Performance Indicators (KPIs) are managed through a machine learning predictive model. Drilling operations are challenging in nature whereas drilling in Pakistan's northern region is more challenging due to complex geological and tectonic conditions. CRISP-DM methodology is adopted to develop ML models for the prediction of macro-level drilling KPIs such as Dry Hole Drilling Days (DHDD), Dry Hole Drilling Cost (DHDC), and Clean Time (CT). Historical data of the Wells located in Pakistan’s northern region are used to train, test, and evaluate ten different ML algorithms. Two top performing models for each KPI are then used to develop an ML-based predictive calculator in Google Colab. Deployment results from unseen data of six Wells show that the predictions are either better or complementing the traditional methods. These deployment results show the effectiveness of ML methods and the potential of AI & ML in enhancing drilling efficiency, reducing costs, and overcoming challenges of drilling oil & gas Wells.
Keywords: Artificial Intelligence, Machine Learning, Drilling, Oil & Gas Wells, Key Performance Indicators, Dry Hole Drilling Days, Dry Hole Drilling Cost, Clean Time
I. INTRODUCTION
This paper summarizes ongoing applications of Artificial Intelligence (AI) and Machine Learning (ML) in oil & gas drilling operations, followed by a real case example of deploying ML predictive models for managing macro-level drilling Key Performance Indicators (KPIs). Prior AI/ML efforts have focused on micro-level KPIs (e.g., drilling parameters, downhole vibration, Rate of Penetration), whereas this study targets prediction of macro-level KPIs.
Oil & gas is CAPEX-intensive and central to global growth. Drilling operations are complex due to subsurface uncertainty; Pakistan’s northern region is particularly challenging because of complex and tectonically active geology. Even adjacent Wells can differ in operational difficulty, so simple prediction methods can be inaccurate. Proactive KPI prediction/optimization is therefore critical. Broadly, drilling KPIs fall into micro-level and macro-level categories.
A. Related Work
AI was used to predict real-time gamma-ray (GR) logs from surface parameters (SVM and RF, with SVM achieving R≈0.98 and 1.42% AAPE), enabling faster lithology insights. Other work used SVR/MLP/DTR to curb drill-string vibrations, achieving a 43% ROP increase and time reduction (66 → 31 h). ML-aided MSE optimization (RF) improved ROP and outperformed traditional approaches. Additional studies include ML detection of downhole vibrations using rig surface data (R=0.91–0.98; AAPE 1.1–7.3%), a generative-AI chatbot for rig report Q&A and recommendations, directional tool selection with XGBoost, and prediction/optimization of WOB/FR/RPM to improve drilling efficiency.
II. METHODOLOGY
A. Machine Learning Predictive Model for Macro-Level Drilling KPIs
A machine learning model is developed to predict DHDD, DHDC, and CT using CRISP-DM. Historical data from Wells in a complex geological region are used. Ten algorithms are trained/tested/evaluated. Best performers identified:
- DHDD: Support Vector Machine (SVM) & Random Forest (RF)
- DHDC: RF & Grid Search CV XGBoost (XGB)
- CT: Stacking (SVM base, LR meta) & Grid Search CV XGB
As a single algorithm did not dominate all KPIs, an ML-based predictive calculator was built using the top two models per KPI. Best/second-best can vary with data splits.
B. Deployment
A Google Colab calculator was implemented.
DataF.csv is used to train/test/evaluate algorithms;
Prediction.csv carries unseen input for prediction. The workflow outputs the two best models per KPI and then produces KPI predictions using the unseen inputs.
Figure 2. Snapshot from ML Based KPI Prediction Calculator.
Figure 3. Snapshot of the Prediction.csv file.
III. RESULTS & DISCUSSION
A. Best Performing ML Models
Using deployment-phase data, top models achieved:
- DHDD: SVM (14.2% error) & RF (14.9%)
- DHDC: RF (11.2%) & Grid Search CV XGB (14.5%)
- CT: Stacking (SVM Base & LR Meta, 10.56%) & Grid Search CV XGB (10.64%)
Figure 4. Two best-performing models for each KPI.
B. Deployment Results
Six Wells (unseen in training) were evaluated. Wells 1–4 have both planned and actual values available; Wells 5–6 have only planned values. The calculator predicted each KPI using the two best models for that KPI.
Table 1. Prediction Results of Two Best Performing ML Models
| Well Name |
DHDD (days) |
DHDC (m$) |
CT (days) |
|
SVM | RF |
RF | XGB |
Stacking | XGB |
| Well 1 | 135 | 194 | 15.4 | 7.2 | 115 | 101 |
| Well 2 | 218 | 266 | 21.7 | 18.2 | 162 | 189 |
| Well 3 | 199 | 280 | 22.7 | 16.1 | 214 | 174 |
| Well 4 | 233 | 272 | 21.7 | 19.9 | 191 | 205 |
| Well 5 | 108 | 203 | 16.0 | 13.1 | 121 | 112 |
| Well 6 | 116 | 113 | 10.1 | 11.1 | 88 | 100 |
Table 2. Planned & Actual Values of the KPIs
| Well Name |
DHDD (days) |
DHDC (m$) |
CT (days) |
|
Planned | Actual |
Planned | Actual |
Planned | Actual |
| Well 1 | 133 | 162 | 12.5 | 13.6 | Not Applicable | 101 |
| Well 2 | 225 | 235 | 17.4 | 15.5 | | 179 |
| Well 3 | 160 | 183 | 15.6 | 12.7 | | 175 |
| Well 4 | 208 | 249 | 17.6 | 17.8 | | 181 |
| Well 5 | 129 | Not Available | 13.8 | Not Available | | Not Available |
| Well 6 | 110 | Not Available | 10.5 | Not Available | | Not Available |
Figure 5. Comparison of Traditional Method & ML Model Results for DHDD.
Figure 6. Comparison of Traditional Method & ML Model Results for DHDC.
Figure 7. Comparison of Traditional Method & ML Model Results for CT.
V. CONCLUSION
The study demonstrates AI/ML applications for optimizing drilling operations in complex geology. Predictive models (DHDD, DHDC, CT) were trained and deployed via a Colab calculator. On six unseen Wells, predictions either matched or improved upon traditional planning methods, indicating AI/ML’s potential to enhance efficiency and reduce costs. Future work can extend training/deployment to additional fields/geologies and refine DHDC predictions by adding cost-related inputs.
ACKNOWLEDGMENT
The authors acknowledge MOL Pakistan for supporting publication and sharing actual Wells data, and Abu Dhabi School of Management (ADSM) for providing the research platform.
REFERENCES
[1] S. Khan, A. N. Awan, Z. Sarfraz, and I. Muhammad, “Geomechanics Application in the North of Pakistan: Unlocking Drilling Excellence—A Comprehensive Analysis of 10 Years,” in SPE/PAPG Pakistan Section Annual Technical Conference, pp. SPE-219509, 2023.
[2] J. Haneef and A. Sheraz, “Development of well complexity calculator and its integration into standard well engineering management system/well delivery system,” Journal of Petroleum Exploration and Production Technology, 12(6), 1727–1757, 2021.
[3] J. Haneef and A. Sheraz, “A Comparative Analysis of Well Key Performance Indicators (KPIs) with Well Complexities Using Well Complexity Calculator,” Arabian Journal for Science and Engineering, pp. 1–18, 2022.
[4] F. Ibrahim and S. Elkatatny, “Real-time GR logs estimation while drilling using surface drilling data; AI application,” Arabian Journal for Science and Engineering, 47(9), 11187–11196, 2022.
[5] F. S. Boukredera, M. R. Youcefi, A. Hadjadj, C. P. Ezenkwu, V. Vaziri, and S. S. Aphale, “Enhancing the drilling efficiency through the application of machine learning and optimization algorithm,” Engineering Applications of Artificial Intelligence, 126, 107035, 2023.
[6] Nautiyal and A. K. Mishra, “Machine learning application in enhancing drilling performance,” Procedia Computer Science, 218, 877–886, 2023.
[7] R. Saadeldin, H. Gamal, and S. Elkatatny, “Detecting downhole vibrations through drilling horizontal sections: Machine learning study,” Scientific Reports, 13(1), 6204, 2023.
[8] Singh, T. Jia, and V. Nalagatla, “Generative AI enabled conversational Chatbot for drilling and production analytics,” in ADIPEC, D021S065R002, 2023.
[9] M. Nour, S. K. Elsayed, and O. Mahmoud, “A supervised machine learning model to select a cost-effective directional drilling tool,” Scientific Reports, 14(1), 26624, 2024.
[10] Elahifar, “Real-Time Artificial Intelligence-Enhanced Machine Learning Technique for Accurate Drilling Parameter Prediction and Optimization,” in SPE Annual Technical Conference and Exhibition, D021S017R001, 2024.
[11] Sheraz, S. Khan, N. Abdelhamid, and A. Manzoor, “Application of Machine Learning for Comprehensive Predictive Modelling of Drilling Key Performance Indicators Using Historical Drilling Data—Collaborative Case Study Between Academia and Industry,” in Oman Petroleum & Energy Show. SPE, 2025.