Calculate Similarity Node
Calculates the similarity between two strings using embeddings.
Inputs
Label | Property | Type | Description | Default Value | Is Required |
---|---|---|---|---|---|
text_input 1 | string1 | botdojo/types/string | First string | null | |
text_input 2 | string2 | botdojo/types/string | Second string | null |
Properties
Label | Property | Type | Description | Default Value | Is Required |
---|---|---|---|---|---|
Embedding Model Configuration | embeddingModelConfig | botdojo/types/embedding_model | The embedding provider and model configuration. | Object |
Output
Label | Property | Type | Description | Default Value |
---|---|---|---|---|
Similarity Score | similarityScore | botdojo/types/number | The calculated similarity score between two strings | null |
Get Similarity Node
The Get Similarity Node calculates the similarity score between two text strings using specified embedding models. This is useful for text comparison applications such as content recommendation, duplicate detection, or semantic search.
How It Works
- Receives two strings as input.
- Retrieves the configured embedding model and computes embeddings for both strings.
- Calculates the dot product of these embeddings to determine the similarity score.
- Outputs the similarity score, which indicates how similar the two strings are.
Example Flow
An example flow diagram can be found at the provided URL.
Use Cases
- Content Recommendation: Recommend content similar to user preferences by comparing similarity between content pieces.
- Duplicate Detection: Identify duplicate or similar text entries in a dataset.
- Semantic Search: Find semantically similar search results, even if exact words differ.
This node enables advanced text analysis by leveraging machine learning models for natural language processing.