Skip to main content

What is vector?

The vector command manages embedding models and vector indexes that power CIAK's semantic search capabilities. Use it to list, download, and validate embedding models, and to maintain the vector index.

ciak vector <ACTION> [MODEL]

Actions​

ActionDescription
modelsList available embedding models (or show info for a specific model)
listList available embedding models
download <MODEL>Download an embedding model from HuggingFace
info <MODEL>Show detailed information about a model
statusShow current vector search status
validate <MODEL>Validate a downloaded model
rebuildRebuild the vector index
healthCheck vector system health
diagnosticsRun vector system diagnostics
optimizeOptimize the vector index
repairRepair vector corruption
cleanupClean up vector system resources
helpShow embedding help information
check-requirementsCheck embedding system requirements

Supported Models​

CIAK supports two main model architectures:

Sentence-Transformers (BERT-based)​

  • sentence-transformers/all-MiniLM-L6-v2 — lightweight, 384 dimensions, good for general use.

RoBERTa-based​

  • microsoft/codebert-base — optimized for code, 768 dimensions, better for code-specific semantic search.

Examples​

Example 1 — List available models​

ciak vector list

Example 2 — Download a model​

ciak vector download microsoft/codebert-base

Downloads the model to ~/.ciak/models/microsoft/codebert-base/. CIAK automatically detects the model architecture and downloads the correct files.

Example 3 — Validate a downloaded model​

ciak vector validate microsoft/codebert-base

Checks that all required files are present and the model configuration is valid.

Example 4 — Check vector system health​

ciak vector health

Example 5 — Rebuild the vector index​

ciak vector rebuild

Useful if the index becomes corrupted or after changing models.

Input and output examples​

Representative CLI output (truncated; exact formatting may vary by version):

Check vector health​

Input

ciak vector health

Output

Vector system health: OK
Model installed: sentence-transformers/all-MiniLM-L6-v2
Vector index: ready
Indexed embeddings: 3271

Rebuild the index​

Input

ciak vector rebuild

Output

Rebuilding vector index...
Processed symbols: 3271
✓ Vector index rebuilt successfully

How embeddings work​

  1. Download a model — ciak vector download <MODEL>
  2. Scan with embeddings — ciak scan --embeddings
  3. Search semantically — ciak search "your query" --semantic

During scanning, CIAK generates a vector embedding for each code symbol using the format:

<type> <name> lang:<language> context:<code>

At search time, your query is embedded using the same model and compared against stored embeddings using cosine similarity.

  • scan — use --embeddings to generate vectors during scanning.
  • search — use --semantic or --hybrid to leverage embeddings.
  • MCP Tools — vector_search — the MCP tool for semantic search.