Record Similarity
Record similarity is a way to see how alike objects are. You can use this to find objects that look like a specific one. For instance, if you have many Google Docs, you can use this to find docs that are like Doc A. In the past, you had to look at things like keywords or topics to find similar items. But with similarity search in Unbody, this isn’t necessary. You can compare the whole document.
Syntax
Similarity search can be performed on any object. Here’s how:
Usage
Example 1 - Google Docs
Find Google Docs that are similar to a specific Google Doc.
Example 2 - Discord messages
Example 3 - Any text block
Arguments
Name | Type | Description |
---|---|---|
id* | string | The ID of the object to find similar items to |
certainty | number | Normalized similarity threshold between 0 (identical) and 1 (completely different) |
distance | number | Distance threshold for similarity matching |