Prompt engineering and its implications on the energy consumption of Large Language Models

Reducing the environmental impact of AI-based software systems has become critical. The intensive use of large language models (LLMs) in software engineering poses severe challenges regarding computational resources, data centers, and carbon emissions. In this paper, we investigate how prompt engineering techniques (PETs) can impact the carbon emission of the Llama 3 model for the code generation task. We experimented with the CodeXGLUE benchmark to evaluate both energy consumption and the accuracy of the generated code using an isolated testing environment. Our initial results show that the energy consumption of LLMs can be reduced by using specific tags that distinguish different prompt parts. Even though a more in-depth evaluation is needed to confirm our findings, this work suggests that prompt engineering can reduce LLMs’ energy consumption during the inference phase without compromising performance, paving the way for further investigations.

Authors

Institutions

Publication Details

Published
2025-04-29
DOI
https://doi.org/10.1109/greens66463.2025.00014
Citations
7
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
17.37
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Prompt engineering and its implications on the energy consumption of Large Language Models

Davide Di Ruscio, Claudio Di Sipio, Riccardo Rubei, Aicha Moussaid
7 citations
Topic Modeling
17.37
article

Prompt engineering and its implications on the energy consumption of Large Language Models

Davide Di Ruscio, Claudio Di Sipio, Riccardo Rubei, Aicha Moussaid
article en
7 citations

Abstract

Reducing the environmental impact of AI-based software systems has become critical. The intensive use of large language models (LLMs) in software engineering poses severe challenges regarding computational resources, data centers, and carbon emissions. In this paper, we investigate how prompt engineering techniques (PETs) can impact the carbon emission of the Llama 3 model for the code generation task. We experimented with the CodeXGLUE benchmark to evaluate both energy consumption and the accuracy of the generated code using an isolated testing environment. Our initial results show that the energy consumption of LLMs can be reduced by using specific tags that distinguish different prompt parts. Even though a more in-depth evaluation is needed to confirm our findings, this work suggests that prompt engineering can reduce LLMs’ energy consumption during the inference phase without compromising performance, paving the way for further investigations.

University of L'Aquila (IT)
Affordable and clean energy
Openalex Percentile: Top 1%
Topic Modeling
17.37
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Prompt engineering and its implications on the energy consumption of Large Language Models — Davide Di Ruscio, Claudio Di Sipio, et al. · (2025) | TGRS Research Map | TGRS