What can you do with it?

Find the most similar strings from a list by comparing them to a search term. This is useful for fuzzy matching, finding near-duplicates, or ranking items by similarity.

How to use it?

Basic Command Structure

/similarity-search
search term: the string you want to find matches for
items to search: array of strings to compare against

Parameters

Required:

  • search term - The string you want to find matches for

  • items to search - Array of strings to search through

Optional:

  • use smart extraction - Extract and compare only the most relevant parts of paths (default: false)

  • exclude patterns - Patterns to exclude during smart extraction (default: none)

  • split value - Character used to split paths when using smart extraction (default: /)

  • max results - Maximum number of results to return (default: 5)

Response Format

The command returns:

A ranked list of matches with their similarity distances (lower distance = more similar)

Examples

Basic Usage

/similarity-search
search term: lpsum string to compare
items to search: ["first lpsum string", "another possible match", "completely different text", "lpsum sample"]
max results: 3

Find similar product names from a list

Advanced Usage

/similarity-search
search term: lpsum journal name
items to search: ["category/type/lpsum journal name/728x90_top", "category/type/lpsum science journal/300x250_bottom", "category/type/random name/728x90_top"]
use smart extraction: true
exclude patterns: ["x", "_"]
split value: /

Compare file paths with smart extraction to focus on relevant parts

Specific Use Case

/similarity-search
search term: John Smith
items to search: ["Jon Smith", "John Smyth", "Jane Smith", "John Schmidt", "Johnny Smith"]
max results: 5

Find similar customer names in a database for deduplication