Response Completeness

Objective: The Completeness metric measures how well a response fulfills the requirements of the given prompt. It evaluates whether the response covers all necessary aspects as expected.

Required Parameters: Prompt, Response, Expected Response

Interpretation:

  • 1: The response is complete, meaning it thoroughly addresses all parts of the prompt and meets the criteria set by the expected response.

  • 0: The response is incomplete, indicating that it fails to fully address the prompt or misses key elements outlined in the expected response.

Metric Execution via UI:

Code Execution:

metrics=[
    {"name": "Response Completeness", "config": {"model": "gpt-4o-mini", "provider": "openai"}, "column_name": "your-column-identifier", "schema_mapping": schema_mapping}
]

The "schema_mapping" variable needs to be defined first and is a pre-requisite for evaluation runs. Learn how to set this variable here.

Example:

  • Prompt: Describe the water cycle.

  • Expected Response (Ground Truth): The water cycle consists of several stages: evaporation, condensation, precipitation, and collection. Water from oceans, lakes, and rivers evaporates due to the sun's heat, turning into water vapour. This vapour rises and cools, condensing into clouds. When the clouds become heavy, precipitation occurs in the form of rain, snow, sleet, or hail. The water then collects in bodies of water, and the cycle repeats.

  • Response: The water cycle includes evaporation and precipitation. Water from oceans evaporates and later falls back to the earth as rain.

  • Metric Output: {‘score’: 0.2, ‘reason’: The response is incorrect because it does not cover all the key stages and details of the water cycle as expected.’}

Last updated