Add NIP-32 for labeling things in nostr#532
Conversation
|
@Gruruya multiple labels is now supported, see the examples section. |
|
It may be more efficient to default to applying tags to the referenced thing rather than putting it behind an so I also want to add a third The other boutique formatting I expect to see is The tag agnostic nature of the NIP means it can adjust for whatever, so that's good. |
|
Yeah, I think everything above is covered by this NIP, since labels can be anything you want. So for negative matches, I think one thing we're not quite in agreement on is the difference between labels and tags. In my mind, tags are not a generic labeling mechanism, but a core part of the experience for the end user. Polluting So,
Should be handled with a flatter hierarchy by just putting the second-level namespace in the label, e.g.
I don't see what this accomplishes, it seems like it adds more complexity while also removing the ability to query specific labels. Maybe an example? |
No, you're right. Doesn't accomplish anything, and keeping |
|
The "lightning/channel" example made me think that maybe you should add required (relays may validate it) {
"kind": 1985,
"tags": [
["e", <id>],
["L", "nostr"],
["L", "ugc"],
["L", "none"],
["l", "#t/permies", "nostr"],
["l", "nintendo quality", "ugc"],
/* edit: */ ["l", "brincante", "none"], // pt-BR slang that couldn't be auto-translated to english
["l", "triple A", "none"]
],
"content": "",
...
}Available vocabularies:
Custom examples
|
|
I don't see why we couldn't add
Do you just mean more examples for e.g. labeling something with a relay or whatever? |
This comment was marked as resolved.
This comment was marked as resolved.
No need. The features I'm talking about are |
|
@arthurfranca very interesting idea. I guess the tradeoff here is being able to query all namespaces simultaneously rather than one at a time, but the two formats contain equivalent information. I like my version better, since if you want to query multiple namespaces you can just add more entries to your
I'm not sure what this means, can you elaborate? |
This comment was marked as resolved.
This comment was marked as resolved.
You mean one could request this filter: But what if the client supports user generate labels that could be anything (almost), I'm talking about a steam-like system. In such a system, there is no fixed set of values. Steam allows any lowercase tag in english that can have space between words. "ugc" maybe should be exactly that: "any lowercase tag in english that can have space between words" A client would have to request all label events for a specifc object and then filter out labels that don't follow the "lowercase english that can have space between words" client-side. Instead it could do |
|
I’m in the hospital and can only type with one hand, so unable to give a full set of comments. But one thought… Have you gotten any feedback from experts or people with considerable experience in either content moderation or labeling (e.g. scientific or industry use of structured vocabularies and the like)? I would think their input needs to come first. Otherwise you’re just working on something that will need to be deprecated in the near future as experts come in and find things that need to be changed. |
Meta-labeling, I like this idea. Should keep it simple though, only put the current system and the structureless version in the NIP.
The
It can't get more generic than this. There's nothing to deprecate. |
This is why the NIP recommends using qualified tags where ever possible; unqualified tags are for informal use either by clients or by users.
I see, that makes more sense, I'll look at adding it to the spec. @s3x-jay I haven't, but the purpose of this NIP is to leave the structure completely open. I have studied semantic web a little bit, but for the most part it seems like a never ending hole of pedantry. If someone wants to implement semantic web ontologies, they should be able to do so using this NIP, since labels can be anything. Do you have a recommendation for a quick primer on the problems you're referring to? I've read some Nikitia Bier, but not much else. |
@Gruruya remember that nostr relays only indexes the first "value" of the tag ("#t/permies"), so multiple labels like |
Experts need to be involved. I’m not an expert on these things, but I have been using labeling systems / defined vocabularies for over 2 decades - including modeling my own vocabulary (based on the lessons I learned working closely with MesH for a few years) that powers/enhances the tagging system on my sites. Is there a reason why you don’t just use NIP-68? Other than the reserved |
|
The reasons I'm creating a separate NIP from 68/69 are 1. it prescribes a nomenclature, 2. it's more complex than it needs to be. I've borrowed some of the ideas (e.g. qualified namespaces) for this NIP. I think something simpler and more generic is going to have more success with the nostr dev community. Apart from the issue of nomenclatures, which I am avoiding here, what problems do you see with this NIP? What use case do you want supported that this NIP doesn't cover? |
Oh man, I feel dumb. Thanks for fixing everything despite my complete misconception staab. |
I’m in the hospital typing with one hand on a phone. I don’t have the time or energy to each you what I’ve learned over the past 2-3 decades. You’ve made your voice quite clear. No one will confuse your use of 68 as support for 69. I’ve asked a data scientist with a background in biology to chime in about 68. Hopefully he’ll have time this week. I’m pretty confident it’s good, but want to be sure. |
|
In my opinion, the bad thing with NIPs 68 and 69 is forcing all nostr to use the strict One, debatable, superior approach it presents, comparing to NIP-32, is having quality/confidence data per label along with extra useful things like "appliesto". A different thing from NIP-32 (don't know if better or worse cause it is 2 ways of doing same thing) is allowing atomic labeling by the author of the original event (e.g.: author adding l tag inside its own kind 0 event, instead of creating an extra event). It is very good for relays that NIP-68 proposes using parameterized replaceable events (there would be much less stale events). The trade-off is that the "d" tag format doesn't allow using just one event for tagging multiple events/profiles at once (or the graphs, like NIP-32 does). What about you take the following from NIP-68/69... ...and turn into: Why drop the X from "X-MOD": "Non-standard (http) header fields were conventionally marked by prefixing the field name with X- but this convention was deprecated in June 2012 because of the inconveniences it caused when non-standard fields became standard.[6]" |
They're good for the reason you state, but they make it so you can only reference one thing (unless we can come up with a convoluted
If we want to make |
|
Just pushed a new version, summary of changes:
I'm pretty happy with the NIP at this point. The replaceable functionality is the last thing I see that's not resolved. If we had to choose between the two, I'd prefer the ability to add multiple tags to a single event at the expense of replaceability. But What might be preferable would be to add support for an optional |
I think there isn't cause there exists only NIP-16 and NIP-33. And parameterized replaceable event with no d tag in considered having an empty string d tag as identifier. Although the NIP could define that it requires special treatment from relay (as for instance kind 0 metadata, that isn't in the range of replaceable events (10000 <= n < 20000), is implied to be treated as replaceable - this happened cause kind 0 was created before replaceable events NIP existed). But this hurts relays as they have to add extra logic specific to a kind. |
Nice, this is good.
You have to use two different kinds, I believe.
I've though about this a bit more and a |
I definitely think this would be a bad idea. Another option would be to generate a UUID for the
The |
Worse hack than having two kinds. |
Yeah, you're right. Another reason to create a new kind is that the replaceable kind would have different requirements, i.e. only one target tag. Does anyone desperately want the replaceable version, or should we keep the NIP simple for now? I see no problem with duplicate labels, if clients care they can de-duplicate based on pubkey plus their query. |
To be honest I've been wanting to shorten the NIP when I've been re-reading it. We could simplify it down to the main point of generic labels for indexing. WDYT? |
Because I should be able to use what others build and vice versa. That's kinda the whole point IMHO. |
What the hell? Why would you do that? Just use |
Because using
|
And it call comes down to this. It's simply more efficient for your use-case to use At this point we're arguing over examples and it's probably better to just merge the thing and let us focus on implementing rather than arguing with each other. Any changes to examples can be made in a separate PR anyways. |
Some additional thoughts… NIPs are absolutely meant to be both prescriptive and exhaustive - or at least enough so that people all do things in the same way. NIPs are not needed where someone just wants to do their own thing. There is a rich history of labeling systems that existed before Nostr - systems that have a long history of collaborative use where people used the same coding system in the same way so they could benefit from each other’s use. The point of this NIP is to be prescriptive and exhaustive enough that that collaboration can continue on Nostr. |
|
So my question is: in what scenario can you generically construct a namespace-merged I really feel like we're over-thinking this. If clarity is required, bulk tagging across multiple namespaces should just be done using multiple events. Can we just go with that? I admire your thoroughness, but it feels like you're inventing new edge cases in an effort to create the perfect spec, which isn't going to happen in any event, rather than being practical.
This is the W3C way, not the nostr way. Nostr is permissionless, do it how you want, and reconcile differences later. The implementation is the standard, not the spec. Just wait until people start crafting deliberately malformed events. |
I’ve been working with a variety of coding systems/vocabularies for 20-30 years. Every one I’ve encountered benefits from what I’m talking about. I have asked repeatedly for a good example one one that doesn’t and haven’t gotten any specific examples. |
|
Yeah you did? |
I should probably review some of the comments
I agree which is why I was initially pushing for everything to be prefixed then (when there was pushback) figured a note saying that well-defined coding systems (especially industry standards) assume prefixing.
The database admin in me balks at the additional db records, but given how tags are indexed, I’m not sure if it’s as big of a problem as I might think it is. The problem is labeling at the time of publishing. It would mean only one namespace can be used. Otherwise, sure.
Trust me - that’s a big concern of mine. |
Me too, should be fun 😉 |
|
I read the proposal a few times but I'm not sure if I fully understand it, especially around label queries and how namespaces play into it. It might be useful to see examples of how NIP-12 queries would work with this. |
|
You can see my implementation of relay reviews here, which is a nice concrete example. Namespaces exist to disambiguate between similar labels being used for different purposes, and to point to an authority or convention that is the basis for the label semantics. |
|
I came here to ask if this was in a mergeable state. Are the nos.social people onboard with it too in its current form? |
I’m not technically part of the NOS team, but build 51 of NOS (available since yesterday) uses 32 + 69 for content reporting. I haven’t had a chance to study how NOS’ implementation works exactly but 32’s current form seems “good enough” to me personally. I’m currently reworking 69 to reflect the changes from 68 -> 32. |
|
Just pushed a small update to remove some redundant/exotic examples. I think this is good to go. |
|
All right I'm just still going to use the "l" tag on my channel creation. This NIP allows for self-labelling, which is cool. |
There was a problem hiding this comment.
This looks good to me. We have shipped a basic report UI in Nos using this format. It will definitely go through some more iterations but this NIP has everything we need.
I do wish the convention of embedding the namespace in the string with the label (i.e. I see that this did make it in at the bottom. Thanks for pointing that out @s3x-jay.["l", "MOD>NS", "MOD"]) had made it into the NIP, but we're just going to do it anyway and it won't break anything for others.
|
Cool, great work! We'll implement this in Arcade. Yes this supersedes my placeholder NIP-32 from #46, closed that. |
Supersedes #524
Purpose
Content moderation involves labeling content. In #459, @Gruruya proposed expanding NIP-56 to encompass labeling. I chose to create a new NIP rather than update NIP 56 because backwards compatibility would have been difficult to maintain, and because the purpose of the NIPs are slightly different (see below).
In #457, @s3x-jay and @rabble proposed a nomenclature and more comprehensive mechanism for content reporting/labeling. The consensus seems to be that a nomenclature is not a good idea, but there were some good ideas to include.
In #522 (comment) I realized that the same labeling mechanism could be used to leave reviews for relays, which I am eager to add to Coracle so people can start to find a better relay selection.
This PR may also render #46 obsolete, and could someday replace NIP 14, NIP 56 and NIP 36 if labels get adoption.
Justification
Maybe this will seem like I'm trying to make a single NIP do too many things. But reviews, labels, and reports all have two things in common: they refer to an object, and are an expression of someone's opinion. In each case, there is a value judgment involved in assigning the label, involving both imprecision and uncertainty. Expressing this opinion using either a mark, or content, or both, allows either a machine or human to make a judgment call as needed.
One nice thing I'd also like to point out about this PR is it allows for associating any two entities (e/p/r/t) in nostr, and searching those associations. This gives us the beginning of graph-database-like functionality that can form the basis for both WoT and topical moderation and recommendations.
Confidence/quality may seem like the same thing, but they're two different axes along which to measure certainty. The first is subjective (the label author may not be 100% sure), the second objective (the label may not perfectly fit). This has been suggested in a few places, but was best executed by guide.newfounding.org (unfortunately their site is no longer available).
Compatibility
This PR is similar to NIP-56, but is focused on distributed "moderation" (allowing users to filter notes based on their preferences) rather than centralized moderation implemented by relays and clients directly as required by law or app store policy.
Implementation
None of this is implemented, but my main motivation of drafting this PR is so I can add relay ratings and reviews to Coracle soon.