Inspiration

On the first night of Hoya Hacks, we ran into the Astronomy Club, and they offered to show us the Orion Nebula, and the feeling of astonishment we felt, we believed everyone should have access to, the ability to see shooting stars, eclipses, and constellations. As we all have a background in physics and/or astrophysics, we figured we could make something easy and accessible to the average Earthling, doing all the hard work and research so you don't have to.

For the name, we put a creative spin on the word "caret", which is just a symbol pointing up (in the place of the "a" in our logo/thumbnail)!

What it does

Karet has 2 main functionalities:

  1. Karet aggregates data from 5 astronomical APIs to create a comprehensive scheduled database of event notifications, with peak times (the best time to look up) for events such as meteor showers, based on Earth's axis, rotation, Georgetown's geographical location, and particular celestial event radiants.

For events with wider ranges, the Karet SMS service (powered by Twilio) sends an alert to be on the lookout throughout the day, but for events with more consistent ecliptics, the Karet SMS service is able to send messages just minutes before the event, telling the user to simply, "look up" and view the amazing work of our universe!

  1. Karet integrates "Galileo", a generative transformer model we created by fine-tuning the boilerplate OpenAI GPT3 on celestial data sets, events, and pre-trained astronomical ecliptic calculations, to provide insights into all things astronomy. In short, a somewhat smart AI chatbot accessible via SMS.

How we built it

First, we created a site that takes in a user's phone number and appends it to a Firestore database. Then we combined and cleaned data from several APIs to train the model. After that, we created a script that's always running, iterating through the "Events" database each minute, checking for events that match the current date and time. When they do, it sends tailored messages to the users in the Firestore database.

For the SMS service bot, we just finetuned a model using the OpenAI API endpoints and integrated the "Completion" endpoint in the Twilio console, so that it is always awaiting a message and ready to help!

We also built the site using React, and got our domain name (karet.space) from domain.com.

Challenges we ran into

Data cleaning / Event formatting: The data from most of the APIs we used were much different, so much of our first night was just formatting, aggregating, and transforming the data into uniform columns that the model could interpret (and files could read).

Model training: The OpenAI model fine-tuning API is highly-specific and required very clean and consistent code, so even though the parameters would pass without errors, there was a lot of logical debugging required to figure out why we weren't getting the desired outcomes.

Cross-functional integration (Cloud database to Twilio): We had to set up a cloud function to send an updated JSON object to Twilio each time a new number was added to the site, but it was much more difficult than we anticipated, and we almost scrapped the entire idea numerous times, if not for the inhuman debugging skills of the Loge.

Accomplishments that we're proud of

Accurate ecliptic calculations using IMO web-scraping of celestial event trajectories.

Model integration: Successfully training a GPT3 model on hundreds of datapoints and parameters, then successfully integrating it with Twilio. We were also able to create dynamic, user-generated personalities based on 3 choice adjectives.

Maintaining the integration of 6 APIs with error handling to keep scripts live.

Creating an automated dynamic database with low maintenance requirements (using Google Cloud).

Hours of debugging: We had some errors that took literal hours to resolve, and every time we would make a breakthrough, we ended up with more bugs in areas of our code than we could keep up with. Fortunately, with the help of Red Bull and the dopamine from the last squashed bug, we were able to get them all.

What we learned

We learned the complexity of building an application with many different functions and integrations, especially when leveraging so many technologies that will become rudimentary in the future, such as cloud computing, AI model fine-tuning/training, API integration, and generative language models.

What's next for Karet

Karet's going to remain active, as it is a low-cost way to make astronomy accessible to people of all levels of interest. Further improvements include, but are not limited to:

  • UI updates,
  • Database security/verification
  • Image/constellation generation (generating what a constellation may look like, or an AI-generated image of what to look out for in the sky as a visual guide),
  • Integration with the "ClearSkies" API to give better insights on when to look up (low cloud cover, good weather, light-pollution index, etc.)
  • Location-adjusted notifications (as of now, it is tailored toward Georgetown).

NOTE: We tried to use the "karet.space" domain we purchased on domain.com, but the TXT transfer will not be complete until after the event. Still, we would like to submit for the domain.com track.

Built With

Share this project:

Updates