Embed Sentinel-2 records with Clay#

Use the Clay encoder through the shared retrieval API: resolve a catalog record, embed it and read back the original vector.

Prerequisites#

  • The Clay and Sentinel packs are both in the deployment’s parts list.

  • An operator has enabled the reviewed clay-s2 profile in the embedding profiles and in the private retrieval configuration (clay_profile_id), and runs the retrieval worker. The API image stays CPU-only; the encoder runs on a GPU with its own admission.

  • A Sentinel-2 L2A catalog record with all ten required bands.

  • An owner-scoped saved embedding setup.

Steps#

  1. Identify the exact record with the catalog and media APIs, and check that its ten bands are present. Catalog ingest stores metadata only and computes no embeddings. packs/clay/scripts/stage-clay-demo.py stages one to three verified records into a separate development collection.

  2. Choose the Clay space from client.retrieval.contracts(), resolve the exact catalog source, and create an explicit corpus.

  3. Submit a retrieval job for the source and space with your saved embedding setup.

  4. Read the job and its artifact IDs, then read the original vectors and verify their FP32 checksum and source and preparation identity.

The full API and client walk-through is in Search with corpora.

Chip grids#

A fixed chip grid is a deployment recipe, set in clay_grid_sets of the retrieval configuration (up to eight sets; examples in packs/clay/examples/grids.json). Every distinct grid and preparation gives a distinct space identity. Query only a profile that matches the exact space: a center-chip vector and an eight-chip grid are not interchangeable.

What a result proves#

A retained original proves that preparation and model inference completed. It does not prove the index is searchable: the worker aggregates real work until the GPU construction minimum is met, and publication needs verified index and segment readiness. There is no padding and no exact-search fallback in production. Do not relabel imported Clay vectors as freshly encoded output.

Result#

You hold an original vector with its provenance. packs/clay/scripts/canary-production-clay.py checks new originals and replay, and a supplied published corpus, for an operator.