Connor Jarret's Lab Notebook

How I made a smart assistant by harnessing the power of Google Search

I look at the fundamental concept of search engines and explore opportunities to improve them.


A few weeks ago, I launched my latest project Chatbot. It started out as something that could just be an alternate user interface to Google, but later became so much more.

What if search was more useful

When you step back and really think about search online, the relevancy of results has definitely got better, but we're still presented with the same long list of results to click with limited information about most sites. What if that were to change? Imagine if the fundamental concept of a smart assistant like Siri or Google Assistant where you get one, optimised and informative result came to desktop search, that is the vision I was trying to create with my project.

How does it work

Search engines are massive, so I knew I wouldn't be able to do all of the work myself, Google has spent years indexing and perfecting the way they search and store useful information, so it only made sense that the Google Search API would be the start of my project. However, as I soon learnt, the Google Search API does not return nearly as much information as regular Google Search, completely ignoring featured snippets and other useful information like calculators and time converters. My program runs the returned list of 10 results through a filter, which removes unimportant sites and prioritises better known ones to produce one top result that it will use.

Next, using a list of known sites, such as Wikipedia, YouTube, Spotify, IMDb and more, it will produce a meaningful answer (most of the time). There are 3 tiers to the "usefulness" of a result which I will list here:

I'm always looking for new things to turn into Tier 2-3 results, and recently, I've been thinking about holiday bookings, where it could use multiple APIs to determine flight prices, nearby hotels, car rentals and things to do while away.

Where can I see this in action?

Right now, for security reasons, you have to run the program on your home machine, rather than it being available through a web app, this is due to the lack of server side code on GitHub pages which I explore more in this article.

For now, you can see the live demo and the code on the project website, connorjarrett.github.io/chatbot

Conclusion

I really think that this approach to search is better than what we have today, and while we can see elements of this concept through Siri Suggested Website on Safari, and featured snippets on Google becoming more frequent, none of them provide, in my eyes, enough detail and relevance, and I hope we see more of this in years to come.


If you enjoyed this article please consider sharing with a friend