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
Usegenerate_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.
Read a snapshot
Useget_metadata_snapshot to retrieve the current snapshot, including each key’s type and its top values.
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 withupdate_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.