Skip to content

Commit

Permalink
Use trust ranks to find good wiki article versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfranca committed May 3, 2024
1 parent d3bb4a1 commit 29798b8
Showing 1 changed file with 71 additions and 2 deletions.
73 changes: 71 additions & 2 deletions 54.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,68 @@ The content should be Markdown, following the same rules as of [NIP-23](23.md),

One extra functionality is added: **wikilinks**. Unlike normal Markdown links `[]()` that link to webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink.

#### Wikilink Tags

The one to two most prevailing wikilink `d` tag references of an article should be set to the `y` and `z` tags.
The `y` tag is set to the most prevailing one while `z` is set to the least of the two.

A prevalent wikilink is a reference that is able to categorize the article into a specifc topic. These are usually positioned
on the top of the article on an introductory paragraph.

A Nostr wiki client may try to auto assign those tags. For example, by finding the first wikilink's paragraph on the article
then considering the up to first two wikilinks on the current paragraph as the prevailing wikilinks.

Example:

```js
{
"kind": 30818,
"tags": [
[ "d", "john-doe" ],
[ "title", "John Doe" ],
[ "y", "internet-celebrity" ],
[ "z", "nostr" ],
],
"content": "# John Doe\n\nJohn Doe is an [influencer[internet-celebrity]] in the [Nostr[nostr]] scene. He is known for his [memes[meme]].\n" +
"# Early Life\n\n" +
"He was born in [Los Angeles[los-angeles]] ...",
// other fields
}
```

Those tags are handy when searching for topics related to an article.
They may be used as labels to tell two articles with the same `d` tag apart.
They are also used when [ranking authors](#author-ranking).

#### Author Ranking

When a reader adds a [NIP-25](25.md) reaction to an article,
the client may help them with adding/updating a [NIP-64](64.md) trust rank
on the main and related topics regarding the article author.

For example, if an user **likes** the above article, the author may be auto ranked as follows:

```js
{
"kind": 30382,
"tags": [
["d", "<wiki-article-author-pubkey>"],
// "x" is the marker for the main article topic (its `d` tag "john-doe")
["T", "3:wiki:john-doe", "x"],
// even though this wiki article author may not have written about "internet-celebrity" yet (or never will),
// this rank may be used to consider the relevance of a "x"-marked trust rank eventually authored
// by them (or by someone even deeper, if following another y/z rank) on the "internet-celebrity" topic
["T", "2:wiki:internet-celebrity", "y"],
["T", "1:wiki:nostr", "z"]
],
// ...other fields
}
```

Note that if later the same user **dislikes** a Nostr wiki article from the same author, the corresponding `T` tag would
be updated from `["T", "2:wiki:nostr", "z"]` to `["T", "-3:wiki:nostr", "x"]`, overwritting it because
the "x" marker (meaning main topic) takes precedence over the "z" one (related topic).

### Merge Requests

Event `kind:818` represents a request to merge from a forked article into the source. It is directed to a pubkey and references the original article and the modified event.
Expand All @@ -56,14 +118,21 @@ As there could be many articles for each given name, some kind of prioritization

[NIP-51](51.md) lists of relays can be created with the kind 10102 and then used by wiki clients in order to determine where to query articles first and to rank these differently in relation to other events fetched from other relays.

### Contact lists
### Follow lists

[NIP-02](02.md) contact lists can form the basis of a recommendation system that is then expanded with relay lists and reaction lists through nested queries. These lists form a good starting point only because they are so widespread.
[NIP-02](02.md) follow lists can form the basis of a recommendation system that is then expanded with relay lists and reaction lists through nested queries. These lists form a good starting point only because they are so widespread.

### Wiki-related contact lists

[NIP-51](51.md) lists can also be used to create a list of users that are trusted only in the context of wiki authorship or wiki curationship.

### Trust Rank

As mentioned [above](#author-ranking), article author [NIP-64](64.md) trust ranks can be assigned based on [NIP-25](25.md) reactions (or below [deferences](#deference)).
An user's follow trust rank event can be used to rank an article version directly by using a "x" marker.
If an "y" or "z" marker was used instead,
it may indirectly be linking to the involved author's article on a related topic or another trust rank event on that related topic that depending on the marker can be navigated further until possibly finding a ranked article version.

Forks
---------
Wiki-events can tag other wiki-events with a `fork` marker to specify that this event came from a different version. Both `a` and `e` tags SHOULD be used and have the `fork` marker applied, to identify the exact version it was forked from.
Expand Down

0 comments on commit 29798b8

Please sign in to comment.