Library / Building Blocks & Utilities
Building Blocks & Utilities
Evaluate Text Similarity with String Distance and OpenAI
When a webhook or dataset row triggers it, OpenAI extracts code from an image and a string distance score measures similarity to the expected text.
What it does
## How it works This template shows how to calculate a workflow evaluation metric: text similarity, measured character-by-character. The workflow takes images of hand-written codes, extracts the code and compares it with the expected answer from the dataset. The images look like this: You can find more information on workflow evaluation here, and other metric examples here.
The steps
- Match webhook format
- Webhook
- When fetching a dataset row
- Respond to Webhook
- Evaluating?
- Set metrics
- Extract code from image
- Calc string distance
- Download image
Similar automations
Data Sync & ETLEstimate Driving Time and Distance with OpenRouteService7 stepsAI Agents & AssistantsEvaluate AI Agent Relevance with OpenAI and Cosine Similarity17 stepsBuilding Blocks & UtilitiesBuild a URL String from a Webhook Request14 stepsBuilding Blocks & UtilitiesValidate JSON Strings via Webhook3 steps