Custom Metrics
Evaluate your LLM outputs with easy-to-implement custom metrics
Make sure you have your OpenAI API Key before you begin.
Custom Metrics
custom_metrics()
Quickly create bespoke metrics to evaluate outputs based on other specific criteria. Implement constraints and automatically check if your LLM outputs meet these constraints. Returns a list of booleans: one for each guideline / constraint you provide.
Param
Type
Description
output
str
the response from your LLM
constraints
List[str]
List of constraints you want to check your LLM output against
Output Type
Output Definition
List[str]
a list of booleans: one for each guideline you provide
"True" signifies that the output has violated the constraint
Last updated