Web of Trust, the Grapevine and the Art of Interpretation
- format of Grapevine ratings
- Example interpretation: follows and mutes
- Grapevine Ratings Tables
- Sources of Raw Data
The Grapevine is designed to digest raw data, no matter where you can find it. This is made possible through the process of interpretation.
Interpretation: the process of converting a source of raw data into a format suitable for consumption by the grapevine algorithm
format of Grapevine ratings
The Grapevine is designed to take as input a list of ratings that follow a specialized format, which we will refer to as Grapevine ratings.
Each rating must contain the following 4 to 6 fields:
- rater
- ratee
- score
- confidence
- context (optional)
- rating type (optional)
rater
The author of the rating. Often will be a pubkey or an npub, but could be username, etc.
ratee
The person, place, or thing being rated. This could be a pubkey, an event id or naddr, or a simple string, e.g. the title of a movie.
score
usually a number, but could be a boolean, an item on a list, etc.
confidence
a number between 0 and 1 (i.e. 0 and 100 percent) that represents the confidence of the rater in the score. For example: If Alice rates Bob as highly skilled in some context, and this is based on working with him for many years, she may rate him 9/10 with a confidence of 0.9 (90 percent). On the other hand, suppose she considers him worthy of a 9/10 rating, but this is based on only one brief interaction. In this case, she may rate him 9/10 but with a confidence of 0.05 (5 percent).
context
a string. This may be omitted from the table if every rating in the table or dataset is of the same context (as may often be the case).
rating type
a string that indicates the type of rating: 5 star, true or false, etc. This may be omitted from the table if every rating in the table or dataset is of the same rating type (as may often be the case).
Example interpretation: follows and mutes
A good way to bootstrap a list of nostr users minus the bots, scams, and other bad actors is to make use of the follows and mutes lists, as is done at brainstorm.
The interpretation of a follow is the following Grapevine Rating:
- rater: pk_Alice
- ratee: pk_Bob
- score: 1
- confidence: 0.05
The interpretation of a mute is the following Grapevine Rating:
- rater: pk_Alice
- ratee: pk_Charlie
- score: 0
- confidence: 0.1
Grapevine Ratings Tables
A list of ratings may be referred to as a Grapevine Ratings Table or a Grapevine Ratings Dataset (if in some non-table format, such as an object).
In the below example, the rating type (0 to 5 stars) and context (item quality) columns are the same for each row in the table and so are omitted.
| rater | ratee | score | confidence |
|---|---|---|---|
| pk_Alice | item1 | 4 | 0.5 |
| pk_Bob | item1 | 5 | 0.9 |
| pk_Alice | item2 | 0 | 0.1 |
Sources of Raw Data
| Some Suggested Sources of Raw Data |
|---|
| follows, mutes, zaps |
| kind 1 and long form notes |
| NIP-51 lists |
| kind 7 reactions |
| NIP-32 labels |
| NIP-58 badges |
| nostr forms (e.g. see formstr) |