Carbon Footprint Evaluation of Code Generation through LLM as a Service
As AI code generation is increasingly deployed in high-reliability domains such as automotive systems, quantifying its embodied carbon (from development) and operational carbon (from execution) has become critically urgent. Method: This paper introduces the first code-level, full-lifecycle carbon footprint assessment framework tailored for LLM-based coding services—exemplified by GitHub Copilot—integrating hardware-aware and software-aware carbon modeling with established software sustainability metrics to yield a reproducible empirical evaluation pipeline. Contribution/Results: We demonstrate that carbon impact varies significantly across usage scenarios; moreover, green coding strategies substantially reduce functional carbon intensity (e.g., gCO₂e per feature or per executed line). This work delivers the first measurable, verifiable carbon assessment methodology for AI-generated code in safety-critical domains, enabling evidence-based green AI development practices and informing sustainable AI policy formulation.