Skip to main content
POST
/
v2
/
evaluators
/
execute
/
semantic-similarity
Execute semantic-similarity evaluator
curl --request POST \
  --url https://api.traceloop.com/v2/evaluators/execute/semantic-similarity \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "completion": "The cat sat on the mat.",
    "reference": "A feline was resting on the rug."
  }
}
'
{
  "similarity_score": 0.92
}

Authorizations

Authorization
string
header
required

Type "Bearer" followed by a space and JWT token.

Body

application/json

Request body

input
object
required

Response

OK

similarity_score
number
Example:

0.92