{"@context":"https:\/\/schema.org","@type":"Periodical","version":"1.0","generatedAt":"2026-07-26T12:57:21+00:00","magazine":{"id":"5069918f1e7553139f699e1bc13b4b5496776d0370c246052d61ac7730f9429a","slug":"nostr-knowledge-base-5c0381","title":"Nostr Knowledge Base","summary":"Documentation, explanations and explorations","image":null,"language":null,"pubkey":"c89e5eb6d9ab087e36d122a1674167053179200226cbf082bca1c492e858ffac","createdAt":"2026-03-24T18:24:34+00:00","url":"https:\/\/www.decentnewsroom.com\/mag\/nostr-knowledge-base-5c0381"},"categories":[{"slug":"nkbip-53fa4c","title":"NKBIP","summary":"Nostr Knowledge Base Implementation Possibilities","image":null,"url":"https:\/\/www.decentnewsroom.com\/mag\/nostr-knowledge-base-5c0381\/cat\/nkbip-53fa4c","articleCount":2,"articles":[{"title":"NKBIP-01: Curated Publications Specification","slug":"nkbip-01-curated-publications-specification-ar6dui","summary":"This is the minimum specification for curated publications: ordered, optionally-hierarchical assemblies of Nostr events.","content":"Publications provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles.\n# Event Kinds\nThis NIP defines two primary event kinds:\n\n- `30040`: Publication Index\n- `30041`: Publication Content\n\n\n## KIND 30040: Publication Index\nA publication index defines the structure and metadata of a publication. It serves as a table of contents that references the actual content sections.\n\n### Requirements:\n\n- The `content` field MUST be empty\n- MUST include a `title` tag containing the full title of the publication\n- MUST be uniquely identifiable by the combination of:\n- `d` tag (normalized to lowercase letters, numbers, and hyphens, analog to [[NIP-54]].\n- `pubkey`\n- `kind`\n- MUST include `a` tags listing the events in desired display order.\n- Format: `[\u0022a\u0022, \u0022\u003Ckind:pubkey:dtag\u003E\u0022, \u0022\u003Crelay hint\u003E\u0022, \u0022\u003Cevent id\u003E\u0022]`\n- Optional event ID field enables version tracking while maintaining updateable references\n- Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices\n- Additional event kinds MAY be supported, especially 30818 and 30023\n- MUST include an `auto-update` tag specifying update behavior:\n- Format: `[\u0022auto-update\u0022, \u0022\u003Cyes|ask|no\u003E\u0022]`\n- Controls whether clients should automatically update to newer versions\n- For derivative works:\n- MUST include a `p` tag identifying the original author\n- MUST include an `E` tag referencing the original event immediately after the `p` tag\n- MAY contain the tag \u0022source\u0022, which defines a URL which contains the location of the original text, and\/or an `i` tag.\n- MAY contain the tag \u0022version\u0022, which describes the edition.\n- MAY contain the tag \u0022type\u0022 indicates how the publication should be displayed in the viewer\/reader. Some suggested types are:\n- book (default)\n- illustrated\n- magazine\n- documentation\n- academic\n- blog\n\n\n### Example Index:\n\n```\n{\n    \u0022id\u0022: \u0022\u003Cevent_id\u003E\u0022,\n    \u0022pubkey\u0022: \u0022\u003Cevent_originator_pubkey\u003E\u0022,\n    \u0022created_at\u0022: 1725087283,\n    \u0022kind\u0022: 30040,\n    \u0022tags\u0022: [\n        [\u0022d\u0022, \u0022aesop\u0027s-fables-by-aesop\u0022],\n        [\u0022title\u0022, \u0022Aesop\u0027s Fables\u0022],\n        [\u0022author\u0022, \u0022Aesop\u0022],\n        [\u0022i\u0022, \u0022isbn:9780765382030\u0022],\n        [\u0022t\u0022, \u0022fables\u0022],\n        [\u0022t\u0022, \u0022classical\u0022],\n        [\u0022t\u0022, \u0022literature\u0022],\n        [\u0022source\u0022, \u0022https:\/\/booksonline.org\/\u0022],\n        [\u0022type\u0022, \u0022book\u0022],\n        [\u0022version\u0022, \u00223rd edition\u0022],\n        [\u0022published_on\u0022, \u00222003-05-13\u0022],\n        [\u0022published_by\u0022, \u0022public domain\u0022],\n        [\u0022image\u0022, \u0022https:\/\/imageserver.com\/piclink.jpg\u0022],\n        [\u0022summary\u0022, \u0022Collection of selected fables from the ancient Greek philosopher, known as Aesop.\u0022],\n        [\u0022a\u0022, \u0022\u003Ckind:pubkey:dtag\u003E\u0022, \u0022\u003Crelay hint\u003E\u0022, \u0022\u003Cevent id\u003E\u0022],\n        [\u0022a\u0022, \u0022\u003Ckind:pubkey:dtag\u003E\u0022, \u0022\u003Crelay hint\u003E\u0022, \u0022\u003Cevent id\u003E\u0022],\n        [\u0022auto-update\u0022, \u0022\u003Cyes|ask|no\u003E\u0022],\n        [\u0022p\u0022, \u0022\u003Cpubkey_0\u003E\u0022],\n        [\u0022E\u0022, \u0022\u003Coriginal_event_id\u003E\u0022, \u0022\u003Crelay_url\u003E\u0022, \u0022\u003Cpubkey\u003E\u0022]\n    ],\n    \u0022sig\u0022: \u0022\u003Cevent_signature\u003E\u0022\n}\n```\n\n\n## KIND 30041: Publication Content\n\nAlso known as sections, zettels, episodes, or chapters contain the actual content that makes up a publication.\n\n### Requirements:\n\n- MUST include a `d` tag\n- MUST include a `title` tag describing the section (e.g., \u0022Introduction\u0022, \u0022Chapter 1\u0022, etc.)\n- The `content` field:\n- MUST contain text meant for display to the end user\n- MAY contain AsciiDoc markup\n- MAY contain wikilinks (denoted by double brackets)\n\n\n### Example Section:\n\n```\n{\n    \u0022id\u0022: \u0022\u003Cevent_id\u003E\u0022,\n    \u0022pubkey\u0022: \u00228ae74c618a4713f32129...\u0022,\n    \u0022created_at\u0022: 1708083476,\n    \u0022kind\u0022: 30041,\n    \u0022tags\u0022: [\n        [\u0022title\u0022, \u0022The Farmer and The Snake\u0022],\n        [\u0022d\u0022, \u0022aesop\u0027s-fables-by-aesop-the-farmer-and-the-snake\u0022],\n        [\u0022wikilink\u0022, \u0022fable\u0022, \u0022\u003Cpubkey\u003E\u0022, \u0022wss:\/\/thecitadel.nostr1.com\u0022, \u0022\u003Cevent id\u003E\u0022]\n    ],\n    \u0022content\u0022: \u0022The Farmer and The Snake\\nA [[fable]], by Aesop.\\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. \u0027Oh,\u0027 cried the Farmer with his last breath, \u0027I am rightly served for pitying a scoundrel.\u0027\\nThe greatest kindness will not bind the ungrateful.\u0022,\n    \u0022sig\u0022: \u002249cab8c75fb35cec71d07258...\u0022\n}\n```\n\n\n# Extensions\nPublications are flexible and can be extended for different types of content. Examples include:\n\n- Books\n- Academic journals\n- Course materials\n- Documentation\n- Blogs, including those from different npubs\n\n\nAdditional tags relevant to the specific content type MAY be included in both index and section events.\n\n## Bookstr Macro\n\nThe [Wikistr](https:\/\/wikistr.imwald.eu) implementation can find `30041` events using a the _bookstr_ macro, which is a variation of the _wikistr_ macro.\n\nIt is structured:\n\n`[ [type:book chapter:verse | version] ]`\n\nand is a form common to Bible notations. For example:\n\n`[ [bible: John 3:16 | KJV] ]`","image":null,"pubkey":"c89e5eb6d9ab087e36d122a1674167053179200226cbf082bca1c492e858ffac","kind":30023,"createdAt":"2026-04-26T16:59:28+00:00","publishedAt":"2026-04-26T16:59:28+00:00","topics":["nips","nostr","dev","nip","nkbip","knowledge-base","publications"],"url":"https:\/\/www.decentnewsroom.com\/mag\/nostr-knowledge-base-5c0381\/cat\/nkbip-53fa4c\/d\/nkbip-01-curated-publications-specification-ar6dui"},{"title":"NKBIP-02: Vector-Embedding Specification","slug":"nkbip-02-vector-embedding-specification-i95bly","summary":"Proposing a format for publishing reusable vector embeddings of existing events so clients can support semantic search, recommendation, clustering, and other AI-driven use cases.","content":"![Vector embedding graph](https:\/\/i.nostr.build\/ijZF6rJ3MM0wiVjZ.png)\n\n# Embedded Content\n\nAllowing rich content to be embedded within Nostr events opens up new possibilities for applications built on the protocol. This is highly synergistic with [NKBIP-01](nostr:naddr1qqexu6mzd9cz6vp3943h2unpw3jkgttsw43xc6trv96xjmmwwvkhxur9vd5kv6trv96xjmmw94chze3nx9hsygxgne0tdkdtpplrd5fz59n5zec9x9ujqq3xe0cg909pcjfwsk8l4spsgqqqw4rsgxx6hg)\/NIP-62, where we can decompose existing events into their most semantically closed forms as defined either by the author or the analyst for precise semantic embeddings, but this process can be applied to any other event. Embeddings are also typically computationally expensive, which makes it beneficial to compute them once and store them for reuse.\n\n# Motivation\n\nHashtags and labels already exist as one way to classify content, embeddings allow for a fine grained resolution of content. Every embedding model has tradeoffs, so if you need something more specific than what is available, use your model.\n\nNostr events are public, therefore it is to be expected that any event can be analyzed. Given this fact, it only makes sense to formalize and allow anyone to work with it. Embeddings are useful for various applications, including:\n\n1. Semantic search across Nostr events\n2. Content recommendation systems\n3. Clustering similar content\n4. Multimodal AI application\n\n\n# Specification\n\nThe `1987` event are embedding specific labels for an event.\n\nRequired tags:\n\n- `e` - The id of the original event being embedded\n- `model` - The name and version of the model used to create the embedding and if possible, a link to download\/source\n- `type` - The type of content being embedded (e.g., \u0022text\u0022, \u0022image\u0022, \u0022audio\u0022, \u0022video\u0022)\n- `vector` - The embedding vector, represented as a comma-separated list of floating-point numbers\n\n\nOptional tags:\n\n- `dims` - The dimensions of the embedding vector (integer)\n- `norm` - Boolean attribute whether the vector is normalized to range [0,1]\n- If there is a download link, use the tags `hash` and `hash_type` to verify the model being used.\n- `source` - Original data source that is being embedded. Mainly suited for text. This allows the original data to be attained without fetching the original event.\n- All other tags and labeling conventions may also apply such as specified in [NKBIP-01](nostr:naddr1qqexu6mzd9cz6vp3943h2unpw3jkgttsw43xc6trv96xjmmwwvkhxur9vd5kv6trv96xjmmw94chze3nx9hsygxgne0tdkdtpplrd5fz59n5zec9x9ujqq3xe0cg909pcjfwsk8l4spsgqqqw4rsgxx6hg) and NIP-32.\n\n\nExample event:\n\n```\n{\n  \u0022id\u0022: \u0022\u003Cevent_id\u003E\u0022,\n  \u0022pubkey\u0022: \u0022\u003Cpubkey\u003E\u0022,\n  \u0022created_at\u0022: 1234567890,\n  \u0022kind\u0022: 1987,\n  \u0022tags\u0022: [\n    [\u0022e\u0022, \u0022\u003Coriginal_event_id\u003E\u0022, \u0022\u003Crelay_uri\u003E\u0022],\n    [\u0022model\u0022, \u0022openai\/text-embedding-ada-002\u0022, \u0022\u003Coptional download link\u003E\u0022],\n    [\u0022type\u0022, \u0022text\u0022],\n    [\u0022vector\u0022, [-0.006929,-0.005135,0.003592,...,0.004543]],\n    [\u0022dims\u0022, 1536],\n    [\u0022norm\u0022, true],\n    [\u0022source\u0022, \u0022This is a snippet of the original text content\u0022],\n    [\u0022hash\u0022, \u0022\u003Cstring\u003E\u0022],\n    [\u0022hash_type\u0022, \u0022\u003Cstring\u003E\u0022]\n  ],\n  \u0022content\u0022: \u0022\u0022,\n  \u0022sig\u0022: \u0022\u003Csignature\u003E\u0022\n}\n```\n\n\n## Guidelines\n\n1. For non-text embeddings (images, audio, video), the `source` tag may contain a URL or identifier for the original content.\n2. The `model` tag should be as specific as possible, including version information and location to download if available. This ensures that clients can properly interpret and compare embeddings.\n3. Multiple embedding events can reference the same original event, allowing for different embedding models or content types for the same source material.","image":null,"pubkey":"c89e5eb6d9ab087e36d122a1674167053179200226cbf082bca1c492e858ffac","kind":30023,"createdAt":"2026-03-14T15:08:43+00:00","publishedAt":"2026-03-14T15:08:43+00:00","topics":["nips","nostr","dev","nip","nkbip","knowledge-base","embedding"],"url":"https:\/\/www.decentnewsroom.com\/mag\/nostr-knowledge-base-5c0381\/cat\/nkbip-53fa4c\/d\/nkbip-02-vector-embedding-specification-i95bly"}]}],"chapters":[],"stats":{"totalCategories":1,"totalArticles":2,"totalChapters":0}}