curl --request POST \
--url https://app.langwatch.ai/api/evaluations/langevals/similarity/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"data": {
"input": "<string>",
"output": "<string>"
}
}'
[
{
"status": "processed",
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
},
"raw_response": {},
"error_type": "<string>",
"traceback": [
"<string>"
]
}
]
Allows you to check for semantic similarity or dissimilarity between input and output and a target value, so you can avoid sentences that you don’t want to be present without having to match on the exact text.
curl --request POST \
--url https://app.langwatch.ai/api/evaluations/langevals/similarity/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"data": {
"input": "<string>",
"output": "<string>"
}
}'
[
{
"status": "processed",
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
},
"raw_response": {},
"error_type": "<string>",
"traceback": [
"<string>"
]
}
]
Successful evaluation
The response is of type object[]
.
Was this page helpful?