This Project submitted to Philly Codefest 2025
Project: GreenPrompts
Project Type: Beginner
Location: B15
Do you use ChatGPT or any other generative AI chatbot? How often in a day? Every time you enter a prompt, it consumes energy—about 2.9 watt-hours per request. That’s enough to power a lightbulb for 17 minutes—17 minutes of potential darkness somewhere in the world. We realized that asking big corporations to cut AI energy consumption would be a long, uncertain battle. So why not start with something we can control? That’s why we built GreenPrompts, a Chrome extension that helps you use AI more efficiently. It refines your input into a sharper, more effective prompt—reducing unnecessary energy waste while improving results. Less waste, better AI. Our vision? By the AI, for the AI, of the AI.
- Inspiration Behind GreenPrompts: We were inspired by the inefficiencies of repetitive or vague AI prompts—wasting computational energy while frustrating users. As AI’s energy footprint grows in 2025, we envisioned GreenPrompts—a Chrome extension designed to streamline prompts, reduce energy consumption, and improve usability. Our goal? To fuse sustainability with tech innovation, making AI interactions smarter and greener. - What It Does: GreenPrompts refines AI prompts for efficiency and sustainability. Users input a query (e.g., “tell us about stack, tech, and language”), and it generates a sharper, more effective version—displayed in an interactive carousel. It also estimates energy savings and visualizes the impact through an animated savings bar. - How We Built It: Tech Stack: 1. Frontend: HTML (popup.html), CSS (style.css—Lush Forest Theme 3.0), JavaScript (popup.js for carousel, content.js for applying prompts). 2. Backend: Node.js with Express (index.js), Google Gemini API (gemini-1.5-flash), dotenv for API keys, manifest.json 3. Chrome Extensions API: Utilizes chrome.storage for API keys, chrome.runtime for messaging, and chrome.tabs for integration with AI Studio. 4. Process: We developed a method to calculate energy savings based on prompt efficiency—factoring in the number of refinements, complexity, and specificity. The refined prompts lead to noticeable reductions in AI energy consumption while improving response quality. - Challenges & Lessons: Developing an effective optimization method required balancing realism with multiple factors like prompt complexity and specificity. Along the way, we encountered backend setup issues, API key errors, and CSS caching delays. These challenges taught us key debugging skills, including error logging, server setup, and extension reloading for smoother performance. - Accomplishments We’re Proud Of: 1. Prompt Optimization: Clean, multi-prompt carousel from Gemini. 2. Energy Insight: A real-time savings tracker that quantifies reduced energy use.. 3. Stunning UI: Lush Forest Theme 3.0—forest gradients, leaf drift, carousel, savings bar. - What’s Next: 1. Inline Chrome Extension: Evolve GreenPrompts into an inline tool that automatically connects to AI input fields (e.g., ChatGPT, Google AI Studio), optimizing prompts in real-time. 2. Energy Stats Database: Build a database to track and display energy savings stats (e.g., total joules saved), enhancing the eco-narrative with data-driven insights.
Frontend: Chrome extension (HTML, CSS, JS), Backend: Node.js + Express , External API: Google Gemini (gemini-1.5-flash), dotenv for API keys, manifest.json, Communication: Extension (popup.js) fetches from backend (http://localhost:3000/optimize) via HTTP POST, Formula: E = 10440 J * (p - 1) * (I + (C - S))
Selected Prizes
-
The Social Impact Innovation Award recognizes the team that has developed a project with the potential to create significant positive change in society. This award celebrates innovative solutions that address pressing social issues, improve quality of life, and promote sustainability.
