Skip to main content
A metadata snapshot is a compact summary of the user-defined metadata in a vector database. It captures the most common keys, the most frequent values for each key, and each key’s inferred type, giving you a quick view of the metadata present across the database’s chunks. A snapshot captures up to the 100 most common keys, with up to the 10 most common values per key, sampled from as many as 10,000 chunks.

Prerequisites

A populated vector database whose chunks carry user-defined metadata. To attach metadata during ingestion or edit it afterward, see Manage chunk metadata.

Generate a snapshot

Use generate_metadata_snapshot to build or rebuild the snapshot for a vector database. The call samples the index, ranks the keys and values by frequency, and stores the result.
Generating a snapshot replaces the previous one for that vector database rather than adding to it. Returns:

Read a snapshot

Use get_metadata_snapshot to retrieve the current snapshot, including each key’s type and its top values.
Returns:

Keep the snapshot current

SeekrFlow regenerates the snapshot automatically after an ingestion job adds documents to the vector database, so newly introduced keys and values reach the agent without any manual action. Generate a snapshot manually whenever you want to refresh it on demand, such as after editing metadata in place with update_metadata.

Limitations

  • A snapshot includes only the 100 most common keys, with the 10 most common values each. Metadata that appears rarely across the sampled chunks might not be represented.
  • Values are ranked by how often they occur in the sample, so their order reflects frequency, not business priority.
Last modified on July 13, 2026