Determining how closely a text matches a reference entry can streamline tasks like content categorization or document comparison. This guide will show you how to use the AI Column Node to add similarity scores for text entries.
Comparing student assignments to detect similarities and potential plagiarism.
Ensuring academic integrity by identifying copied content across multiple documents.
Content Categorization
Grouping similar customer reviews to identify common feedback themes.
Automatically tagging content with relevant categories based on similarity scores.
Document Comparison
Comparing different versions of legal documents to identify changes and similarities.
Ensuring consistency across multiple versions of business reports and presentations.
Customer Support
Identifying common issues in customer reviews by comparing them to known issues.
Streamlining responses by recognizing frequently mentioned problems.
Step-by-step instruction
Step 1. Set Input Dataset
Consider a dataset containing customer reviews where you need to compare each review to a reference review. Here is a sample dataset before adding similarity scores:
{{line}}
Step 2. Define the AI Prompt
The most crucial aspect of leveraging AI effectively is crafting a precise and relevant prompt. A well-defined prompt ensures the AI understands the task clearly, leading to accurate and useful outputs. This involves being specific about the desired outcome, providing necessary context, and avoiding ambiguity.
Prompt Example
Compare the review text in @Review_Text to the reference review in @Reference_Review and provide a similarity score as a percentage.
Why This Prompt Is Good
Clearly specifies the task (comparing text for similarity) and the columns involved (@Review_Text and @Reference_Review).
Directs the AI to produce a quantifiable similarity score as a percentage, which is straightforward to interpret.
Ensures the AI understands the context of comparing two pieces of text for a specific type of similarity metric (percentage match).
{{line}}
Step 3. Configure the Flow Designer
Add the input dataset to the flow designer.
Select the AI Column node from the tools panel and enter the prompt.
Start with a row-by-row execution to fine-tune your prompt.
Correct your prompt, regenerate any single row, or remove all previous results.
Once you satisfied with the prompt, apply the AI Column Node to all rows (it will be applied only for empty cells).
For very large datasets that are bigger than 10,000 rows, run the flow for runtime processing over the whole dataset. Be aware that it can be costly for a large amount of data.
{{line}}
Step 4. Get Final Result
Here is the dataset after using the AI Column Node to add similarity scores: