mix ragex.embeddings.migrate (Ragex v0.12.0)

View Source

Migrates embeddings when changing embedding models.

This task helps handle model changes by detecting dimension mismatches and regenerating embeddings with the new model.

Usage

# Check current model and embeddings
mix ragex.embeddings.migrate --check

# Migrate to a new model (regenerate all embeddings)
mix ragex.embeddings.migrate --model all_mpnet_base_v2

# Force migration (skip compatibility check)
mix ragex.embeddings.migrate --model codebert_base --force

# Clear all embeddings
mix ragex.embeddings.migrate --clear

Options

  • --check - Check current model and embedding status
  • --model MODEL_ID - Migrate to specified model
  • --force - Force migration even if dimensions are compatible
  • --clear - Clear all embeddings (use before switching models)

Model IDs

  • all_minilm_l6_v2 (default) - 384 dimensions
  • all_mpnet_base_v2 - 768 dimensions
  • codebert_base - 768 dimensions
  • paraphrase_multilingual - 384 dimensions