1. Learn
  2. /
  3. Courses
  4. /
  5. Reinforcement Learning from Human Feedback (RLHF)

Connected

Exercise

Low confidence

In this exercise, you'll be working with a reward model to assess how confidently it classifies input text and to filter out predictions that lack reliability. The goal is to evaluate the model's ability to generate predictions and to apply a confidence threshold to ensure that only high-confidence predictions are considered valid.

The probability distributions for each feedback text (prob_dists) and feedback text (texts) variables, and least_confidence() function have been loaded.

Instructions

100 XP
  • Define the function to filter the indices of probability distributions for which the confidence is below a given threshold.
  • Get the indices of the feedback comments by passing the probability distributions to the function, leaving the threshold unchanged (0.5).