## Inspiration

Our inspiration for Sustain-ify came from observing the current state of our world. Despite incredible advancements in technology, science, and industry, we've created a world that's becoming increasingly unsustainable. This has a domino effect, not just on the environment, but on our own health and well-being as well. With rising environmental issues and declining mental and physical health, we asked ourselves: *How can we be part of the solution?*

We believe that the key to solving these problems lies within us—humans. If we have the power to push the world to its current state, we also have the potential to change it for the better. This belief, coupled with the idea that *small, meaningful steps taken together can lead to a big impact*, became the core principle of Sustain-ify.

## What it does

Sustain-ify is an app designed to empower people to make sustainable choices for the Earth and for themselves. It provides users with the tools to make sustainable choices in everyday life. The app focuses on dual sustainability—a future where both the Earth and its people thrive.

Key features include:

1. **Eco Shopping Assistant**: Guides users through eco-friendly shopping.
2. **DIY Assistant**: Offers DIY sustainability projects.
3. **Health Reports**: Helps users maintain a healthy lifestyle.

## How we built it

Sustain-ify was built with a range of technologies and frameworks to deliver a smooth, scalable, and user-friendly experience.

Technical Architecture:

Frontend Technologies:

* Frameworks: Flutter (Dart), Streamlit (Python) were used for the graphical user interface (GUI/front-end).
* Services in Future: Integration with third-party services such as Twilio, Lamini, and Firebase for added functionalities like messaging and real-time updates.

Backend & Web Services:

* Node.js & Express.js: For the backend API services.
* FastAPI: RESTful API pipeline used for HTTP requests and responses.
* Appwrite: Backend server for authentication and user management.
* MongoDB Atlas: For storing pre-processed data chunks into a vector index.

Data Processing & AI Models:

* ScrapeGraph.AI: LLM-powered web scraping framework used to extract structured data from online resources.
* Langchain & LlamaIndex: Used to preprocess scraped data and split it into chunks for efficient vector storage.
* BGE-Large Embedding Model: From Hugging Face, used for embedding textual content.
* Neo4j: For building a knowledge graph to improve data retrieval and structuring.
* Gemini gpt-40 & Groq: Large language models used for inference, running on LPUs (Language Processing Units) for a sustainable inference mechanism.

Additional Services:

* Serper: Provides real-time data crawling and extraction from the internet, powered by LLMs that generate queries based on the user's input.
* Firebase: Used for storing and analyzing user-uploaded medical reports to generate personalized recommendations.

Authentication & Security:

* JWT (JSON Web Tokens): For secure data transactions and user authentication.

## Challenges we ran into

Throughout the development process, we faced several challenges:

1. Ensuring data privacy and security during real-time data processing.
2. Handling large amounts of scraped data from various online sources and organizing it for efficient querying and analysis.
3. Scaling the inference mechanisms using LPUs to provide sustainable solutions without compromising performance.

## Accomplishments that we're proud of

We're proud of creating an app that:

1. Addresses both environmental sustainability and personal well-being.
2. Empowers people to make sustainable choices in their everyday lives.
3. Provides practical tools like the Eco Shopping Assistant, DIY Assistant, and Health Reports.
4. Has the potential to create a big impact through small, collective actions.

## What we learned

Through this project, we learned that:

1. Sustainability isn't just about making eco-friendly choices; it's about making *sustainable lifestyle* choices too, focusing on personal health and well-being.
2. Small, meaningful steps taken together can lead to a big impact.
3. People have the power to change the world for the better, just as they have the power to impact it negatively.

## What's next for Sustain-ify

Moving forward, we aim to:

1. Continue developing and refining our features to better serve our users.
2. Expand our user base to increase our collective impact.
3. Potentially add more features that address other aspects of sustainability.
4. Work towards our vision of creating a sustainable future where both humans and the planet can flourish.

Together, we believe we can create a sustainable future where both humans and the planet can thrive. That's the ongoing mission of Sustain-ify, and we're excited to continue bringing this vision to life!
## Inspiration

Sustainability is one of the core pillars of modern progress. We wanted to address this challenge by thinking about how we could allow for substantial improvement in sustainability by optimizing an existing system. That's why we landed on LLMs: their **meteoric rise in popularity** has changed the way millions of people search for and learn information. That being said, LLMs are **extremely inefficient**when it comes to the compute required for inference. With hundreds of millions of people relying on them for day-to-day searches, it is evident that we have reached a scale where **sustainability needs to be carefully considered**. We asked ourselves, how can we make LLMs more sustainable? Can we quantify that cost so users can understand how many resources they use/save? The key to the idea is the fact that we wanted to propose a way to **dramatically improve sustainability with almost zero-effort required** from the user's side. These are the principles that make our proposal both practical and most impactful.

## What it does

In essence, we leverage **vector embeddings to make LLMs more sustainable**. Everyday, just on chatGPT, there are over 10 million queries made. Even over a small period of time, query overlap is inevitable. Currently, LLMs run inference on every single query. This is unnecessary, especially when it comes to objective queries that are similar to one another. Instead of relying on inference by default, we **rely on vector-based similarity search** first. This approximately takes **1/15 of the compute** that normal compute would take per query on chatGPT. Now, what makes LLMs desirable is their customization of responses. We didn’t want to lose this vital component by solely relying on embedded vector search. Thus, we give the user an option if they would like more information, and this defaults to a traditional LLM query. Thus, our approach allows for sustainability that is orders of magnitude higher than before, **without compromising what people like most about LLMs**.

## How we built it

For embeddings and our vector database, we used Pinecone. Our app is created with NextJS (ReactJS, TailwindCSS, NodeJS). We utilize the OpenAI api for traditional query requests. For our similarity search, we used cosine-similarity, and given that a query crosses our significance threshold, we return top 0-3 such queries for any given user input.

## Challenges we ran into

This was our first time working with embeddings and a vector database. Thus, we had some issues with setup and adding a new embedding to the overall vector space. We wanted the space to be dynamic so that answers generated for users can be shared by all users if someone were to ask a similar query in the future. Other than that, integrating all the required APIs was a challenge as some functions were async while others weren’t which caused state-update issues. Luckily, with some debugging, we were able to sort it out.

## Accomplishments that we're proud of

Our final version is a **fully-functional prototype** of our idea. We are also astonished by the real statistics behind the resources our system can potentially save. Additionally, we took UI extremely seriously because we wanted a system that was **intuitive and appealing** for users to use. We also wanted a clear way for them to see the benefit of using our platform. We believe we have accomplished this in a simple, yet capable UI experience.

## What we learned

We learned about how to use vector embeddings for similarity search. We also learned how to tweak the confidence threshold such that the relevant responses actually match the queries we are looking for. Above all else, we learned just how many resources are used in day-to-day usage of ChatGPT. When starting this project, we had a prediction about LLM resource consumption, but we completely underestimated just how large it would be. These learnings made us realize that **our project can have even more impact** than we had anticipated.

## What's next for SustainLLM

We want to take the same processes and **apply them to other modalities** like audio and image generation. These modalities require significantly more compute than text generation, and if we could save even a small percentage of that compute, it could lead to drastic results. We are aware that creativity is a pivotal part of audio and image generation, and so we would use embeddings for lower-level things such as different pixel patterns or phonetics. That way, each generation can still be unique while consuming fewer resources.

**Let’s save the environment, one LLM query at a time :)**
## Inspiration

We often want to read certain manga because we are interested in their stories, but are completely barred from doing so purely because there is no translation for them in English. As a result, we decided to make our own solution, in which we take the pages of the manga, translate them, and rewrite them for you.

## What it does

It takes the image of the manga page and sends it to a backend. The backend first uses a neural network trained with thousands of cases of actual manga to detect the areas of writing and text on the manga. Then, the server clears that area out of the image. Using Google Cloud Services, we then take the written Japanese and translate into English. Lastly we rewrite that English in its corresponding postitions on the original image to complete the manga page.

## How we built it

We used python and flask with a bit of html and css for the front end Web server. We used Expo to create a mobile front end as well. We wrote the backend in python.

## Challenges we ran into

One of the challenges was properly using Expo, a service/platform new to us, to fit our many needs. There were some functionalities we wanted that Expo didn't have. However, we found manual work-arounds.

## Accomplishments that we're proud of

We are proud of successfully creating this project, especially because it was a difficult task. The fact that we successfully completed a working product that we can consider using ourselves makes this accomplishment even better.

## What we learned

We learned a lot about how to use Expo, since it was our first time using it. We also learned about how to modify images through python along the way.

## What's next for Kero

Kero's front-end can be expanded to look nicer and have more functionality, like multiple images at once for translating a whole chapter of a manga.