Skip to content

Benchmark: Contextual features for relay scoring #12

Description

@alltheseas

Summary

Use relay metadata (NIP-11 capabilities, NIP-66 health, paid vs free, estimated retention window) as features to estimate relay quality for new/unseen relays without exploring from scratch.

Why

When a new relay appears in someone's NIP-65 list, the current algorithms have no prior information — they must explore it from zero. Relay metadata provides useful signals: a paid relay with NIP-11 advertising unlimited retention is likely better for archival than a free relay with no retention claim. NIP-66 liveness data can pre-filter dead relays. These contextual features would reduce the cold-start problem.

What to do

  1. Collect NIP-11 info and NIP-66 health data for all relays in the dataset
  2. Define features: paid/free, retention policy, NIP-66 online/offline/dead status, supported NIPs
  3. Use features to initialize MAB priors (contextual bandits) or as multipliers in scoring
  4. Benchmark against feature-blind algorithms across all 6 time windows

Effort

Higher — requires fetching and parsing NIP-11/NIP-66 data, defining feature encoding, and integrating into the scoring pipeline.

Reference

  • IMPLEMENTATION-GUIDE.md: Improvement Opportunities (higher effort)
  • IMPLEMENTATION-GUIDE.md §3: Pre-filter relays with NIP-66

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions