embed
fialr embed <target> [options]Compute vector embeddings for files in the target directory. Embeddings enable semantic search, enrichment context, and embedding-based deduplication. Runs locally via Ollama.
The recommended way to compute embeddings is via fialr enrich --embed-only <target>. This computes embeddings without running AI text extraction or inference. Use it to backfill embeddings for files enriched before embeddings were enabled, or to recompute after a model change.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
target | Directory or file to embed |
Options
Section titled “Options”| Option | Description |
|---|---|
--model MODEL | Embedding model (default: nomic-embed-text) |
--force | Recompute embeddings for files that already have them |
--limit N | Maximum files to process |
-v, --verbose | Show debug output |
What it does
Section titled “What it does”For each file in the target that has been enriched (has metadata in the database), embed extracts the text content, sends it to the configured embedding model via Ollama, and stores the resulting vector in the embeddings table.
Vectors are stored as packed binary (little-endian floats) for efficient storage and retrieval. The default model (nomic-embed-text) produces 768-dimensional vectors with an 8192-token context window.
If the embedding model is not yet pulled, fialr auto-pulls it on first use.
What embeddings enable
Section titled “What embeddings enable”- Semantic search.
fialr search --semanticfinds files by meaning, not keywords. - Similar files.
fialr similarfinds semantically related files across the corpus. - Enrichment context. During enrichment, embeddings locate similar high-confidence files to use as few-shot examples, improving metadata quality as the corpus grows.
- Embedding-based dedup. Supplements hash-based and TF-IDF near-duplicate detection with semantic similarity.
Output
Section titled “Output”embed ~/Documents
EMBED Processing 2,847 files──────────────────────────────────────────────────────── model nomic-embed-text (768 dims) new 2,312 embeddings computed skip 535 already embedded fail 0 errorsExamples
Section titled “Examples”# Embed all enriched files in a directoryfialr embed ~/Documents
# Recompute all embeddings (e.g., after model change)fialr embed ~/Documents --force
# Embed a single filefialr embed ~/Documents/contract.pdfConfiguration
Section titled “Configuration”Embedding settings in fialr.toml:
[embeddings]enabled = truemodel = "nomic-embed-text"dimensions = 768similarity_threshold = 0.8Set enabled = false to disable all embedding functionality.
See also
Section titled “See also”- enrich —
--embed-onlyflag for embedding without inference - search — search with
--semanticor--similarflags - Enrichment guide — how embeddings improve enrichment quality
- Search guide — semantic search workflow