Skip to main content

Enrichment

Version: V2
View Markdown

Enrichment adds evidence to a classified atom. A provider adapter can return an artifact, such as a catalog record with a title and artist credit. A separate extraction step selects fields for the classification and records their sources. An application can refresh these descriptions while retaining the IID and exact atom bytes it already uses.

Builds on: Atom classification, The IID registry.

Implemented by: @0xintuition/atom-enrichment.

How it works​

  1. Plan. Use the IID registry to find candidate providers for the identifier. A plan describes capabilities. No provider has run at this point.
  2. Execute. Give the enrichment engine a classified input, identifier hints, and the plugins you selected. A matching adapter can return an artifact with provider metadata. Inspect the artifacts, errors, and skipped providers together. For example, Core documents keyless MusicBrainz access and separate credentials for Spotify. Enrichment engine, Core provider configuration.
  3. Extract. Apply the field extractor for the classification. Keep accepted values with their field provenance, dropped fields with their reasons, and the list of missing required fields. Some extraction paths can make additional requests. The catalog fixture supplies a fetcher that rejects remote requests. Field extraction, field result types.

Example​

The recording fixture runs a local adapter with the synthetic recording's MusicBrainz ID. The adapter returns one artifact containing the name One More Time and an artist credit. Its metadata identifies the provider as local-synthetic-fixture and supplies the fetch time and source URL.

The recording extractor returns an empty values object and lists name in missingRequired. Although the name is present in the artifact, the pinned extractor does not map this artifact into recording fields. A catalog can keep the artifact available for review and leave the required name unfilled. If the identifier hint is removed, the same adapter is skipped. MusicBrainz artifact format.

Common mistakes​

  • Showing a provider listed in a plan as the source of a fact. Attribute a value to the artifact or extraction result that actually supplied it.
  • Dropping successful artifacts because another provider failed. Save the available evidence and its errors so the caller can decide whether to retry.
  • Rebuilding an existing atom's bytes after a display title changes. Store refreshed evidence separately when the atom should keep its ID.

Next​

Atom runtime and pipelines explains how a host shares engines, limits concurrent work, and releases resources.

Applies to V2 · @0xintuition/atom-enrichment 0.1.1