Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Algorithms #1302

Open
Tracked by #2642
alltheseas opened this issue Jun 19, 2023 · 13 comments
Open
Tracked by #2642

Algorithms #1302

alltheseas opened this issue Jun 19, 2023 · 13 comments
Assignees
Labels
algo feature New feature request technical

Comments

@alltheseas
Copy link
Collaborator

alltheseas commented Jun 19, 2023

what is it
Algorithm capability will enable Damus users to opt-in to various algorithms as a complement to the chronological timeline.

This could enable "trending" posts, "trending" profiles etc

implementation
@jb55 was exploring script? language capability

https://damus.io/note1ejhkppvw74f966fxw4srhvsd3npyjjpm9pq65p6qlv06xu2eu2hqklcwv4

design exploration
@robagreda what might a "algo marketplace" look like?

requirements:

-damus user can always opt-in, or opt-out
-there are no mandatory algorithms (see twitter)
-algorithms are a marketplace
-algos can be developed by third party devs
-algos can be free, or paid / there is a way to zap algo devs
-damus algos must have easy to find name, description, author
-damus must clearly display if algo is installed
-damus must clearly display if algo view is on
-damus must clearly have a way to "install", and "uninstall"

questions:

is there "install" button?
is there a "uninstall" button (i.e. "algo store" can service as a place to manage all algos)
where does the installed algo take place?
can there be more than one algo installed?
how might user swap between algos; does each algo have a separate view?

crazy experiment areas
can algos be combined?
can there be a way to zap (i.e. optionally tip) algo authors

@GBKS
Copy link

GBKS commented Jun 21, 2023

That's a fun exploration. It might be best to start with thinking about what people might want to use algos for, and then derive the display from there. Always good to work with realistic content and scenarios. Did someone already explore that in depth? For example, is search also an algo?

Generally, the idea is that there are different views into all the activity. I like how Twitter has the row of tabs at the top when you set up multiple lists. Allows you to quickly switch between them. I also make heavy use of algo user options like muting/blocking words/people/hashtags. Twitter also has a bunch of other search options that could be considered. For example, when searching for bitcoin content, it's often helpful to use -filter:links to remove spam.

It can get pretty complex technically, but I do wonder if there aren't a handful of use cases that cover 98% of all needs.

@alltheseas
Copy link
Collaborator Author

Generally, the idea is that there are different views into all the activity. I like how Twitter has the row of tabs at the top when you set up multiple lists. Allows you to quickly switch between them.

Agree

I also make heavy use of algo user options like muting/blocking words/people/hashtags

These are not algos, but user created lists. Unless your idea is to automate this, and have algos make these decisions on behalf of the user. This a twitter, fb very dark, not opt-in, pattern.

Twitter also has a bunch of other search options that could be considered. For example, when searching for bitcoin content, it's often helpful to use -filter:links to remove spam.

The above is an advanced search description. We have this on roadmap, and have not prioritized yet. #493 #1075

It might be best to start with thinking about what people might want to use algos for
Currently the only option of timeline, and universe views is chronological. An algo could find notes in an order other than chronological.

Top zapped replies is an example sorting. #1116
Most zapped notes view. #686

We don't need algo marketplace capability for the above two examples. However, if we are to provide "algo marketplace" capability there can be third party algo providers that experiment and provide novel algorithms for exploration. This is something that twtr, and fb are incentivized not to do, as they keep their users in a perpetual state of doomscrolling amid sale of user data, and ads bombardment.

@GBKS
Copy link

GBKS commented Jun 21, 2023

These are not algos, but user created lists. Unless your idea is to automate this, and have algos make these decisions on behalf of the user. This a twitter, fb very dark, not opt-in, pattern.

Yes, these are put together by the user, but shouldn't an algo also consider them? Or does the algo create a feed and then the client applies the mute/block list filtering afterwards on the results? Whether I see my chronological timeline, most zapped content or do a search, I may still just not ever see certain terms or content from certain people.

In my mind, these things are all related. I create a "view into the stream of information", which involves an logic part (the algo) as well as user options (search term and parameters like filtering links, as well as the mute/block list) that the logic part works with (variables essentially).

@alltheseas
Copy link
Collaborator Author

but shouldn't an algo also consider them?

It depends on the algo that is "installed" by the user.

In my mind, these things are all related. I create a "view into the stream of information", which involves an logic part (the algo) as well as user options (search term and parameters like filtering links, as well as the mute/block list) that the logic part works with (variables essentially).

Agree

@alltheseas alltheseas added the feature New feature request label Jun 26, 2023
@alltheseas
Copy link
Collaborator Author

#1246

@alltheseas alltheseas moved this to Backlog 🪵 in Damus Roadmap 🛣️ Jun 30, 2023
@alltheseas alltheseas moved this from Backlog 🪵 to In Progress 🏗️ in Damus Roadmap 🛣️ Jun 30, 2023
@alltheseas alltheseas added this to the 1.6 Profile Zaps milestone Jul 4, 2023
@jb55 jb55 removed the status in Damus Roadmap 🛣️ Jul 31, 2023
@alltheseas
Copy link
Collaborator Author

alltheseas commented Nov 7, 2023

User defined algos requirements & suggestions:

  1. Algos must be opt-in ("user enabled")
  2. Algos must be known, visible, and configurable
  3. Keep "chronological" algo as an option
  4. Add "trending" option
  5. Add open API/store for build your own. "api/store: don’t be the gatekeeper for algorithms. allow others to publish algorithms and users to use them."
  6. Ability to zap algorithm creators
  7. Media feed image

trending: some kind of damus secret-sauce algorithm. show me cool stuff based on past zaps, likes, follows, etc.

api/store: don’t be the gatekeeper for algorithms. allow others to publish algorithms and users to use them. provide some kind of api for making that possible

in practice the api could be some nostr event that holds some nostrscript or w/e mechanism damus uses to define algorithms
-Ben

https://damus.io/note162ul7rne3qhrksk8wlf76ar4stm9k3jv4xwtcc34ga26kdwtljcqqllevf

Tangential: user lists #531

@alltheseas
Copy link
Collaborator Author

https://damus.io/note1kpm4dhdtl3lhlmcepjgleycmrunlydjfvem5zdycmea73g8uhpmqr36z44

Algo implementation and UI via bluesky for web. UI is not normie friendly.

@alltheseas
Copy link
Collaborator Author

@alltheseas alltheseas changed the title Algorithms [technical] Algorithms Feb 16, 2024
@alltheseas alltheseas removed this from the Profile Zaps milestone May 20, 2024
@alltheseas alltheseas moved this to Backlog in Damus Roadmap 🛣️ May 20, 2024
@jb55
Copy link
Collaborator

jb55 commented May 20, 2024

@GBKS wrote:

Twitter also has a bunch of other search options that could be considered. For example, when searching for bitcoin content, it's often helpful to use -filter:links to remove spam.

I'm putting together a flexible way of building any kind of algorithm, filtering links would be very easy with nostrscript + nostrdb:

-- note blocks are blocks of parsed contents
for block in nostr_note_blocks(note) {
  if block.type == url {
      return false
  }
}
return true

this could be assemblyscript or a custom wasm-targetted language that I'm calling nostrscripts. These filters run alongside nostrdb queries, so that are super efficient. I am also planning on creating reducers for more than just filtering.

Full plan here:

@alltheseas
Copy link
Collaborator Author

@alltheseas
Copy link
Collaborator Author

Customer requests people you might like/people followed by those you follow algo

https://damus.io/nevent1qqsz8akt2lkexcunr828858xz2arn97lya60lwpd37kgkcc3m4wwqmqpz4mhxue69uhhyetvv9ujumt0wd68ytnsw43qzxrhwden5te0wfjkccte9ehx7umhdpjhyefwvdhk6qghwaehxw309ahx7um5wghxvmt59emkj73wvf5h5qgjwaehxw309ac82unsd3jhqct89ejhxr6249y

For discovery of new people to follow, is there a ‘people you might like’ DVM / client feature out there?

Looking for something that searches for the most followed npubs by people you already follow (only showing people you don’t already follow).

@alltheseas
Copy link
Collaborator Author

Customer request for finding valuable non-current posts

Are there any Nostr clients that don't have such a present bias? I'd like to see older posts that have been popular and continue to get engagement as that's probably the most evergreen content.

Wisdom > hot takes.

https://damus.io/nevent1qqsg392vpmf2gpameeh5el5ryg0qyhwev8u78y44whh3482qx4my3ncpp4mhxue69uhkummn9ekx7mqpzfmhxue69uhhqatjwpkx2urpvuhx2ucprpmhxue69uhhyetvv9ujuumwdae8gtnnda3kjctvqythwumn8ghj7un9d3shjtnrw4e8yetwwshxv7tf6zkgj0

@alltheseas
Copy link
Collaborator Author

Customer requests people you might like/people followed by those you follow algo

https://damus.io/nevent1qqsz8akt2lkexcunr828858xz2arn97lya60lwpd37kgkcc3m4wwqmqpz4mhxue69uhhyetvv9ujumt0wd68ytnsw43qzxrhwden5te0wfjkccte9ehx7umhdpjhyefwvdhk6qghwaehxw309ahx7um5wghxvmt59emkj73wvf5h5qgjwaehxw309ac82unsd3jhqct89ejhxr6249y

For discovery of new people to follow, is there a ‘people you might like’ DVM / client feature out there?

Looking for something that searches for the most followed npubs by people you already follow (only showing people you don’t already follow).

@scoder1747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algo feature New feature request technical
Projects
Status: Backlog
Development

No branches or pull requests

3 participants