Serverless, AI-Driven Diagnostic Platform for Automated Flow Regime Identification Using Large Language Models
Abstract
Abstract Flow regime identification is important in decline curve analysis and rate transient analysis but the interpretation of high-frequency production data for flow regime identification remains highly subjective and computationally disjointed. Furthermore, passing proprietary well telemetry to cloud-based Artificial Intelligence (AI) poses significant data privacy concerns. The objective of this work is to develop a highly performant, zero-footprint, browser-based diagnostic platform that automates the identification of reservoir flow regimes. By merging rigorous physics-based derivative algorithms with Large Language Models (LLMs), the tool provides engineers with an interactive, conversational diagnostic assistant while maintaining strict local data governance. The platform is implemented as a single-file serverless progressive web application (SPA) that ingests multi-well production and wellhead pressure data entirely within the browser. The Bourdet et al. (1989) distance-weighted logarithmic-derivative algorithm is applied client-side to compute smoothed loss ratios (1/D) and b-factors on logarithmic time increments with user-adjustable smoothing parameter L (0.1–1.0 log-cycles). All six diagnostic panels update in real time as L is adjusted. A four-parameter terminal statistical summary (initial rate qi, final rate qf, terminal loss ratio 1/D, and terminal b-factor) is extracted from the computed diagnostics and routed to a locally-hosted LLM via Ollama for flow regime classification (linear flow, harmonic, or BDF), decline forecasting, and generation of text-to-speech audio briefings and an interactive engineering Q&A interface. Only these four anonymized scalars are transmitted; raw time-series data is never sent to the model. The platform is validated on the publicly available Volve field dataset (Norwegian North Sea, Well 15/9-F-14, Jurassic Hugin Formation). Multi-phase diagnostic analysis (oil, gas, water, and BOE) confirms that the Bourdet derivative successfully isolates the terminal b ≈ 0.48 hyperbolic flow regime across all phases. Gas-phase diagnostics parallel oil-phase results, consistent with a dissolved-gas drive mechanism at the observed producing GOR of ~151 scf/STB. Water-phase analysis reveals the post-breakthrough rate inversion (Day 73) characteristic of aquifer influx, which cannot be represented by the Arps model and is correctly flagged by all tested LLMs. BOE diagnostics confirm marginal gas contribution to the combined rate signal. Eight Ollama-compatible models (3B to 9B parameters) are benchmarked on the diagnostic prompt, yielding LLM interpretations that are accurate, hallucination-free, and generated in 5–21 s on CPU-only hardware. Interpretation quality improves markedly above the 7B parameter threshold, where models provide quantitative EUR forecasts and prioritized surveillance recommendations. The platform reduces multi-well flow-regime classification from hours to seconds. This work represents a paradigm shift in how AI is integrated into rate-time analysis workflows. Rather than transmitting raw well data to a cloud service, the platform decouples the mathematical computation (performed locally in the browser) from the narrative interpretation (delegated to a locally-hosted LLM). The result is a fully client-side, zero-infrastructure diagnostic assistant that operates within corporate data-governance constraints while delivering AI-quality interpretive capability. The multi-phase extension demonstrates that a single four-parameter summary protocol is sufficient to convey diagnostic information across oil, gas, and BOE phases, enabling consistent cross-phase benchmarking of LLM interpretive accuracy.