# Preprint reports prompting can reduce energy used by AI-generated code

_Published Monday, October 26, 2026 at 11:13 AM EDT · AI, Science · Latest · Tier 2 — Notable_

Researchers report in an arXiv preprint that selected prompting strategies reduced the execution energy consumed by AI-generated code by up to 25% for Python and 17% for C++ across the models evaluated. They examined 21 prompting strategies and selected 8 for evaluation across 10 open-weight and proprietary language models against a baseline prompt.

Results varied by model and language. For Granite-4.0-H-Small, reductions reached up to 50% for Python and 57% for C++. The study measures the energy used to execute generated code; its reported reductions depend on the prompting strategy, model and programming language.

## Sources

- [cs.AI updates on arXiv.org](https://arxiv.org/abs/2610.02571)

---
Canonical: https://techandbusiness.org/newswire/fIzRb9tW3uGEtR3gZxyhE6
Published: 2026-10-26T15:13:58.326Z
Story chronology: 2026-10-26T04:00:00.000Z
Retrieved: 2026-10-26T18:03:56.830Z
Publisher: Tech & Business (techandbusiness.org)
