langfair.metrics.recommendation.metrics.serp.SERP#

class langfair.metrics.recommendation.metrics.serp.SERP#

Bases: Metric

__init__()#

This class computes the SEarch Result Page misinformation Score (SERP).

Methods

__init__()

This class computes the SEarch Result Page misinformation Score (SERP).

evaluate(list1, list2)

This method computes SERP score between two lists.

evaluate(list1, list2)#

This method computes SERP score between two lists.

Parameters:
  • list1 (list of strings) – A list of recommendation from an LLM model.

  • list2 (list of strings) – Another list of recommendation from an LLM model.

Returns:

SERP metric value for the two provided lists of recommendations (float)

Return type:

float