LLMs reveal limitations for well surveillance
Based on “AI-Driven Well Surveillance Using Low-Code Tools: Automating Anomaly Detection and Actionable Insights on Gas Lift Wells,” SPE-232983-MS, SPE Artificial Lift Conference and Exhibition – Americas, The Woodlands, Tex., Aug. 25 – 27, 2026.
Occidental Petroleum Corp. developed a low-code artificial intelligence (AI) well surveillance workflow to automate detection of gas-lift well anomalies. The project provided well-performance specialists (WPS) a better tool to monitor many wells continuously, identify problems early, and generate recommendations without having to perform daily manual reviews of all wells.
The workflow targeted gas lift because it provides significant production over the pilot workflow area and produces complex operating conditions and anomalies which are difficult to identify using simple rules and observations. The project’s first phase focused on proving that an automated surveillance workflow could detect problems, summarize findings, and recommend corrective actions using widely available low-code tools and large language models (LLMs). The successful Phase I demonstration led to approval to develop Phase II Machine Learning (ML) models which can handle a larger number of wells with improved accuracy.
LLM proof-of-concept
The LLM surveillance proof-of-concept (POC) phase sought to reduce routine manual monitoring activities, optimize WPS expertise, provide 24-hr surveillance coverage, support business units lacking dedicated surveillance personnel, and establish a repeatable workflow that could eventually be deployed across all company assets. To achieve these goals quickly, the project relied heavily on tools already licensed and deployed throughout the organization. The Microsoft Power Platform (MPP) offered low-code development, rapid deployment, component integration, and licensing availability without lengthy procurement or implementation delays. Principal components included Power Automate, Power Apps, SharePoint, OneDrive, Azure Optical Character Recognition (OCR), and multimodal LLMs (Fig. 1).
The project used screenshots of surveillance displays as the primary data source rather than connecting directly to structured databases. Under normal circumstances, anomaly detection systems access time-series data from tables. Creating these connections, however, requires data permissions, identification of relevant tables among large numbers of corporate datasets, integration engineering, refresh scheduling, and transformation of data into a usable format. Phase I’s compressed timeline of only a few months precluded such developments.
Because WPS personnel already relied on a centralized surveillance application that displayed all relevant well information, the team determined that acquiring display screenshots provided the fastest path to a functioning prototype.
The decision to employ multimodal LLMs rather than a custom ML model was similarly driven by speed and practicality. Also, LLMs are good at providing recommendations and summaries, and LLM capabilities and limitations were fully studied before considering specialized ML models in later phases.
The surveillance information consisted of images containing plots, tables, and operational metrics. Commercially available multimodal LLMs could immediately process images without requiring task-specific model training. Also, these models were already available through Microsoft’s ecosystem.
Power Automate orchestrated the workflow and connected data collection, processing, AI analysis, and user interaction. The workflow included image capture, SharePoint-based storage and data management, OCR processing, LLM analysis, and presentation through a Power Apps user interface. This architecture allowed the project team to create a complete surveillance pipeline without extensive software engineering resources.
Surveillance workflow
The LLM workflow began with automated image captures from the existing surveillance system. The WPS team supplied a list of 70 gas-lift wells in New Mexico for extraction by the well-surveillance app. Power Automate Desktop was selected to perform the extraction because it included prebuilt automation actions. A scheduled workflow began each morning at 5:00 a.m. and systematically opened each well within the surveillance application using API numbers supplied in an Excel file.
The workflow automatically displayed specific temperature and pressure curves, captured a screenshot of the entire surveillance display, and stored the image with a filename containing the API number, well name, and timestamp. Each extraction took roughly 30 sec, and screenshots for all 70 wells required about 1 hr. To improve reliability, the team configured a machine group that allowed the process to execute on one of two available virtual desktop systems.
Following image capture and download to a local server, screenshots uploaded automatically into SharePoint using built-in Power Automate actions. SharePoint served two critical functions. First, it acted as a document repository for storing surveillance screenshots and second, it functioned as an operational database in which information associated with each well could be stored and updated.
As each screenshot uploaded, a Power Automate Cloud workflow triggered within 1-2 min. This cloud workflow handled all downstream processing activities, including text extraction, AI analysis, database updates, and preparation of results for users. These results uploaded back to SharePoint.
The data-processing layer addressed one of the most important technical difficulties facing the project: LLMs often struggle to read and interpret tables embedded within images accurately. To improve reliability, the team inserted an OCR step before the LLM analysis stage.
Azure OCR technology extracted information from tabular sections of screenshots and converted it into a structured JavaScript Object Notation (JSON) format. Downstream AI systems interpreted these structured data more consistently. As the workflow processed each image, parsed metadata from filenames identified the corresponding well record and extracted information assembled into a format suitable for AI evaluation. Results generated through the AI pipeline were then written back into SharePoint, where WPS personnel could review them.
Once OCR processing was complete, the workflow submitted images, extracted tables, and carefully developed prompts to LLMs. The AI models generated three primary outputs: descriptions of observed operating conditions, recommendations for corrective action, and classifications categorizing identified anomalies. The workflow repeated this analysis procedure for every well in the monitored population.
Prompt engineering emerged as one of the most important factors influencing system performance. Because the workflow relied heavily on commercially available LLMs, detailed instructions ensured meaningful outputs. The main anomaly-detection prompt alone contained about 4,000 words. It provided extensive guidance regarding the role the model should assume, the significance of different data streams, color coding used in graphs, operational thresholds, indications of abnormal behavior, and reporting priorities.
Through iterative refinement, the team ultimately developed three separate prompts dedicated to anomaly identification, recommendations, and anomaly classification. Embedded documentation and prompt modifications served as practical mechanisms for reducing inaccuracies, guiding reasoning, and encouraging consistent outputs.
To improve usability, the project team developed a custom user interface using Power Apps. While SharePoint could display results directly, it was not optimized for operational review. The Power Apps interface provided a more streamlined and interactive environment in which engineers and surveillance specialists could review AI-generated findings, examine supporting data, and provide feedback. This feedback loop was especially important during the proof-of-concept phase because user observations helped identify strengths and weaknesses in anomaly detection.
The project achieved several important successes during its initial 6-month development period. It demonstrated an automated surveillance workflow which took raw visual inputs from a monitoring system and generated meaningful recommendations without requiring extensive custom software development. The entire system was constructed using low-code tools, proving that advanced surveillance capabilities could be prototyped rapidly without a large development organization. The workflow operated on a predictable schedule, produced repeatable outputs, and successfully relied exclusively on image-based inputs.
Beyond technical validation, the project also generated substantial user feedback that influenced future design decisions regarding anomaly detection, interface design, and workflow integration.
LLM limitations
Despite these successes, the proof of concept revealed limitations associated with LLM-based anomaly detection. The most prominent issue involved the models’ ability to interpret structured operational data accurately. LLMs frequently struggled with tables embedded within screenshots and occasionally suffered hallucinations. To understand these weaknesses, the team compared multiple LLM configurations (Table) using a standardized dataset of surveillance screenshots and common prompts.
A key finding from the evaluation revealed the tradeoff between overall accuracy and operational usefulness. Most wells in the dataset were functioning normally, creating a class imbalance problem. Models which heavily favored classifying wells as normal achieved higher overall accuracy because they correctly labeled most samples. Those same models, however, often failed to identify wells which required attention. Since these wells comprised a minority, a simple accuracy metric discounted them, even though they were the wells the program was specifically designed to detect.
As a result, total miss rate became a more operationally meaningful metric than simple accuracy. Total miss rate measured the percentage of wells that required review or intervention but were incorrectly classified as operating normally. From an operational standpoint, such misses represented the most serious risk because important problems could go undetected.
The evaluation revealed a wide performance range across tested configurations. Total miss rates were 15.8-84.2% (Fig. 2). Models with the highest reported accuracy frequently exhibited the worst miss rates. For example, several configurations achieved 65%-73% accuracy while simultaneously missing more than half of all actionable wells. The team concluded that metrics such as macro-F1, which assign equal importance to all classes regardless of frequency, provided a much more realistic view of model performance under class-imbalanced conditions (Fig. 3).
Among the tested models, OpenAI’s o1 configuration operating at high effort and without OCR achieved the best balance of operational performance. It produced the lowest miss rate at 15.8%, although its accuracy was only 53.0%. This lower accuracy reflected its tendency to classify more wells as “requiring review,” increasing false positives but reducing the risk of missed problems.
GPT-5.4 operating at medium or high effort produced the second-lowest miss rate of 21.1% while achieving an accuracy of 60.6%. By contrast, OpenAI’s o3 models often achieved the highest reported accuracy values but exhibited poor detection.
Certain o3 configurations aggressively classified wells as normal to the extent that they missed 63-84% of actionable cases. These findings highlight the importance of selecting evaluation metrics which align with operational objectives, rather than relying solely on traditional accuracy measurements.
Workflow performance
All LLMs consistently struggled to distinguish between different levels of urgency such as “requires review” and “issue flagged.” Misclassification ran 20-60%. This inaccuracy limited pure LLM solutions for production-scale surveillance.
OCR improved tabular value extraction, significantly reducing errors associated with misreading individual values or assigning tabular values to incorrect data points, but it did not consistently improve overall detection performance. Across multiple paired comparisons, OCR occasionally increased miss rates, and the additional information occasionally encouraged models to classify more wells as normal, improving overall accuracy at the expense of detecting actionable issues.
Even when they correctly extracted numerical values, the models frequently misapplied operational thresholds either through mathematical errors or hallucinations. A common example involved gas injection-rate monitoring. LLM prompts instructed the models to identify when actual injection rates differed from setpoint values by more than 20%. Although the models often read both values correctly, they sometimes concluded that rates exceeded allowable limits even when simple arithmetic would conclude otherwise.
Prompt refinements subsequently encouraged explicit calculations, and validation checks produced modest improvements. Application of more advanced reasoning models with larger context windows also improved results, but the errors reinforced concerns about relying on LLMs for tasks involving rigorous quantitative analysis.
MPP experienced scalability constraints. Although the base platform enabled rapid development and integration, certain workflow automation features required higher licensing tiers or dedicated virtual machines for reliable scheduling. Processing speed, at about 30 sec/well, was too slow for large-scale fields. Scaling up would require extensive parallelization.
Ultimately, operational requirements exceeded the capabilities of the LLM-based workflow. The WPS team needs to scale up a system to monitor more than 3,000 gas-lift wells multiple times per day, with greater configurability, scalability, and performance than the LLM model could provide. Because LLMs operating on screenshots could not meet these requirements economically or reliably, the project transitioned toward a ML architecture that worked directly with structured operational data streams rather than images.
Phase II ML adoption
Custom ML models replaced image-based LLM detection in Phase II, producing markedly better performance. User feedback scores exceeded 92% positive across thousands of generated alerts, while miss rates were effectively reduced to zero through deliberate tuning that prioritized detection instead of occasional over-flagging.
Besides improving performance, the ML solution also reduced operational costs, scaled more efficiently, and integrated directly into the company’s native surveillance environment. Rather than relying on a separate application, alerts and recommendations could be delivered within tools already used by engineers and surveillance personnel. The initiative therefore evolved from a low-code LLM experiment into a production-oriented ML surveillance platform.
About the Author
Alex ProcykAlex Procyk
Upstream Editor
Alex Procyk is Upstream Editor at Oil & Gas Journal. He has also served as a principal technical professional at Halliburton and as a completion engineer at ConocoPhillips. He holds a BS in chemistry (1987) from Kent State University and a PhD in chemistry (1992) from Carnegie Mellon University. He is a member of the Society of Petroleum Engineers (SPE).








