---
title: "Evaluate text similarity of multiple elements"
method: POST
path: "/find/{workspace_id}/evaluate/textSimilarity"
tags: ["Find"]
---

# Evaluate text similarity of multiple elements

`POST /find/{workspace_id}/evaluate/textSimilarity`

Evaluate text similarity of element candidates for find and auto-healing execution using AI

## Path parameters

- `workspace_id` string, required

## Request body

- FindEvaluateTextSimilarityRequest
  - `expected_text` string, required — The text we expect to find on the element based on the find model
  - `candidate_text` FindCandidateText[], required — The ID and text of each candidate for evaluation
    - `id` string, required — The ID of the candidate
    - `text` string, required — The text from the candidate
  - `test_run_id` string, required — The test run ID for which this find and attribute evaluation is being executed
  - `selector_invariant_id` string, required — The selector invariant ID for the element being evaluated
  - `attribute_id` string, required — The ID for the primary text attribute being used for the evaluation

## Response `200`

An evaluation of candidate text for use in executing find and auto-healing

- FindEvaluateTextSimilarityResponse
  - `workspace_id` string, required — The workspace associated with this element and find or auto-heal
  - `candidate_text_matches` FindCandidateTextSimilarity[], required — The candidate text matches to the expected text
    - `id` string, required — The ID of the candidate
    - `text` string, required — The text from the candidate
    - `match` boolean — True if this candidate text matches the expected text
    - `similarity` number, double — 0 to 1 similarity score where 1 is exact match and 0 is no match
  - `expected_text` string, required — The text we expect to find on the element based on the find model
  - `selector_invariant_id` string, required — The selector invariant ID for the element being evaluated
  - `attribute_id` string, required — The ID for the primary text attribute being used for the evaluation

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
