Asking AI for efficient code made it up to ninety-two percent more efficient.
LLMs write code that passes tests but can be wasteful. GreenCode's EnergyBench found prompt changes can make generated code up to 91.9% more energy-efficient, but often at the cost of accuracy; in some cases removing half the problem description made code over four times more efficient while correctness dropped to zero.
GreenCode researchers found that asking AI for efficient code often helps, but not every time.
GreenCode helps tackle this by publishing EnergyBench, a benchmark that scores AI-written code for correctness and for the energy it uses. GreenCode also keeps its own AI lean, with small models and each request sent to the smallest capable component. More on this.
Share this