Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:AI Northstar Tech Vector io VDF Metadata Schema

From Leeroopedia
Knowledge Sources
Domains Metadata, Schema, Interoperability
Last Updated 2026-10-15 00:00 GMT

Overview

A schema-based metadata contract that uses Pydantic models to define a universal intermediate format (VDF) for representing vector datasets, enabling cross-database interoperability.

Description

The VDF (Vector Data Format) Metadata Schema defines the contract that enables vector data to be exported from one database and imported into another. It consists of two Pydantic models:

VDFMeta (top-level): Contains version, file structure, author, export source, export timestamp, optional ID column name, and a dict of indexes. Each index maps to a list of NamespaceMeta objects, supporting multi-namespace indexes.

NamespaceMeta (per-namespace): Contains the namespace name, index name, total and exported vector counts, dimensions, model name, vector column names, data path (relative to VDF root), distance metric (standardized), optional index configuration, model map (vector column → model metadata), and the parquet schema as a string (schema_dict_str).

The schema is serialized to VDF_META.json in the root of every VDF export directory. This JSON file serves as:

  • Import manifest: Tells the import tool what indexes, dimensions, and metrics to create in the target database.
  • Provenance record: Records which database and library version produced the export.
  • Schema reference: The schema_dict_str field preserves the parquet column structure for validation.

Version checking during import uses packaging.version.Version to warn when the importing library is older than the exporting library.

Usage

Use this principle when designing systems that need a portable, schema-validated intermediate format for vector data exchange. It is suited for:

  • Cross-database migration tools
  • Vector dataset backup and restore
  • HuggingFace dataset publishing of vector data
  • Any system where vector data must be transferred between heterogeneous storage backends

Theoretical Basis

The VDF metadata structure:

# Abstract schema definition (NOT real implementation)
class VDFMeta:
    version: str             # Library version that produced the export
    file_structure: List[str] # List of parquet file paths
    author: str               # OS username of the exporter
    exported_from: str        # DB_NAME_SLUG of source database
    indexes: Dict[str, List[NamespaceMeta]]  # Index name → namespaces
    exported_at: str          # ISO timestamp
    id_column: str            # ID column name (default: "id")

class NamespaceMeta:
    namespace: str            # Namespace within the index
    index_name: str           # Index/collection name
    total_vector_count: int   # Total vectors in source
    exported_vector_count: int # Vectors actually exported
    dimensions: int           # Vector dimensionality (-1 if unknown)
    model_name: str            # Embedding model name
    vector_columns: List[str]  # Column names containing vectors
    data_path: str             # Relative path to parquet files
    metric: str                # Standardized Distance enum
    model_map: Dict[str, Any]  # Vector column → model metadata
    schema_dict_str: str       # Parquet schema as string

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment