Nous.Eval.Guard.Registry (nous v0.21.1)

Copy Markdown View Source

The compiled-in registry of guard datasets mix nous.eval.datasets.fetch may download: per source, the files pinned to an upstream commit with their sha256, the licence and its status, and the adapter that turns an upstream row into a nous.guard_case/1 case.

StatusMeaning
:allowedpermissive licence (MIT, Apache-2.0, CC-BY-4.0, ...)
:termsredistributable but use-restricted: fetched only with --accept-terms <id>, recorded in the manifest, never committed
:deniednon-commercial, copyleft, no licence or private: never fetched

Licences were read from the HF Hub API (cardData.license) and the GitHub licence API at the pinned revisions (2026-11-01). Checksums are of the exact files at those revisions; a download that does not match is refused before it is parsed.

The nous_builtin source is Nous's own guard dataset (test/fixtures/guard/*.jsonl in the repository) at the GitHub tag of this release, v0.21.1: the Hex package does not ship it.

Summary

Functions

The source registered as id ("name" or "name@revision"; only the pinned revision can be fetched, because only its checksums are known), in sources (default sources/0).

Every registered source.

Types

file()

@type file() :: %{
  name: String.t(),
  url: String.t(),
  sha256: String.t(),
  format: :csv | :json | :jsonl | :parquet | :guard_jsonl,
  split: String.t() | nil,
  max_bytes: pos_integer()
}

source()

@type source() :: %{
  id: String.t(),
  title: String.t(),
  homepage: String.t(),
  license: String.t(),
  license_url: String.t() | nil,
  status: :allowed | :terms | :denied,
  reason: String.t() | nil,
  revision: String.t() | nil,
  gated: boolean(),
  public: boolean(),
  surfaces: [Nous.Eval.Guard.Case.surface()],
  attribution: String.t(),
  files: [file()],
  adapter: (file(), map(), non_neg_integer() -> {:ok, map()} | :skip) | nil
}

Functions

fetch(spec, sources \\ sources())

@spec fetch(String.t(), [source()]) :: {:ok, source()} | {:error, String.t()}

The source registered as id ("name" or "name@revision"; only the pinned revision can be fetched, because only its checksums are known), in sources (default sources/0).

sources()

@spec sources() :: [source()]

Every registered source.