find_similar
Find documents with similar meaning to a given file by comparing stored embeddings. Use to discover related notes, duplicate content, or same-topic files.
Instructions
Find indexed documents most similar in meaning to a given file.
Use for "more like this" — e.g. finding related notes, duplicate
content, or other documents on the same topic. path must be a file
inside a registered folder that has already been indexed. Similarity
uses stored embeddings (whole-file centroid vs. best-matching chunks),
so it works even if the embedding model is not currently loaded.
Returns {ok, source, similar: [{path, file_type, score, preview},
...]}. score is cosine similarity (0-1, higher is more similar);
preview is the best-matching section's heading or opening text.
Returns an error if the file has no stored embeddings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| top_k | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||