liminal on Nostr: Happy Thanksgiving Fiatjaf, here's a demo that grabs nostr events, converts and ...
Happy Thanksgiving Fiatjaf, here's a demo that grabs nostr events, converts and stores their binary embeddings and retrieves the 5 closest and most different events from the query. Minimal demo, lots of places to improve on.
Can anyone teach me how to do this? https://emschwartz.me/binary-vector-embeddings-are-so-cool/
There is so much jargon about this stuff I don't even know where to start.
Basically I want to do what https://scour.ing/ is doing, but with Nostr notes/articles only, and expose all of it through custom feeds on a relay like wss://algo.utxo.one/ -- or if someone else knows how to do it, please do it, or talk to me, or both.
Also I don't want to pay a dime to any third-party service, and I don't want to have to use any super computer with GPUs.
Thank you very much.
https://github.com/limina1/nostr-binary-embedding-demo/Published at
2024-11-28 20:29:08Event JSON
{
"id": "700348241cda517660019210d6e8f5889f54ad989632ef9998f4e2629d8afd56",
"pubkey": "dc4cd086cd7ce5b1832adf4fdd1211289880d2c7e295bcb0e684c01acee77c06",
"created_at": 1732825748,
"kind": 1,
"tags": [
[
"e",
"4e10bf0777aacc26d338be497a4b0e9ac5a9909e16519530548ff9b1c80a909a",
"",
"mention"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
"",
"mention"
]
],
"content": "Happy Thanksgiving Fiatjaf, here's a demo that grabs nostr events, converts and stores their binary embeddings and retrieves the 5 closest and most different events from the query. Minimal demo, lots of places to improve on.\n\nnostr:nevent1qvzqqqqqqypzqwlsccluhy6xxsr6l9a9uhhxf75g85g8a709tprjcn4e42h053vaqqsyuy9lqam64npx6vutujt6fv8f43dfjz0pv5v4xp2gl7d3eq9fpxskd8zzj\n\nhttps://github.com/limina1/nostr-binary-embedding-demo/",
"sig": "4cb570b17f47d584011b5f98c80c3802379617282170820a15660da09ac34e470ba5473739b7c0e99b872be408bece2eb52cb6bfefcfefeb4aff52e7245785a4"
}