Skip to content

similar

fialr similar <file> [options]

Find files in the corpus that are semantically similar to the given file, ranked by cosine similarity. Uses stored vector embeddings.


ArgumentDescription
filePath to the reference file
OptionDescription
--limit NMaximum results (default: 10)
--threshold NMinimum similarity score, 0.0–1.0 (default: 0.0)
-v, --verboseShow debug output

Retrieves the stored embedding for the given file and compares it against all other embeddings in the corpus using cosine similarity. Results are ranked by similarity score and returned with file metadata.

If the reference file does not have an embedding, run fialr embed first.


similar ~/Documents/2024-q1_report.pdf
SIMILAR 8 files (threshold: 0.0)
────────────────────────────────────────────────────────
0.94 financial/2024-q2_report.pdf
quarterly, financial, revenue
0.91 financial/2024-q3_report.pdf
quarterly, financial, revenue
0.87 financial/2023-annual_report.pdf
annual, financial, revenue
0.82 work/quarterly_review_template.docx
quarterly, template, review
0.74 financial/2024-budget_forecast.xlsx
budget, forecast, financial

Terminal window
# Find files similar to a specific document
fialr similar ~/Documents/contract.pdf
# Limit to top 5 results above 0.8 similarity
fialr similar ~/Documents/contract.pdf --limit 5 --threshold 0.8

  • embed — generate embeddings for the corpus
  • search — semantic search with --semantic flag
  • Deduplication guide — embedding-based near-duplicate detection