Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions content/deed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ deed req -k 1 -l 50 --store ~/.deed/db --local # again, dialling n

The second command opens no socket, and the events it prints are the same events: what is stored is what was signed, so they still verify. Every event is checked before it is stored or printed, so a relay cannot put a forgery, or an event nobody asked for, into the store or the output.

## Judging what it fetches

deed's output is one verified event per line, which makes it a clean first stage for anything that classifies text. The [Jev example](https://github.com/zig-nostr/deed/tree/main/examples/jev) fetches the newest thousand notes from five relays, drops the app data some clients publish as notes, and has [Jev](https://docs.typesafe.ai), TypeSafe's classification model, answer three questions about each: what it is about, how much substance it carries, and whether it is spam. The thresholds that decide what to keep are plain constants in the script.

```sh
export TYPESAFE_API_KEY=...
examples/jev/rank-notes.sh 1000 > ranked.jsonl # most substance first, spam dropped
```

On one run, 629 of 1,000 notes were text worth judging, 157 of those were dropped as spam, and the whole run cost about two cents. The example's README has the full numbers and what to watch for.

## How fast it is

A one-shot command runs in about 2.3 ms and under 2 MB of memory. deed signs and verifies about 31,000 events a second each, stores 100,000 events from a relay at about 17,000 a second, and answers a lookup from that store in about 3 ms, start to finish. The full numbers, and how to reproduce them, are on the [performance page](/performance#deed).
Expand Down
1 change: 1 addition & 0 deletions public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Every page on this site is also served as Markdown at its path with `.md` added

- [Everything in one file](/llms-full.txt)
- [deed benchmarks](https://github.com/zig-nostr/deed/blob/main/BENCHMARKS.md)
- [Ranking a nostr feed with deed and Jev](https://github.com/zig-nostr/deed/tree/main/examples/jev): a worked pipeline that classifies notes by topic, substance and spam, with a real run's numbers and cost
Loading