Elgoog

DALY
Feb 12, 2023
Project for Lancer Hacks Hackathon
Greetings everyone!
Are you feeling bored with your life? Perhaps you're working too hard, or doing something you don't enjoy. Well, we've got just the thing to shake things up - Elgoog!
Elgoog is a "search engine" inspired by Google Search that we built using Next.js, Tailwind, Vercel, and the Google API. But with one key difference: you don't get the results you want. Instead, you get the opposite!

All you have to do is type in a search term, hit "Enter," and see what comes up.
For example, let's try:
"bad person playing on piano"...

But first, let's give you a little background on our product.
We came up with two possible solutions and decided to implement them both.
The first solution uses an API that provides antonyms for words, which you can try out on our website.
Here's how it works:
InputText => PhraseSplitter => AntonymsAPI => NewPhrase => GoogleSearchAPI => Results (which appears on the page)
The second solution uses the ChatGPT API instead of the Antonyms API. We didn't keep it online for a few reasons, like the cost of a subscription and the limited requests allowed in the free trial we used to test it.
Now, back to our search term.
After entering "bad person playing on piano," we get the opposite result:
"good person playing off forte"

The API reverses every word that has an antonym and keeps the others as is. However, we felt that this wasn't enough for our project, so we switched to using ChatGPT.
Let's try the same phrase with ChatGPT.

And the output is:
"Good person playing on piano."
This time, the model only changed one word, but that was enough for this phrase.
To show you how it works even better, let's try another one!
How about "Dogs playing on the lawn"?

My prediction was that it would change either "playing" or "lawn," and I was mostly right. The AI changed the phrase to:
"Cats lounging on the grass"

As you can see, we get the complete opposite of what we searched for, with the model even replacing "dogs" with "cats." It's a funny and interesting way to look at things from a different perspective.
In conclusion, we'd like to say that the theme of the Hackathon was "Upside Down," and we hope you enjoyed reading about our project. It was a great experience to work with our team and try out different solutions.
You can find the code for this project on my GitHub repo.