Skip to content
Database entryUsesLevel 3 of 6 useUse, level 3 of 6Used to calculate 9 entries, level 4Calculated with 4 entries, levels 1 and 2Database structure

Generate a function

The assistant reads the instruction and the open file, about 300 lines, then writes a function of about 40 lines. Projet Celsius estimate.

  • "Read 1,000 tokens" accounts for 65% of emissions in this scenario.
  • The calculation covers the model reading and writing tokens, and data centre cooling.
  • Out of scope: server manufacturing, model training, the network and the user's device.
Calculated with
Used to calculate

Breakdown of emissions by item

0.54 gCO2e in total: 1.2 Wh of electricity × 458 gCO2e/kWh (servers worldwide).

Inputs of the calculation 3

PUE of the data centre, Read 1,000 tokens, Write, with reasoning

Annual emissions from generating a function, by frequency

840 times a yearas much as one phone charge per weekone phone charge per week, over a year, 450 gCO2eCode suggestion, 0.031 gCO2eQuick question, 0.14 gCO2eGenerate a function, 0.54 gCO2eCreate an image, 1.5 gCO2eSummarise a meeting, 14 gCO2eDeep research, 45 gCO2eCode agent hour, 310 gCO2e0.01 gCO2e0.1 gCO2e1 gCO2e10 gCO2e100 gCO2e1 kgCO2e10 kgCO2e100 kgCO2e1 tCO2e10 tCO2e1101001,00010,000Number of uses per year
Reading: at 840 uses per year, "Generate a function" weighs as much as charging a phone once a week. Carbon footprint (CO2e) over one year, by number of uses. Each use is a straight line; "Generate a function" is highlighted, with the chosen parameters, and compared with 6 reference uses at their default settings; the solid line is one phone charge per week over a year, and the point where the task reaches it. Servers worldwide. Calculation from the Projet Celsius AI Impact Database.

Comparison with the other uses

The topic "Code and agents"
  1. Code suggestion0.031 gCO2e, 0.06 times the value of "Generate a function"
  2. Automated workflow0.11 gCO2e, 0.2 times the value of "Generate a function"
  3. Generate a function0.54 gCO2e
  4. Have code reviewed0.59 gCO2e, 1.1 times the value of "Generate a function"

↓ The heaviest use in the topic, "Coding agent hour": 310 gCO2e, 570 times more

Emissions of one use, linear scale, 4 of the 6 uses in the topic, those of the same order of magnitude (at most 25 times between the smallest and the largest value). For calculated values, servers worldwide.

Characteristics

Unit1 function
Default locationworld, 458 gCO2e/kWh (Ember 2025, life cycle); 11 other locations to choose from
Countedthe model reading and writing tokens, and data centre cooling
Not countedserver manufacturing, model training, the network and the user's device
Statusestimated
All the characteristics identifier, version, rule for the value, sources, licence
IdentifierIA-0218, projetcelsius.com/en/ai/database/IA-0218/
Version0.1 of 2 November 2026
CategoryUses, a request to AI
Choice of the selected valuedatabase calculation from the entries this one is made of, at the quantities of the unit
Sourcescalculation of the database
LicenceCC BY 4.0
Projet Celsius, environmental strategy consultancy

We support companies that account for AI in their Bilan Carbone®

Visiter Projet Celsius ↗