Forum Academy Marketplace Showcase Pricing Features

AI Integration for Complex Algorithm

I’ve been slaving away all day at developing a really complex sorting algorithm for my task-management app. It would probably be easier if I understood Javascript well enough to just build it as a plugin, but I don’t.

Anyways I had an idea: could I possibly integrate AI to handle this for me?

How I’m imagining it to work:

  1. I give the AI a list of basic instructions for how the algorithm should work.
  2. Whenever a user of my app creates, updates, or deletes task data, it sends this information over to the AI.
  3. The AI uses the algorithm to update the database for the task so that it has a priority rating and recommended date, etc.

I know very little about AI and also not much about API with Bubble in general, so some direction would be awesome if anyone has ideas.

Perhaps a good starting point would be to write down this algorithm and then determine the best language to implement it?

1 Like

Take a step back, perform/calculate these algorithm changes manually and figure out if the logic makes sense. All good? Let AI take over, following the instructions provided.

1 Like

I think I have a decent understanding of how the algorithm should work (in english) my question is how would I pre-determine those steps in an AI tool then connect the AI tool to my Bubble app to receive database changes and send them back.

Well if it’s an algorithm don’t you just need a formula, not an AI?

@redvivi is 100% right about this, tell us how you would do it in plain english (pseudocode)

It’ll help you think about your problem like a developer.
image

Right so here’s the pseudocode I’ve come up with so far. Like I said, I’ve been working on doing this natively in Bubble today and last night, and I’ve gotten some progress. It just feels like with this level of complexity, it would be easier to give an AI tool this pseudocode and let it figure out the exact specifics of how to get it done.
Uploading: Screenshot_20230917_150026_Docs.jpg…

Image failed t o upload :frowning:

Thanks, let me try it again lol

1 Like

Okay that’s great. Don’t use AI for this unless you just really can’t be bothered to build the logic because the AI will not be predictable.

Each of your bullet points are essentially a ‘Make changes to thing’ action which have a condition attached as you describe.

Then, you can do the same Make changes to a thing with conditions for the Eisenhower Matrix (just break it up like you did for the first section).

For the triggers, you can schedule a backend workflow to run when a Task is changed, and also schedule a recursive workflow that runs daily and schedules itself to run 24 hours from now. This recursive workflow kicks off the task sorting workflow.

I don’t know how familiar you are with backend workflows/recursive workflows but there are plenty of good tutorials on Youtube if you need guidance!

Awesome thanks! Yeah I figured I can do this natively in Bubble, and I’ve got the whole priority sorting figured out. My current issue is the logic behind getting the available hours in a day is confusing me considering scheduled events can overlap. For example, if you have a meeting from 6-8pm and dinner from 7-9pm it would just be unavailable from 6-9pm for 3 hours not the sum of those durations for 4. I can probably figure it out though, maybe using the date range property.

This has taken a while to get to this point, and I have a headache, so I thought perhaps AI would be useful, but I get that it may not be the best method.

1 Like