evaluators
Execute semantic-similarity evaluator
Changed onCalculate semantic similarity between completion and reference
Request Body:
- input.completion (string, required): The completion text to compare
- input.reference (string, required): The reference text to compare against
post/v2/evaluators/semantic-similarity/execute
Request
- Base URLhttps://api.traceloop.com
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"input": {
"completion": "The cat sat on the mat.",
"reference": "A feline was resting on the rug."
}
}Response
OK
Example response
{
"similarity_score": 0.92
}Changes
- info
endpoint added
- info
- breaking
api path removed without deprecation
- breaking