Inspiration

Electricity bills tell us how much energy we used and how much we owe, but they rarely help us understand the environmental impact of that usage or what practical actions we can take next.

EcoBill AI was built around a simple question: What if an ordinary electricity bill could become a personalized climate action plan?

For the Earth Forward theme, I wanted to make household sustainability more understandable and actionable. Instead of showing users only abstract climate statistics, EcoBill AI starts with something they already receive every month — their electricity bill.

What it does

EcoBill AI converts electricity bill data into transparent carbon insights and personalized energy-saving recommendations.

Users can either upload an electricity bill in PDF, JPG, or PNG format or enter their electricity usage manually.

When a bill is uploaded, Gemini extracts useful facts such as:

  • billing period
  • electricity usage in kWh
  • bill amount
  • state / grid region
  • electricity provider

The extracted information is shown back to the user with confidence indicators and source evidence so they can review and edit it before continuing.

After confirmation, EcoBill AI uses a deterministic calculation engine to calculate:

  • estimated monthly carbon emissions
  • annual electricity usage and emissions
  • effective electricity tariff
  • household usage benchmark
  • 5%, 10%, 15%, and 20% reduction scenarios
  • estimated bill savings
  • estimated CO₂ reduction

Gemini then generates practical, personalized energy-saving actions based on the user's consumption profile.

A key design principle of EcoBill AI is:

AI extracts and explains. Deterministic calculations handle energy and carbon estimates.

This prevents the AI model from inventing important numerical results.

How we built it

EcoBill AI is built with Next.js, TypeScript, Tailwind CSS, the Google Gemini API, and Vercel.

The application has two different intelligence layers.

AI Layer

Gemini is used through the Google GenAI Interactions API for:

  1. extracting structured information from uploaded electricity bills
  2. generating personalized energy-saving recommendations

Uploaded bill content is treated as untrusted input, and the extraction flow is restricted to identifying bill facts rather than performing carbon or financial calculations.

Users review extracted information before it is used for analysis.

Deterministic Climate Engine

All carbon, electricity, tariff, projection, and savings calculations are handled separately in a deterministic TypeScript calculation engine.

The engine uses:

Carbon Emissions = Electricity Usage × Grid Emission Factor

This architecture makes the calculations inspectable and reproducible instead of depending on an LLM for numerical answers.

Recommendation Guardrails

One interesting challenge was preventing the AI from assuming that a household owns appliances that were never mentioned.

For example, EcoBill AI does not simply tell someone to change their air-conditioner settings if ownership is unknown.

Instead, it phrases the recommendation conditionally:

“If You Use Air Conditioning: Optimize Temperature Settings.”

A validation and normalization layer also checks generated recommendations before they are displayed.

Challenges we ran into

The biggest technical challenge was deciding which tasks should use AI and which should remain deterministic.

Allowing an LLM to calculate emissions or financial savings would make the system less transparent and could introduce numerical hallucinations.

I therefore separated the AI extraction/recommendation layer from the calculation engine.

Another challenge was making bill extraction trustworthy. Rather than silently accepting AI-generated values, EcoBill AI displays extracted fields, confidence levels, and supporting evidence and asks the user to confirm them.

I also added safeguards for unconfirmed appliance ownership, upload validation, server-side API key handling, and graceful manual-entry fallback.

Accomplishments that we're proud of

I am especially proud that EcoBill AI is a complete working application rather than only a concept or UI prototype.

The final application includes:

  • real Gemini-powered bill extraction
  • editable extracted fields with confidence indicators
  • deterministic carbon and savings calculations
  • household consumption benchmarking
  • interactive reduction scenarios
  • real Gemini-powered personalized recommendations
  • recommendation safety guardrails
  • a working manual-entry fallback
  • a deployed production application

The project also has 19 automated tests, a clean ESLint check, and a successful production build.

What we learned

Building EcoBill AI taught me that AI does not need to control every part of an AI application.

A hybrid architecture can be much more reliable:

Use AI where interpretation and explanation are valuable, and deterministic code where precision and reproducibility matter.

I also learned more about structured AI outputs, server-side AI integrations, prompt-injection resistance, confidence-aware UX, validation layers, and designing AI features that clearly communicate uncertainty to users.

What's next for EcoBill AI

There are several ways EcoBill AI could grow beyond this prototype.

Future improvements could include:

  • more thoroughly verified region-specific grid emission factors
  • historical electricity bill tracking
  • month-to-month consumption comparisons
  • optional appliance profiles for more precise recommendations
  • multilingual climate-action guidance
  • downloadable household climate reports
  • renewable-energy and rooftop-solar scenarios
  • personalized progress tracking over time

The long-term vision is to turn EcoBill AI from a one-time bill analyzer into a simple household climate companion that helps people understand their electricity use and take measurable action over time.

Built With

Share this project:

Updates

Submission history