A paper-to-code agentic framework for energy communities: data-driven decision support using LLMs as scientific translators rather than generative approximators
Adela Bâra, Simona-Vasilica OpreaPurpose
The complexity of energy communities (EC) and the growing body of scientific literature on energy sharing (ES), value sharing (VS) and local electricity market (LEM) mechanisms create a significant gap between theoretical model development in scientific papers and practical implementation. To address this gap, the authors’ paper aims to propose a Paper-to-Code agentic framework for EC that translates peer-reviewed scientific literature into executable models for data-driven decision support.
Design/methodology/approach
Paper-to-Code integrates large language models, vector-based knowledge retrieval and expert supervision to formalize the ES/VS/LEM described in publications into validated specifications, pseudocode and modular code implementations.
Findings
The framework enables EC to benchmark alternative operational and market strategies under identical data conditions, bridging the gap between research and digital solutions for EC decision-making. Across 200 scientific papers, 3 EC test cases, 100 profiling conversations and 30 expert-evaluated simulations, the framework achieved: near-perfect grounding (≈0.97–1.00), high algorithm preservation (≥0.96), ≥95% profiling and recommendation consistency, expert validation (≈9/10 usefulness score).
Originality/value
These models are applied to EC data sets through an agent-based simulation environment, where community-specific objectives such as cost minimization, self-consumption maximization and grid dependence reduction are evaluated. By coupling automated knowledge extraction with expert-in-the-loop validation and operational simulation, Paper-to-Code ensures traceability and reproducibility.