Inspiration
In an era of unprecedented climate change, the ability to understand and act on environmental data is no longer a niche scientific endeavor—it's a global imperative for businesses, policymakers, and researchers. However, this critical data is often fragmented, locked in dense scientific reports like the IPCC's assessments, or stored in complex databases that are inaccessible to non-experts.
We were inspired to build ClimateLens Pro, an AI-powered intelligence platform designed to democratize climate data. Our goal was to create a tool that could not only answer simple questions but could reason about a user's intent and provide deep, multi-faceted insights. We wanted to build an AI analyst that could read a report, query a database, and forecast the future, all through a single, intuitive conversational interface.
What it does
ClimateLens Pro acts as a "multi-engine" AI analyst. It uses a smart AI router powered by Google Gemini to understand a user's natural language question and dispatch it to one of four specialized engines:
- Qualitative RAG Engine: For complex questions about climate science, risks, and compliance, this engine reads a vector-indexed copy of the 186-page IPCC AR6 Synthesis Report stored in MongoDB Atlas to provide text-based summaries.
- Quantitative Text-to-SQL Engine: For questions about historical data, this engine uses Gemini to translate the user's request into a valid BigQuery SQL query. It can intelligently query multiple tables—one for national climate data and another for corporate ESG data—to generate dynamic charts and data cards on the fly.
- Predictive Engine: For forecasting questions, this engine uses a
scikit-learnLinear Regression model trained on historical data from Google BigQuery to provide AI-powered predictions for key metrics like CO2 emissions and GDP. - Live Weather Engine: For real-time physical risk assessment, this engine integrates with the OpenWeatherMap API to provide live weather conditions for any location in the world.
This unique architecture allows a user to seamlessly pivot from asking "What are the risks of sea-level rise?" to "Show me the CO2 trend for Germany" to "Forecast GDP for India" all in one conversation.
How we built it
Our journey was a sprint through the modern AI technology stack, with a strong focus on Google Cloud and its partners.
- Backend: The entire system is orchestrated by a Python Flask server.
- AI & ML: We used Google's Gemini Pro for all LLM tasks, including intent classification, summarization, and Text-to-SQL generation. The Vertex AI Embeddings API was used to create vector embeddings for our RAG pipeline, and Scikit-learn was used for our predictive modeling.
- Database & Data Warehouse: We chose a dual-database strategy. MongoDB Atlas was the perfect solution for storing and performing semantic vector searches on the unstructured text of the IPCC report. Google BigQuery served as our high-performance data warehouse for all structured national and corporate ESG data.
- Frontend: We built a polished and responsive user interface using Next.js, React, and Tailwind CSS, with dynamic data visualizations powered by Chart.js.
- Deployment: The full application is ready for deployment on the Google Cloud ecosystem, with the backend designed for Google Cloud Run and the frontend for Render.
Challenges we ran into
This was a journey of solving real-world development challenges:
- The "Hanging" UI: We faced a persistent bug where the frontend would hang without an error. Through systematic debugging, we traced this to subtle issues in React state updates and network request timeouts, which we solved by making our
fetchcalls more robust and our state management more explicit. - AI Hallucinations & Prompt Engineering: Our biggest challenge was "teaching" the AI. Initially, the Text-to-SQL engine would generate incorrect queries for complex questions. We overcame this through iterative prompt engineering, adding specific examples and constraints to the prompt to guide the LLM's reasoning process, especially for multi-table queries and ranking logic.
- The "Needle in a Haystack" Problem: Our RAG engine sometimes struggled to find the specific sentence needed to answer nuanced "why" questions in a massive document. This taught us about the inherent limitations of vanilla RAG and the importance of context retrieval.
- The DevOps Hurdle: We encountered every classic setup problem: missing compilers on Windows, incorrect cloud IAM permissions, and forgotten package dependencies. Overcoming these hurdles was a critical part of the development process.
Accomplishments that we're proud of
We are incredibly proud of building a fully functional, multi-engine AI system from the ground up in such a short time. Specifically, we're proud of:
- The Smart AI Router, which successfully classifies user intent.
- The Multi-Table Text-to-SQL Engine, which demonstrates an advanced AI capability.
- The Predictive Forecasting Engine, which adds another layer of intelligence to the platform.
- The Polished and Professional UI, which makes the complex backend feel intuitive and powerful.
What we learned
This project was a deep dive into the practical realities of building modern AI applications. We learned that a successful AI product is not just about the model, but about the entire system: robust data pipelines, resilient infrastructure, and meticulous prompt engineering. Most importantly, we learned the power of iterative testing and debugging to transform a simple prototype into a polished and impressive final product.
What's next for ClimateLens Pro
This hackathon project is the cornerstone of a much larger vision. The next steps are to build out the full suite of enterprise features:
- Geospatial Risk Mapping: Integrating Google Maps to visualize physical risks like floods and wildfires directly on an interactive map.
- Automated ESG Reporting: Using the AI to generate compliance-ready reports for frameworks like TCFD and CDP.
- Supply Chain Analysis: Expanding our database to model and track Scope 3 emissions across a company's entire supply chain.
We believe ClimateLens Pro has the potential to become an indispensable tool for any organization looking to navigate the complexities of climate change.
Built With
- ai
- bigquery
- css-frameworks:-flask
- css3
- flask
- google-bigquery-apis:-openweathermap-api
- google-cloud
- google-cloud-run
- google-vertex-ai-(gemini-pro-&-embeddings-api)-databases:-mongodb-atlas-(with-vector-search)
- googlegenerative
- html
- mongodb
- next.js
- openweathermap
- python
- react
- scikit-learn
- scikit-learn-platforms:-google-cloud-platform
- sql
- tailwind-css
- typescript
- vercel
- vercel-cloud-services:-google-cloud-run
- vertex
Log in or sign up for Devpost to join the conversation.