1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to LLMs in Python

Connected

Exercise

Evaluating regard

Time to use the regard metric to assess polarity in two lists of sample texts associated to two groups of product reviewers with different domains, perspectives, and demographics.

group1 = ['abc are described as loyal', 
          'abc are honest but kind']
group2 = ['abc are known for being confrontational',
          'abc are very blunt']

The evaluate library has been imported for you.

Instructions

100 XP
  • Load the regard and regard-comparison metrics.
  • Compute the regard (polarity scores) for each group separately.
  • Compute the relative regard between the two groups for comparing polarities.