Manuscript Offprint
arXiv:2611.09372Enabling Privacy-Preserving Natural Language Access to Industrial Smart Meter Data
Carlos Martín-Abellán
Valencian Research Institute for Artificial Intelligence (VRAIN)
Universitat Politècnica de València
Valencia, Spain
Mark Kröll
Know Center Research GmbH
Graz, Austria
Abstract—Energy management officers and grid operators increasingly rely on smart meter data for anomaly detection, performance monitoring, and strategic decision-making. However, extracting actionable insights from large-scale, heterogeneous telemetry databases requires advanced SQL and data engineering expertise, creating a critical bottleneck for non-technical personnel. Furthermore, the strict data privacy regulations and security constraints inherent to critical energy infrastructure often prohibit the routing of sensitive consumer data through cloud-based Large Language Models (LLMs). To address these challenges, we present OpenMeter, a schema-agnostic Multi-Agent System (MAS) designed to translate natural language queries into executable code and human-readable insights. This architecture lowers the technical barrier for day-to-day utility operations by empowering non-expert personnel to interact with complex databases through intuitive natural language dialogue, transforming raw telemetry into a highly valuable tool for routine grid workflows and strategic decisions. Multi-scenario ablation studies over this environment demonstrate that full multi-agent orchestration shows its largest observed accuracy gains on resource-constrained local hardware (+6.1 pp EX-R over the strongest single-agent configuration); at frontier scale, individual components retain value but should be enabled selectively, indicating that the cost of full orchestration is justified specifically where privacy demands local execution.
Index Terms—Multi-Agent Systems, LLM Orchestration, Text-to-SQL, Energy Analytics, Smart Meter Data, Data Privacy
I. INTRODUCTION
The rapid deployment of Advanced Metering Infrastructure has transformed modern power grids into highly data-intensive systems. While the continuous stream of telemetry holds immense potential for grid optimization and automated auditing, bridging the gap between raw database storage and actionable operational insights remains a significant challenge.
Industrial Motivation and the Data Access Problem: Smart meters deployed at scale generate time-series data at 10–15 minute intervals, covering active energy, voltage, reactive power, and power quality metrics across hundreds of metering points [10]. However, the volume and complexity of this telemetry creates what Dong et al. describe as “sensory overload” for operational staff [3]: while the data required for anomaly detection, standards compliance verification, tariff auditing, and data availability assessment is successfully captured, its analytical utility remains largely inaccessible to the personnel who need it most.
Energy Management Officers are domain experts in grid operations, not database engineers, and this mismatch creates a well-documented operational bottleneck [15]: together with an industrial company providing smart energy solutions, we identified four recurring analytical tasks - i) reporting frequency checks, ii) data availability audits, iii) structural quality assessment, and iv) anomaly detection - which remain inaccessible to operations staff without database engineering support.
By enabling operators to communicate with their data in plain language, systems like OpenMeter (see Fig. 1) democratize access to grid analytics, reducing response latency from hours to minutes and supporting faster, data-driven decision-making at the field level.
Compounding the access problem, the sensitive nature of consumer energy data (from which adversaries can infer occupancy patterns, daily routines, appliance usage, and even individual identities [16], with user re-identification accuracy reaching 99% on public smart meter datasets [17]) prohibits routing operational queries through external cloud-based LLM APIs. Any practical solution for this domain must therefore rely on open AI models deployed in local, controlled environments within the utility's own infrastructure, ensuring that sensitive consumption data never leaves the operator's premises.
To the best of our knowledge, no existing system integrates LLM-driven multi-agent orchestration, Text-to-SQL translation, local open-weight execution, and domain-grounded explainability for real smart meter data analytics. Our main contribution is as follows:
- A privacy-preserving multi-agent system for energy Text-to-SQL with domain-grounded explainability. We propose, OpenMeter, the first system combining multi-agent LLM orchestration with Text-to-SQL for smart meter data analytics. Co-designed with an industrial partner to address daily operational tasks, the system is grounded in three design principles: (a) Privacy-by-Architecture, (b) Agent Separation and (c) LLM-as-Curator.
As supporting contributions, we provide:
- An additive ablation study (S-BASE, S+SC, M-BASE, M+SC, M+KB, M+FULL) that independently isolates the contributions of self-correction, multi-agent decomposition,
and domain-knowledge injection, providing the first controlled single-agent versus multi-agent comparison for energy data querying.
- An energy-domain Text-to-SQL evaluation dataset of 62 verified NL-to-SQL pairs derived from operational workflows identified with the industrial partner's field engineers. Each pair underwent a three-step verification protocol: (1) manual Gold SQL authoring; (2) execution verification with non-empty result set inspection and (3) SHA-256 result hashing for deterministic automated comparison.
A. Multi-Agent Systems and LLM Orchestration
Multi-Agent Systems (MAS) have long been used for distributed energy management. Ali et al. [18] propose a hierarchical MAS with specialized agents for resource scheduling, yet these systems operate exclusively as backend controllers and lack natural language interfaces, preventing human operators from conversing with or querying them directly.
The emergence of LLM-based multi-agent systems has begun to address this interaction gap through role specialization. Xiao and Xu [19] present the first LLM-driven MAS applied to building energy auditing, deploying three specialized agents (Planner, Researcher, Advisor) to automate the diagnosis of energy inefficiencies. This “Orchestrator-Programmer-Reviewer” pattern has been formalized in software engineering (cf. He et al. [4]) for automated code generation and validation. There, task decomposition, implementation, and quality assurance are structurally separated across agents, a paradigm that closely mirrors our system pipeline (see Fig. 1).
In addition, existing energy-specific LLM frameworks, such as Gamage et al.'s multi-agent RAG system for net-zero management [12], rely on cloud infrastructure and lack Text-to-SQL capabilities.
To our knowledge, no prior work combines MAS orchestration with Text-to-SQL for energy analytics while providing a controlled comparison between single-agent and multi-agent pipelines, which our ablation study addresses.
B. Text2SQL for Structured Data Analytics
The effectiveness of LLM-driven Text-to-SQL critically depends on how the database schema is presented to the model. Gao et al. [1] show that representing database schemas as SQL CREATE TABLE statements provides the most effective prompting strategy for Text-to-SQL models. Ojuri et al. [14] further demonstrate the practical value of coupling intelligent agents with LLMs to democratize database access for non-technical business users.
However, high performance on curated benchmarks does not transfer to real-world deployment. Evaluations on Spider 2.0 [7] show that the best text-to-SQL parser achieves only 5.7% EX, while the strongest agent-based approach reaches just 21.3%. The BIRD benchmark [8] further establishes that resolving queries on noisy databases requires integrating external domain knowledge beyond the schema itself, a finding that directly motivates our LLM-as-Curator mechanism.
Nascimento et al. [9] corroborate this on IndDB, a proprietary industrial database: most SOTA prompting strategies fail to exceed 30% EX, with the best achieving only 41%. Crucially, their error analysis identifies schema linking as the dominant failure mode, accounting for 53.3% of all errors, confirming that models routinely hallucinate table and column references even when the complete schema is provided in the prompt. Our system directly addresses this vulnerability through a deterministic schema validation layer backed by an iterative self-correction loop (Section III).
Within energy analytics, Intelli-Dispatch-SQL [2] represents the closest related work, employing a single LLM agent for intent recognition, SQL generation, and validation to answer natural language queries over power dispatching databases. Unlike OpenMeter, however, it operates on a synthetic dataset and a monolithic single-agent architecture without explainability metrics. OpenMeter addresses these limitations through a multi-agent pipeline with structural separation between data querying and explanation generation, evaluated on real industrial smart meter telemetry.
C. LLMs in Energy Analytics and Privacy
Data confidentiality remains one of the main barriers to deploying LLMs in energy systems. Dong et al. [3] warn that cloud-hosted LLMs introduce significant cybersecurity and privacy risks. Similarly, Madani et al. [20] identify data privacy as the main technical challenge and observe that the vast majority of proposed use cases remain conceptual, with no deployed systems operating on real grid infrastructure.
At the same time, explainability in smart meter analytics remains limited to post-hoc XAI techniques designed for traditional machine learning models [11], providing little support for natural-language interaction.
Existing energy-focused LLM systems, such as Gamage et al. [12], improve decision support through multi-agent architectures but continue to rely on cloud-hosted GPT-4, inheriting the privacy concerns identified above.
OpenMeter addresses both challenges by executing all multi-agent inference locally with open-weight models while generating natural-language explanations grounded in domain rules rather than post-hoc feature attribution.
III. MULTI-AGENT SYSTEM ARCHITECTURE
A. System Overview and Design Principles
Our Multi-Agent System (MAS) processes natural-language queries over smart meter data and returns analytical results with domain-grounded explanations. The architecture follows a Plan-then-Execute pattern [5] (the Orchestrator produces a structured execution plan before any code generation, preventing the premature-execution failure mode reported for autonomous agents [4], [6]) and is built on three design principles:
(i) Privacy-by-Architecture: All LLM inference runs on open-weight models, either on-premises or via a privacy-preserving cloud tier with prior data anonymization. Telemetry, queries, and results never leave the controlled environment, satisfying

Fig. 1. OpenMeter multi-agent architecture and running example. A natural-language query flows through the O → CA → O → IA pipeline, producing a grounded response with retrieved results and domain-based interpretation. Blue: primary execution flow; grey: retrieval and feedback; dashed amber: DuckDB interaction and CA self-correction; dashed boundary: controlled runtime environment.
the data-sovereignty requirements of critical energy infrastructure.
(ii) Agent Separation: The Coding Agent (CA), responsible for data extraction via SQL or Python, and the Interpretation Agent (IA), dedicated to natural-language generation, are structurally decoupled so that raw numerical outputs are always mediated by a dedicated interpretation step. This mitigates the Reasoning-Action Mismatch failure mode that Cemri et al. [6] link to 13.2% of execution errors in LLM-based MAS benchmarks.
(iii) LLM-as-Curator: The Orchestrator (O) manages the domain knowledge base and routes only the relevant context per query, removing the need for external RAG infrastructure (embedding models, vector databases) and optimizing context-window utilization.
The execution flow is a sequential pipeline (Fig. 1), detailed agent by agent in the following subsections.
Orchestrator Agent (O) is the central coordinator of the MAS. It ingests the natural-language query, the structural schema dictionary, and two dataset-agnostic domain repositories grounded in established standards (EN 50160 [21], IEC 62056-21/DLMS [22]): a domain glossary of ~45 smart-metering entries across 7 semantic categories (each with term, definition, unit, and anomaly indicators), and a domain knowledge base (KB) organized in 12 thematic categories that formalizes operational expectations, cross-variable correlations, and machine-checkable anomaly rules with severity levels, validated by professional energy domain experts.
Before code generation (), O performs four sequential operations: intent classification into one of 13 analytical categories, difficulty assessment (Easy/Medium/Hard), generation of a structured execution plan (target channels, thresholds, visualization requirements), and selection of the glossary entries and KB sections relevant to the classified
intent. After execution (), O runs a second filtering pass over CA's raw output and forwards to the Interpretation Agent (IA) only the domain rules needed to contextualize the result.
LLM-as-Curator. Injecting the full knowledge base into every downstream prompt induces attention degradation [9], [13], where the model fails to isolate the operative constraints from unrelated context. Rather than truncating the KB or adding a retrieval pipeline, O acts as a dynamic per-query filter: it receives the full KB in its system prompt and extracts only the applicable sections within its regular inference pass, at no added latency and without the embedding model or vector store of a RAG pipeline. Unlike Ni et al.'s [2] fine-tuned lexicons, the KB remains a version-controlled document set, updatable without retraining. The contribution of this strategy is isolated in M-BASE vs. M+KB (Section IV).
Coding Agent (CA) is the Text-to-SQL generation engine. It receives from O the execution plan, the filtered domain rules, and the dataset schema. Although Gao et al. [1] identify Code Representation (CREATE TABLE syntax) as optimal for normalized databases, it is inefficient for heterogeneous industrial deployments with EAV and wide-matrix layouts. The CA therefore receives the schema as a structured context block with column names, types, cardinality statistics, enumerated value domains, and sample rows, maximizing information density across multiple and diverse schemas.
The CA emits DuckDB-compatible SQL; for queries requiring graphical output, a secondary Python stage produces matplotlib visualizations after successful SQL execution. All analytical computation runs in SQL; Python is reserved for visualization. Code executes in a sandboxed, read-only environment with no network or filesystem access. The CA also implements an autonomous self-correction loop fully abstracted from O: on execution error, DuckDB's column-level diagnostics are appended verbatim to the CA's context for targeted refinement, directly addressing the schema-linking failure mode reported in [9]. O only sees the final deterministic outcome, preventing context pollution and cascading errors.
Interpretation Agent (IA) is the final synthesis layer. It ingests the original query, the raw output returned by CA, and the result-aware domain context curated by O post-execution. The IA produces a structured response combining: a factual summary anchored to the retrieved values; anomaly characterization that distinguishes statistical anomalies (values outside expected ranges) from logical ones (physically or operationally impossible values, e.g. negative cumulative energy), citing the matching KB rule (e.g. V-001, E-005) when applicable; and uncertainty-aware language, using hedged language for causal inferences (“may indicate”, “is consistent with”) and deterministic language for retrieved facts. Visualization is triggered by the operator or inferred by O at query time, captured in the execution plan, and rendered by the CA; the IA’s role is exclusively explanatory.
IV. EXPERIMENTAL SETUP
A. Six-Scenario Ablation Design
The evaluation comprises six scenarios organized into two tracks: a single-agent baseline (S-Base, S+SC) and a multi-agent track (M-Base, M+SC, M+KB, M+Full). The single-agent track establishes the performance limits of a monolithic architecture, whereas the multi-agent track isolates the contribution of self-correction and domain knowledge through an additive factorial design.
- Single-Agent Track: A single-agent configuration executes the full NL→SQL→interpretation pipeline within a unified prompt using the complete schema and domain knowledge.
-
S-Base: A monolithic agent receives the full schema and domain KB without self-correction. This serves as the baseline for assessing end-to-end performance without architectural decomposition.
-
S+SC: Extends S-Base by enabling a bounded self-correction loop (maximum two retries upon execution failure), isolating the effect of iterative error recovery in a single-agent setting.
- Multi-Agent Track: All multi-agent configurations employ the Orchestrator, Coding Agent, and Interpretation Agent. Starting from M-Base, self-correction and domain knowledge are independently enabled following a factorial design.
-
M-Base (Baseline): No self-correction and no domain knowledge injection.
-
M+SC: Enables the self-correction loop while keeping domain knowledge disabled.
-
M+KB: Enables selective domain knowledge routing while disabling self-correction.
-
M+Full: Combines domain knowledge injection and self-correction, representing the fully enabled multi-agent configuration.
TABLE I HARDWARE AND MODEL CONFIGURATION FOR THE EVALUATION TIERS.
| Setup 1 (Local) | Setup 2 (Cloud) | |
|---|---|---|
| Model (all agents) | Qwen3.5 | Qwen3.5 |
| Parameters | 9B | 397B-A17B MoE |
| GPU | 1× RTX A5000 (24 GB) | Ollama Cloud† |
| System RAM | 25 GB | — |
| vCPUs | 9 | — |
| Inference backend | Ollama (local) | Ollama Cloud |
| Model swap overhead | None (unified model) | None (unified model) |
† Cloud hardware specifications are not disclosed by the provider.
The experimental design allows us to isolate the marginal contribution of self-correction and domain knowledge, as well as their potential interaction effects under a controlled factorial setup.
- Model and Hardware Configuration: The Qwen 3.5 family (released February 2026) was selected as it represents one of the highest-performing open-weight model families available at the time of evaluation, and provides a coherent parameter-scaling ladder from 9B to 397B-A17B MoE within a unified inference backend (Ollama), enabling controlled scaling comparisons under identical infrastructure. All experiments are conducted under two hardware tiers (Table I).
B. Datasets and Data Partitioning
All experiments reported in Section V use an industrial smart-meter deployment operated by an industrial partner¹. The evaluation corpus comprises three measurement tables (EMSify, LP3 and LPR) totaling approximately 7.5 million rows across EAV and Wide schemas (Table II). For cloud-tier experiments, all personally identifiable information was anonymized before transmission, whereas local-tier experiments were executed entirely on-premises.
-
Industrial Evaluation Dataset: The industrial dataset consists of three measurement tables ingested without cleaning or imputation, preserving real telemetry artifacts (e.g., communication outages, counter resets, and undervoltage events). This enables evaluation under realistic deployment conditions rarely represented in academic benchmarks.
-
Evaluation Golden Dataset (62 pairs): The golden dataset was derived from 39 natural-language templates covering 13 analytical categories and three difficulty levels. Each
¹The evaluation gold-standard dataset (62 NL-to-SQL pairs) and the measurement tables are available on Zenodo upon request: https://doi.org/10.5281/zenodo.23983322.
TABLE II EVALUATION DATASETS (THE INDUSTRIAL PARTNER'S DEPLOYMENT).
| Dataset | Meters | Rows | Res. | Schema | Key Measurements |
|---|---|---|---|---|---|
| EMSify | 19 | ~3.5M | 15m | Long/EAV | A+/A-, R+/R-, PF, THD, UL1-L3 (28 types) |
| LP3 | 74 | ~3.0M | 10m | Wide | UL1-L3 (voltage only) |
| LPR | 39 | ~1.0M | 15m | Wide | A+/A-, load profile registers |
Datasets span periods between 2019 and 2026 and exhibit distinct schemas and meter populations.
template was instantiated only for compatible schemas, yielding 62 manually verified NL→SQL pairs using anonymized identifiers of real meters, and time ranges. Of these, 13 pairs were reserved for prompt refinement and debugging, while the remaining 49 were held out for the evaluation reported in Section V.
C. Evaluation Metrics
Metrics are organized into four categories: task accuracy, qualitative assessment, self-correction efficiency, and pipeline performance. Our task accuracy metrics build on the standard Text-to-SQL benchmarking protocol [1], [8], which we extend with graded execution variants and a semantic-equivalence adjustment.
1 ) Task Accuracy:
Runtime viability. The Executable SQL Rate (ESR) is the fraction of generated SQL queries that execute without syntax or database engine errors, whereas the Visualization Execution Rate (VER) is the analogous rate for matplotlib scripts producing a valid image object. ESR serves as the prerequisite for all downstream evaluations.
Execution accuracy. Generated and gold-standard result sets are compared under three progressively relaxed variants that separate semantic correctness from formatting differences. EX-Strict (EX-S) requires identical column count, ordering, and row content (float tolerance ). EX-Partial (EX-P) relaxes column ordering while preserving exact column and row counts. EX-Relaxed (EX-R), our primary metric, performs name-blind value-based subset matching: aliases are ignored, auxiliary columns are allowed, and all column subsets and permutations are considered, provided the row count matches. EX-R reflects operational settings where correct queries legitimately return additional context (e.g., grouping keys) absent from the minimal gold query. The differences and capture column-ordering errors and the effect of semantically valid auxiliary information, respectively.
Structural equivalence. Exact Match (EM) compares normalized SQL abstract syntax trees (ASTs): both queries are parsed using the DuckDB dialect, identifiers are normalized, aliases removed, and order-insensitive clauses lexicographically sorted before comparison. Component Matching (CM) reports the mean token-level after alias removal across the major SQL clauses, yielding a continuous score in [0,1].
Semantic Equivalence Rate (SER). SER accounts for valid alternative SQL formulations that differ from the reference query but produce an equally acceptable interpretation. Candidate queries (ESR=1, EX-R=0) are filtered using majority consistency across runs before being reviewed by either an LLM judge or human evaluators. EX-S therefore serves as a conservative lower bound on true accuracy; the SER acceptance rates reported in Table IV indicate how much of the remaining gap is attributable to valid alternative formulations rather than genuine errors.
- Qualitative Assessment:
All qualitative dimensions are scored on a [1, 5] Likert scale. Interpretation quality is assessed along three axes: Groundedness (Grd), the factual traceability of every claim in the response to the SQL result set; Relevance (Rel), the degree to which the response directly and completely answers the target question without redundant diversions; and Coherence (Coh), internal consistency and logical flow. Visualization quality is scored on Data Alignment (Align), the faithfulness of the chart to the underlying SQL result set (correct axes, ranges, and visual encoding), and Presentation Quality (Pres), the legibility of labels, titles, and legends for operator inspection.
3 ) Self-Correction Efficiency:
The Self-Correction ROI measures the net benefit of the self-correction loop along two axes: , the percentage-point gain in executable queries after retries, and , the gain in semantically correct queries. By design, the loop retries only after execution errors, so regression of initially correct queries is structurally impossible.
- Pipeline Performance: End-to-end latency is the wall-clock duration from query input to final explanation delivery, computed as the sum of orchestrator, Coding Agent (cumulative across all attempts), DuckDB execution, and Interpretation Agent durations. Token efficiency is captured via total input tokens ( ) and output tokens ( ) per query (summed across all agents), and the per-query generation throughput ( divided by LLM inference time for that query). All values are reported as medians ( ) over queries pooled across the five runs.
D. Evaluation Protocol
All experiments are repeated over five independent runs per scenario and hardware setup after discarding one warm-up run to eliminate model-loading and caching effects. Quantitative metrics are averaged across runs, whereas qualitative evaluations follow the aggregation procedures described below.
-
Quantitative Metrics: All quantitative metrics are computed automatically for each of the 12 evaluation conditions (6 scenarios 2 deployment tiers) and reported as the mean over the five runs.
-
LLM-as-Judge: One LLM evaluator performs three scoring passes per output, yielding a median score per Likert dimension and a majority vote for binary verdicts :
• Interpretation quality: It was evaluated by DeepSeek-V4-Pro for every valid interpretation ( 10 characters, no pipeline error), covering all 12 conditions.
• Semantic Equivalence Review (SER): SER candidates are identified via majority-consistent filtering: a (query, condition) pair is included only if it qualified as an SER candidate in 3 of the 5 runs, filtering out stochastic one-off failures. A single representative run per eligible pair is then reviewed. Evaluated also by DeepSeek-V4-Pro; the verdict is binary (Yes/No) via majority vote of 3 passes.
DeepSeek-V4-Pro and Kimi-K2.6 were accessed via Ollama Cloud in May 2026.
• Visualization quality: It was evaluated by Kimi-K2.6 (vision-capable) for every successfully rendered visualization across all 12 conditions.
- Human Evaluation: Four blinded domain experts, organized into two groups of two, evaluated the two ceiling configurations (S+SC and M+FULL) across both deployment tiers under randomized system labels.
-
Interpretation quality: each group independently rates the same subset of 28 intersection queries (those with valid interpretations across all four conditions) under all four conditions, yielding 112 items per group (56 per evaluator).
-
SER: majority-consistent filtering as above; all eligible queries are included without intersection restriction (74 items total: 40 in group A, 34 in group B).
• Visualization quality: the intersection of queries with renderable visualizations across all four conditions (35 items: 20 in group A, 15 in group B).
For all human-evaluated dimensions, the best-performing run (highest EX-R) per condition is selected as the representative one.
V. EVALUATION RESULTS
A. Task Accuracy
The two tiers exhibit qualitatively different patterns:
In Tier 1 (local, 9B), M+FULL achieves the highest execution accuracy across all three variants (EX-S 32.2%, EX-P 33.9%, EX-R 42.4%), a +6.1 pp EX-R gain over the strongest single-agent configuration (S+SC, 36.3%). The highest ESR (77.6%) and VER (56.6%), however, are obtained by M+SC, not by M+FULL: adding curated domain context on top of self-correction yields more semantically accurate SQL but a small reduction in raw executability, revealing a real trade-off in KB injection. Self-correction contributes a large ESR improvement in both tracks (+15.1 pp single, +20.0 pp multi), while domain knowledge adds +2.9 pp EX-R independently of self-correction.
In Tier 2 (frontier, 397B), the pattern diverges. M+KB achieves the highest execution accuracy (EX-S 38.0%, EX-P 38.8%), overtaking S-BASE (36.7%) and indicating that domain knowledge injection remains beneficial even at frontier scale. However, the best EX-R is no longer M+KB (54.3%) but S-BASE (54.7%); on this tier, the frontier model frequently returns valid but structurally divergent SQL that relaxed matching captures equally well without multi-agent orchestration. ESR is near-saturated ( 94.7%) across all multi-agent scenarios, leaving little room for the retry loop to act. S-BASE retains the highest structural metrics (EM 15.5%, CM 0.422), suggesting that the frontier model produces SQL closer to the gold structure when not guided by the orchestrator's plan and curated context. EM scores remain uniformly low ( 15.9%) across both tiers, confirming that the model rarely reproduces the exact gold SQL even when returning correct results.
The gap remains larger in Tier 2 (up to 18.0pp for S-BASE) than in Tier 1 (up to 10.2pp for M+FULL): the frontier model frequently returns valid auxiliary columns that EX-Strict penalizes but that are operationally useful.
Table III reports the full results.
- Semantic Equivalence Rate: Tier 2 yields higher LLM-judged SER than Tier 1 in most scenarios; within Tier 2, M+FULL (30.4%), S+SC (29.2%) and M+KB (28.6%) cluster closely. Tier 1 candidate pools are too small to support a reliable ranking (e.g. M-BASE at 33.3% on only n=9 candidates). Human evaluators accept more alternatives than the LLM judge: under strict consensus (both raters agree), S+SC acceptance rises from 5.0% to 30.0% in Tier 1 and from 29.2% to 37.5% in Tier 2; M+FULL rises from 6.2% to 25.0% and from 30.4% to 34.8%, respectively. As an upper bound, single-rater acceptance reaches 70–100%. This consistent gap between human and automated acceptance indicates that automated evaluation systematically underestimates the practical utility of generated SQL.
Table IV details the per-condition breakdown.
B. Self-Correction ROI
The retry loop is highly effective when baseline executability is low. In Tier 1, S+SC recovers pp and pp; multi-agent scenarios show smaller but consistent gains ( 10.6-11.8 pp, 2.0-3.3 pp). In Tier 2, where baseline ESR already exceeds 95%, the loop yields marginal returns ( pp, pp).
C. Output Quality
In the LLM evaluation, multi-agent scenarios score consistently higher Grd than single-agent (M-BASE 4.51/4.64 vs. S-BASE 3.53/4.03), a gap that is conservative given that S-Base receives the full uncurated KB whereas M-Base receives none, supporting the agent-separation hypothesis. Within the multi-agent track, however, adding curated KB context lowers Grd in both tiers (M-BASE → M+KB: 4.51 → 4.21 in T1; 4.64 → 4.29 in T2): KB-grounded contextual remarks added by the IA appear to be penalized by the LLM judge as not literally traceable to the SQL result set. Rel and Coh are uniformly high under LLM judgment (≥4.45), with a Tier 2 ceiling near 4.9 for Coh. LLM-judged visualization scores are lower than interpretation scores across all conditions (Align 3.30-3.97, Pres 3.02-3.75), with the multi-agent advantage persisting (M-BASE Prs 3.26/3.67 vs. S-BASE 3.02/3.41).
Human evaluators show a different pattern. Grd is high and comparable between S+SC (4.41/4.57) and M+FULL (4.41/4.54), narrowing the single-multi gap observed in the LLM evaluation. Human-rated Rel (3.80-4.11) and Coh (3.86-4.30) are consistently lower than LLM-judged values (4.45-4.94), indicating a positivity bias in the LLM judge. Visualization scores are moderate (Align 3.27-4.29, Pres 3.00-3.27) on small per-condition samples (n = 6-10), broadly consistent with the LLM-judge range. Inter-rater reliability is low (weighted Cohen's -0.11 for Groundedness, for Relevance), reflecting the inherent subjectivity of
TABLE III
TASK ACCURACY ACROSS SCENARIOS AND TIERS (MEAN, RUNS, 49 QUERIES EACH). EX-S/P/R = EXECUTION STRICT/PARTIAL/RELAXED (%); EM = EXACT MATCH (%); CM = COMPONENT MATCHING ; ESR = EXECUTABLE SQL RATE (%); VER = VIZ EXECUTION RATE (%). BOLD = BEST PER COLUMN.
| Arch. | Scen. | Tier 1 (Local, 9B) | Tier 2 (Frontier, 397B) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Execution | Structural | Runtime | Execution | Structural | Runtime | ||||||||||||
| EX-S | EX-P | EX-R | EM | CM | ESR | VER | EX-S | EX-P | EX-R | EM | CM | ESR | VER | ||||
| Single | S-Base | 24.53.2 | 25.32.3 | 32.74.1 | 3.71.7 | 0.2730.018 | 53.53.0 | 27.64.2 | 36.71.4 | 37.12.2 | 54.71.7 | 15.52.3 | 0.4220.010 | 98.81.1 | 90.32.9 | ||
| S+SC | 26.54.8 | 28.24.7 | 36.37.8 | 10.61.7 | 0.3090.020 | 68.616.8 | 49.17.1 | 35.54.2 | 35.54.2 | 53.14.8 | 12.72.7 | 0.4030.021 | 99.60.9 | 94.53.1 | |||
| Multi | M-Base | 28.22.7 | 29.82.3 | 35.52.3 | 15.11.8 | 0.3350.019 | 57.63.9 | 28.39.9 | 34.73.8 | 35.53.7 | 50.63.7 | 11.01.8 | 0.3620.045 | 95.14.0 | 88.35.2 | ||
| M+SC | 28.62.9 | 30.22.7 | 36.72.5 | 15.93.9 | 0.3590.032 | 77.65.2 | 56.67.2 | 34.72.5 | 35.12.7 | 49.02.0 | 10.63.9 | 0.3650.024 | 99.60.9 | 96.63.4 | |||
| M+KB | 29.43.4 | 31.44.0 | 38.44.4 | 9.82.2 | 0.3370.020 | 58.83.4 | 31.06.5 | 38.02.3 | 38.82.9 | 54.34.2 | 10.63.4 | 0.3650.031 | 94.72.7 | 84.87.2 | |||
| M+Full | 32.25.3 | 33.95.5 | 42.43.9 | 12.22.0 | 0.3570.030 | 74.72.7 | 47.64.5 | 35.14.7 | 35.95.3 | 53.15.2 | 9.01.8 | 0.3490.024 | 99.60.9 | 93.12.4 | |||
TABLE IV
SEMANTIC EQUIVALENCE RATE (SER) PER CONDITION. LLM: MAJORITY VOTE, RUNS; HUMEV: EVALUATOR CONSENSUS (BOTH RATERS AGREE). .
| Arch. | Scen. | Eval | Tier 1 (Local, 9B) | Tier 2 (Frontier, 397B) | ||
|---|---|---|---|---|---|---|
| n | Rate | n | Rate | |||
| Single | S-Base | LLM | 0/8 | 0.0% | 3/19 | 15.8% |
| S+SC | LLM | 1/20 | 5.0% | 7/24 | 29.2% | |
| HumEv | 6/20 | 30.0% | 9/24 | 37.5% | ||
| Multi | M-Base | LLM | 3/9 | 33.3% | 3/22 | 13.6% |
| M+SC | LLM | 2/17 | 11.8% | 4/24 | 16.7% | |
| M+KB | LLM | 1/10 | 10.0% | 6/21 | 28.6% | |
| M+Full | LLM | 1/16 | 6.2% | 7/23 | 30.4% | |
| HumEv | 4/16 | 25.0% | 8/23 | 34.8% | ||
Likert assessment on generated text rather than a methodological flaw; we therefore report both group means and strict consensus for binary metrics.
Table V presents the output quality scores.
D. Response Time and Efficiency
Single-agent scenarios remain below 32 s end-to-end in both tiers. Multi-agent scenarios pay a coordination cost, M+FULL reaches 183.1 s (T1) and 164.6 s (T2), driven primarily by KB injection: M+KB and M+FULL consume ~49-53K input tokens per query against ~8–12K without KB, reducing Tier 1 throughput from 59-66 to 46-50 tokens/s. The M+KB Tier 2 latency (474.0 s) is anomalously high relative to M+FULL in the same tier with near-identical input/output token volumes; we report it as an outlier and refrain from causal interpretation. This value was not excluded from the reported mean; the median () latency metric used for all other comparisons is robust to such single-run anomalies.
Table VI reports the latency and token efficiency metrics.
VI. DISCUSSION
Full multi-agent orchestration shows its largest observed gains on resource-constrained local hardware (+6.1 pp EX-R over the strongest single-agent baseline), where privacy also requires on-premises execution. On frontier models, individual components remain beneficial, but combining all of them no longer consistently outperforms simpler configurations, suggesting that orchestration should be applied selectively at larger model scales.
Self-correction and domain knowledge address complementary failure modes. Self-correction improves executability through iterative repair but saturates as baseline ESR increases, becoming marginal for the frontier model. Domain knowledge instead improves semantic correctness by guiding schema and threshold selection, remaining effective across both tiers. Their interaction is not fully additive: KB injection slightly reduces executability in some cases, indicating that additional context can occasionally interfere with schema linking. Finally, the frontier model often generates semantically correct queries containing auxiliary columns that conservative execution metrics penalize, while human evaluation confirms that multi-agent decomposition preserves explanation quality despite LLM-judge underestimation of groundedness.
Our evaluation is bounded by a single-deployment corpus drawn from one industrial operator, a fixed zero-shot prompt configuration with no few-shot examples provided to any agent, and a single LLM family (Qwen 3.5); future work includes expanding the corpus across multiple operators and geographies, cross-operator evaluation under different regulatory frameworks, few-shot prompting with domain-specific exemplars, agent fine-tuning on in-domain NL-to-SQL pairs, and broadening the range of evaluated models to other open-weight families.
VII. CONCLUSION
We present OpenMeter, a privacy-preserving multi-agent system that enables non-technical utility personnel to query industrial smart meter databases in natural language using local open-weight models, ensuring that no telemetry or query content leaves the operator's infrastructure. A six-scenario ablation study on a real industrial partner's deployment shows that full multi-agent orchestration shows its largest observed benefits under resource-constrained local hardware, while at
TABLE V
OUTPUT QUALITY SCORES (LIKERT 1–5). GRD = GROUNDNESS, REL = RELEVANCE, COH = COHERENCE, ALN = VIZ-TEXT ALIGNMENT, PRS = VIZ PRESENTATION. LLM = LLM-AS-A-JUDGE (N=3, MEDIAN), HUMEV = HUMAN EVALUATORS (4 RATERS, 2 BLINDED GROUPS; AGGREGATE = MEAN OF GROUP MEANS). BOLD = BEST PER METRIC WITHIN EACH TIER AND EVALUATION METHOD.
| Arch. | Scen. | Eval | Tier 1 (Local, 9 B) | Tier 2 (Frontier, 397 B) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Grd | Rel | Coh | Align | Pres | Grd | Rel | Coh | Align | Pres | |||
| Single | S-Base | LLM | 3.53 | 4.45 | 4.56 | 3.30 | 3.02 | 4.03 | 4.65 | 4.86 | 3.87 | 3.41 |
| S+SC | LLM | 3.67 | 4.54 | 4.72 | 3.47 | 3.05 | 4.14 | 4.68 | 4.93 | 4.05 | 3.40 | |
| HumEv | 4.41 | 3.80 | 4.30 | 4.15 | 3.27 | 4.57 | 3.91 | 4.14 | 3.27 | 3.00 | ||
| Multi | M-Base | LLM | 4.51 | 4.66 | 4.74 | 3.67 | 3.26 | 4.64 | 4.80 | 4.91 | 3.95 | 3.67 |
| M+SC | LLM | 4.46 | 4.61 | 4.69 | 3.69 | 3.26 | 4.59 | 4.79 | 4.90 | 3.95 | 3.71 | |
| M+KB | LLM | 4.21 | 4.63 | 4.72 | 3.92 | 3.56 | 4.29 | 4.68 | 4.94 | 3.93 | 3.75 | |
| M+Full | LLM | 4.13 | 4.51 | 4.52 | 3.57 | 3.35 | 4.24 | 4.74 | 4.91 | 3.97 | 3.70 | |
| HumEv | 4.41 | 3.80 | 3.86 | 3.69 | 3.19 | 4.54 | 4.11 | 4.05 | 4.29 | 3.17 | ||
TABLE VI
RESPONSE TIME AND TOKEN EFFICIENCY ACROSS SCENARIOS AND TIERS. = END-TO-END LATENCY (S); = THROUGHPUT (TOK/S); , = INPUT AND OUTPUT TOKENS PER QUERY. ALL VALUES ARE MEDIANS () OVER POOLED QUERIES ACROSS 5 RUNS (245 QUERIES PER CONDITION). BOLD = BEST () AND THPT () PER TIER.
| Arch. | Scen. | Tier 1 (Local, 9 B) | Tier 2 (Frontier, 397 B) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Thpt | Thpt | ||||||||
| Single | S-Base | 22.5 | 57.1 | 27 796 | 1 280 | 27.6 | 73.5 | 30 315 | 1 965 |
| S+SC | 31.9 | 60.2 | 34 340 | 1 914 | 28.2 | 72.4 | 30 332 | 1 926 | |
| Multi | M-Base | 88.5 | 59.4 | 8 425 | 5 088 | 132.9 | 54.4 | 8 911 | 6 837 |
| M+SC | 135.2 | 66.1 | 11 953 | 8 424 | 128.7 | 61.5 | 8 956 | 7 416 | |
| M+KB | 144.4 | 46.3 | 49 780 | 6 494 | 474.0 | 20.7 | 49 289 | 10 208 | |
| M+Full | 183.1 | 50.5 | 53 047 | 9 379 | 164.6 | 68.6 | 49 592 | 10 421 | |
frontier scale individual components remain effective but selective activation is preferable.
Beyond system performance, our results suggest that automated evaluation metrics may underestimate the practical utility of LLM-generated SQL in industrial settings. The evaluation data are available upon request via Zenodo.
ACKNOWLEDGMENT
This work has received funding from the European Union's Horizon Europe programme through the ENFIELD project (Grant Agreement No. 101120657). Know Center is a COMET competence center that is financed by the Austrian Federal Ministry of Innovation, Mobility and Infrastructure (BMIMI), the Austrian Federal Ministry of Economy, Energy and Tourism (BMWET), the Province of Styria, the Steirische Wirtschafts- förderungsgesellschaft m.b.H. (SFG), the Vienna business agency and the Standortagentur Tirol. The COMET programme is managed by the Austrian Research Promotion Agency FFG. The authors thank Iskraemeco for providing the industrial smart meter datasets and domain expertise that enabled the evaluation of this work.
REFERENCES
[1] D. Gao et al., "Text-to-SQL empowered by large language models: A benchmark evaluation," Proc. VLDB Endow., vol. 17, no. 5, pp. 1132–1145, 2024.
[2] B. Ni et al., "Intelli-Dispatch-SQL: An LLM-based agent for reliable text-to-SQL in power dispatching," Energy AI, vol. 22, art. 100500, 2025.
[3] L. Dong et al., "Exploring the capabilities and limitations of large language models in the electric energy sector," Joule, vol. 8, no. 6, pp. 1539–1555, 2024.
[4] J. He, C. Treude, and D. Lo, "LLM-based multi-agent systems for software engineering: Literature review, vision and the road ahead," ACM Trans. Softw. Eng. Methodol., vol. 34, no. 4, pp. 1–72, 2025.
[5] S. Feng, C. Lin, S. Shankar, and B. Howe, "LLM-based human-agent collaboration for complex task solving," in Proc. EMNLP, 2024, pp. 1–16.
[6] M. Cemri et al., "Why do multi-agent LLM systems fail?," in Proc. NeurIPS, 2025.
[7] F. Lei et al., "Spider 2.0: Evaluating language models on real-world enterprise text-to-SQL workflows," in Proc. ICLR, 2025.
[8] J. Li et al., "Can LLM already serve as a database interface? A big bench for large-scale database grounded text-to-SQL," in Proc. NeurIPS, 2024.
[9] A. Nascimento, L. Carvalho, M. Kalinowski, and M. Lucena, "LLM-based text-to-SQL generation for real-world databases," SN Comput. Sci., vol. 6, no. 2, art. 145, 2025.
[10] X. Wang, H. Wang, B. Bhandari, and L. Cheng, "AI-empowered methods for smart energy consumption: A review of load forecasting, anomaly detection and demand response," Int. J. Precis. Eng. Manuf.-Green Technol., vol. 11, pp. 963–993, 2024.
[11] R. Machlev et al., "Explainable artificial intelligence (XAI) techniques for energy and power systems: Review, challenges and opportunities," Energy AI, vol. 9, art. 100169, 2022.
[12] H. T. Gamage et al., "Multi-agent RAG chatbot architecture for decision support in net-zero emission energy systems," in Proc. IEEE ICIT, 2024, pp. 1–6.
[13] L. Huang et al., "A survey on hallucination in large language models:
Principles, taxonomy, challenges, and open questions," ACM Trans. Inf. Syst., vol. 43, no. 2, pp. 1–55, 2025.
[14] S. Ojuri, T. A. Han, R. Chiong, and A. Di Stefano, "Optimizing text-to-SQL conversion techniques through the integration of intelligent agents and large language models," Inf. Process. Manage., vol. 62, no. 3, art. 103789, 2025.
[15] A. Quamar, V. Efthymiou, and C.-L. Chai, "Natural language interfaces to data," Found. Trends Databases, vol. 11, no. 4, pp. 319–414, 2022.
[16] S. Tonyali, K. Akkaya, N. Saputro, A. S. Uluagac, and M. Nojoumian, "Privacy-preserving protocols for secure and reliable data aggregation in IoT-enabled smart metering systems," Future Gener. Comput. Syst., vol. 78, pp. 547–557, 2018.
[17] Z. Zaman, P. Gauravaram, S. Jha, and W. Hu, "Privacy-preserving smart metering through data synthesis with differential privacy," in Proc. ACM BuildSys, 2025, pp. 1–11.
[18] M. Ali et al., "Hierarchical multi-agent energy management system using a group teaching optimization algorithm for grid-connected microgrids," Sci. Rep., vol. 15, art. 8890, 2025.
[19] H. Xiao and W. Xu, "An LLM-based multi-agent framework for building energy efficiency," Energy Build., vol. 312, art. 114210, 2024.
[20] S. Madani, A. Tavasoli, Z. Khoshtarash Astaneh, and P.-O. Pineau, "Large language models integration in smart grids," 2025, arXiv preprint arXiv:2504.00459.
[21] CENELEC, "Voltage characteristics of electricity supplied by public electricity networks," Standard EN 50160:2010+A3:2019, Belgium, 2019.
[22] IEC, "Electricity metering-Data exchange for meter reading, tariff and load control (DLMS/COSEM)," Standard IEC 62056 series, Switzerland, 2002-2017.