Check out the People Discovery (kind 5301), done on the terminal because clients don't support it yet.

This DVM searches for pubkeys that another pubkey might want to follow based on its existing follows. If the "source" pubkey is not specified in the job input, the results are returned for the pubkey who signed the job request.

Example request:

```json

{

"content": "",

"kind": 5301,

"tags": [["p", "f45f5667ffe7649d7c9f648930c9498cda88974e7ea28929194d0167cdcbc124"]]

}

```

Example using nak:

```shell

# create kind 5301 job request to get follow recommendations for the dataMachine pubkey, and send to a relay

EVENT=$(nak event -k 5301 --tag param="f45f5667ffe7649d7c9f648930c9498cda88974e7ea28929194d0167cdcbc124;p" wss://relay.primal.net)

# extract event ID

EVENT_ID=$(jq -r '.id' <<< $EVENT)

# query relay for the response

nak req --stream -k 6301 --tag e="$EVENT_ID" wss://relay.primal.net | jq

```

## People Search (kind 5303)

This DVM searches for pubkeys by looking at the `name` and/or `display_name` fields in their profile metadata:

- It checks all profiles in our database, and calculates a similarity score based on the job input.

- To avoid returning spammy/scammy profiles, the similarity score is multplied by a ranking score derived from how many reputable profiles follow the matching profile.

- Given the input `jack`, there will be lots of perfect matches, but the first result will be Jack Dorsey's pubkey.

**Example request:**

```json

{

"content": "",

"kind": 5303,

"tags": [

["i", "jack", "text"],

["param", "max_results", "10"]

]

}

```

**Example using nak:**

```shell

# search for the dataMachine profile, add a typo on purpose

EVENT=$(nak event -k 5303 --tag i="datamchaine;text" wss://relay.primal.net)

# extract event ID

EVENT_ID=$(jq -r '.id' <<< $EVENT)

# query relay for the response

nak req --stream -k 6303 --tag e="$EVENT_ID" wss://relay.primal.net | jq

```

https://m.primal.net/PWtN.mov

Reply to this note

Please Login to reply.

Discussion

For those of us in the back of the room…

I assume when you say “terminal” you are not referring to Terminal on a Mac…as I don’t see in the code where a Mac would know what to connect to…

But maybe I’m dumber than I look 🤣

Where do we go to execute this?

Yes, Terminal on a Mac. Install golang and then download fiatjaf's nak from GitHub

How do you define what a "reputable profile" is?

Would you be interested in working on the same standard as us to help interoperability?

Hi, I keep getting: Could not connect to LLM