Option sets for content algorithm

I have an option set called subject with a long list of topics my site’s content can be categorised by.

I can’t figure out how I can set up a data type to attach that option set to users. I’d like each one to have a field number so different user actions can register either interest or disinterest in that topic for that particular user.

So far my closest shot has been manually making data fields of the same name as the option. I can slog through that and set up a different workflow for each option ie. “if the articles subject is sport, add +1 to the users sport field when they view it”

Obviously not excited about doing that at scale especially imagining the pain of changing the option set down the line. Is there a way to load up a field for each individual option on a data type? I’m not even explaining this well but thanks in advance for any help

Hi there, @GaryIreland… I could be off base here, but it sounds like you might be describing a simple list field on the User data type with that field having a field type of the option set. Then, as users “register” (whatever that means in your app) interest or disinterest in a topic, you would add the topic to or remove it from the user’s list field.

Hope this helps.

Best…
Mike

1 Like

Hi Mike, it wouldn’t get the detail I’m shooting for but it’s something in the right direction for sure it gets me a binary option for like/dislike.

I’m looking for a number field though ideally so the sorting of repeating groups can be tailored to the user. They have a 65 on sport and a -768 on politics so we weight the results with that in mind.

Ah, so I was off base… sorry about that.

I get what you are saying now, and I can’t really think of a way to do it because sorting a repeating group on multiple number fields that may or may not be stored on the data type that is the data source for the repeating group would be difficult, if not impossible.

The above being said, here is something that comes to mind, and I will preface the following suggestion by saying it might be the worst idea ever. So, read/implement at your own peril, and bear with me on this one.

What if you had multiple list fields on the User data type… a field for topics a user really likes, a field for topics they like, a field for topics they dislike, and a field for topics they really dislike. Then, you create a separate data type with a field that is tied to the option set and two number fields where a 1 will be stored in only one of the fields, depending on if the user likes or dislikes a topic.

As things are created in the new data type for the current user based upon them “registering” interest or disinterest in a topic, search through the data type and get like and dislike counts for the associated topic, and use those counts to move the topic between the aforementioned list fields on the User data type based on count thresholds that determine the difference between really liking a topic, just liking it, just disliking it. or really disliking it.

Finally, set up the data source of the repeating group to merge searches in the order of really like, just like, just dislike, and really dislike, and you would have something similar to what you described… I think.

Again, all of the above could be downright awful, and I could definitely be overthinking it. If that is the case, I am sure someone will come along with a much better/simpler suggestion, at which point I could delete this post so as not to subject future readers to its awfulness. :wink:

1 Like

I need to read it 4 more times to follow it all I’m sure but that was really great lol. I hope to get to the level of knowledge where I can spitball a data structure on the fly like that.

So I have a data type called algorithm data. It has a field user and then a bunch of number fields corresponding to an option set for categories. I manually entered the number field names so the connection to the option set is superficial and that’s what’s leading me to have to manually set up workflows for each option.

But since you got into the meat of how to track preferences I’ll explain how I wanted to set it up. Each category in the users algorithm data starts at 0. If they view content it gets a minimal bump, more for replies to that content, more again for likes of it and the most for posting content on that topic. And I didn’t think this part through so much but like negative categories could correspond so if it’s article about how sports suck then you get a minus on sport for engaging in any of the same ways; posting, liking etc.

What brought me here was mainly wanting to dynamically connect the data fields to the option set so it just connects sport categories to the users sports fields without me having to manually do a workflow for each connection. With that said I’m now probably going back to the drawing board and try to figure out the best way to structure it overall