Algorithm in Bubble

Hi,

Is there a way to build an algorithm in bubble based off user’s habits/survey results/interests selected?

It is definitely possible to build algorithms in bubble, since algorithms are a set of rules, conditions and calculations that return a result, value or a list of these.

It depends on what kind of result you’re expecting to get that will determine the path to create and execute. Data can be acquired in so many places and forms and stored and processed in many different ways unique to your own use-case that is hard to tell.

But most importantly I would tell you that whatever you’re trying to do, you need to make sure is replicable. Maybe you can look at habit data and tell what kind of person they are. In order to decide you need to make a set of observations and take a series of steps, you need to make a series of desicions that will lead to a specific conclusion.

But for an algorithmic approach you need to figure out a model so that a computer can take the same steps with different data and come up with a different solution. You need to figure out a set or range of results that are possible and the calculations and desicions that your workflow will make with the data.

Its hard to tell specifically how you can do it but go ahead and provide more details on what you got and what you want and ill see what I can come up with to help you

I wanted to make a car buying website. Here’s the plan:

  • User Enters a Car to Search For
  • Web App (WA) brings up the list of cars that relate to his search.
  • The user can begin to swipe/click left & right, just like dating apps, to show his interest in specific listings. Swiping up allows the user to inquire about the car.
  • The algorithm measures what features he is swiping left/right on and gives him the next “option” based of his reaction to the previous one.

Think “Car Buying App, like a Dating App, with Social Media’s recommendation algorithm”.

Other Information:

  • Users (usertype: car dealers) will upload cars onto a Database.
  • Both this ''Swipe" method as well as traditional browsing will be incorporated.

Do you know of a way this algorithm can be built?
If you need any other info please let m

1 Like

Thanks for the info.

I am not sure how to implement such a feature since I haven’t been in the need of such a thing but this is where I would start.

First of all, I would make two fields in the user, one to be Unliked Cars and another being Liked Cars, both should be a List of Type Cars. Everytime the user swipes left, the car is added to Unliked Cars for that user and if they swipe right, add it to the Liked Cars instead.

This will be the basis of what the “algorithm” will use as desirable and undesirable results.

For the next part its all theory, but im sure this is viable.

You would have to use something like Algolia, which can take a bunch of attributes and utilize them to search more car entries that are not in the Like and Unliked fields of the current user. Somehow get the list of liked and unliked cars and their attributes to Algolia to user as search parameters to search for the next entry. I said this is in theory cause I am not certain if Algolia would take lists of data to use as possitive and negative search attributes but I assume its possible.

My recommendation is to have algolia search for a list of maybe 60 cars for example and have the user swipe through all of them. Once you’re close to the end of the list go ahead and run the algorithm again and update the swipe list with a batch of 60 unseen cars.

This will help to save resources instead of trying to run a search every time your user swipes. Plus it gives an extra 60 recrds added into both Liked and Unliked fields to get better results.

Hope this information leads you somewhere!

Thanks for the detailed answer. I appreciate it a lot!

Algolia is looks to be an AI Search Tool…not sure how this would be incorporated here.

Basically, I think it breaks down like this:

For every swipe, do the following:

  • Set new search parameters = last like’s keywords + initial search
  • Filter out search results = last dislike’s keywords

Any way we can do that? Natively in Bubble is preferred…lol

At the end of the day what you’re trying to do is a search. You search Cars that partially match the attributes of the car(s) liked and rank the search results from most relevant to least relevant and serve that list as the following items to swipe.

If you just go for Keyword based search you can implement it with bubble’s native, you can use something like Fuzzy Search which is a free plugin, which will take input parameters (in your case would be the Car’s database fields/attributes and return a search of similar items, it will rank the results from more similar to least similar.

But this “algorithm” will NOT
A) Learn from interaction and “liked” items
B) Improve the search results as the user swipes left and right.
In fuzzy search you can only use one parameter but not a list as far as I know.

Algolia would really help because you’re trying to make an algorithm that searches based on very complex data.

Your Cars database need to be as extensive as possible, meaning that you need to have fields for all the details and not just keywords, since any algorithm will be more accurate when more data is present to be searched.

There are some examples of people using algolia for dating apps if you dig online so I guess its the best option to get a true algorithm working

I belive Fuzzy does have multiple search fields…

If not, we can just make a database field that includes everything that is on that corresponding database row called “Keywords” and use that.

Also, how would I actualy implement Angolia? I looked at their website and I’m confused…lol

It does search multiple fields but it doesnt take multiple records to consider what could be relevant based on that. Fuzzy search just takes a single search input and searches multiple fields in multiple records so its not actually optimizing the search based on th e liked and unliked cars

I am not sure since I havent used it myself. Its a matter of playing around with it and figuring out with help of the forums, guides, docs and tutorials

Good luck!

Thanks for your help!

I followed up with Bubble Support, will update here