GroundednessEvaluator Class
Initialize a groundedness evaluator configured for a specific Azure OpenAI model.
Usage
eval_fn = GroundednessEvaluator(model_config)
result = eval_fn(
response="The capital of Japan is Tokyo.",
context="Tokyo is Japan's capital, known for its blend of traditional culture and technological advancements.")
Output format
{
"groundedness": 5,
"gpt_groundedness": 5,
}
Note: To align with our support of a diverse set of models, a key without the gpt_ prefix has been added. To maintain backwards compatibility, the old key with the gpt_ prefix is still be present in the output; however, it is recommended to use the new key moving forward as the old key will be deprecated in the future.
Constructor
GroundednessEvaluator(model_config)
Parameters
Name | Description |
---|---|
model_config
Required
|
Configuration for the Azure OpenAI model. |