Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. Match webhook format
  2. Webhook
  3. When fetching a dataset row
  4. Respond to Webhook
  5. Evaluating?
  6. Set metrics
  7. Extract code from image
  8. Calc string distance
  9. Download image

Similar automations