API Endpoints
LLM Similarity Evaluator
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.
Env vars: OPENAI_API_KEY, AZURE_API_KEY, AZURE_API_BASE
POST
/
langevals
/
similarity
/
evaluate
Body
application/json
List of entries to be evaluated, check the field type for the necessary keys
Evaluator settings, check the field type for what settings this evaluator supports
Optional environment variables to override the server ones
Response
200 - application/json
Available options:
processed
How similar the input and output semantically, from 0.0 to 1.0, with 1.0 meaning the sentences are identical
Passes if the cosine similarity crosses the threshold for the defined rule
Short human-readable description of the result