I need some advice on designing and building a feature for detecting anomalies within datasets.
Users of my bubble App user it to store thousands of reviews. Each review has a date and a topic. They’ve asked for a feature where they will get notifications when ever an anomaly is detected. For example, a topic that spikes in volume all of a sudden so they can investigate further.
Does anyone have any suggestions on how to go about building this feature?
If you can enumerate all conditions for anomalies (like the one you mentioned below: topic spike), you can setup a backend workflow that will run every night (or in whatever frequency you need), check this condition (count of reviews with certain topic is above certain number), and prepare a report or send an email about it.
Of course, more frequent it runs, more money it will cost. If this is really serious issue (like topic spike), you can even trigger this backend workflow after a review is created, but again this means more cost. So, I would keep it every day or something.
This is the part where you have to define what an anomaly is. For your example (topic spike), you may check the number of reviews with a certain topic today vs previous day. If the increase is huge* then, you can run the workflow. Just one example.
*You should also define what huge means in your DB. Is it more than 100%? Is it a specific number?