Project Story: Optimizing Energy Usage with AI

What Inspired Us

We were inspired by the increasing demand for energy efficiency and sustainability, especially in schools and institutions. Rising energy costs and environmental concerns motivated us to create a tool that empowers organizations to predict energy usage and implement cost-saving, eco-friendly solutions. Our aim was to make energy optimization accessible, actionable, and impactful.


What We Learned

  • AI Collaboration: We gained a deeper understanding of working with OpenAI APIs, crafting precise prompts, and handling varied outputs.
  • Energy Insights: Analyzing real-world energy data taught us about usage patterns and the effectiveness of sustainability measures.
  • Full-Stack Development: We honed our skills in Flask for the backend and dynamic frontend visualization using Chart.js.
  • Error Handling: Addressing parsing challenges with AI responses improved our debugging and error-handling capabilities.

How We Built Our Project

  1. Backend:

    • Flask powers the backend, managing user input, data processing, and API interactions with OpenAI.
    • Energy data predictions for electricity, gas, steam, and total usage are generated using AI based on historical data and user inputs.
  2. Frontend:

    • A user-friendly interface collects building-specific details, such as square footage, occupancy, and HVAC efficiency.
    • Results are visualized with dynamic charts and eco-friendly suggestions displayed in real-time.
  3. Data Integration:

    • We used JSON files containing borough-specific historical energy data.
    • AI-generated predictions and suggestions are validated and rendered dynamically on the frontend.
  4. OpenAI Integration:

    • The model predicts energy consumption for the next 12 months and provides tailored, actionable suggestions for reducing costs and environmental impact.

Challenges We Faced

  • Parsing AI Responses: OpenAI's output often had inconsistent formats, requiring robust parsing and validation logic.
  • API Call Latency: Individual requests for each energy feature led to slower responses. We resolved this by batching requests to improve efficiency.
  • Dynamic Frontend Integration: Ensuring smooth interaction between backend predictions and frontend updates required careful synchronization.

The Outcome

Our app equips schools and institutions with:

  • Accurate Energy Predictions: 12-month forecasts for energy usage across multiple features.
  • Eco-Friendly Suggestions: Personalized recommendations, like HVAC upgrades or better insulation, for cost and energy savings.
  • Empowerment: A tool that makes data-driven, sustainable energy decisions accessible and actionable.

This project taught us the importance of merging technology, data, and user experience to address real-world problems effectively.

Built With

Share this project:

Updates