1. Learn
  2. /
  3. Courses
  4. /
  5. Natural Language Processing (NLP) in Python

Connected

Exercise

Does the text answer the question?

A content moderation team in a large tech company needs to automatically validate whether a passage from a knowledge base answers a customer query. They want to speed up the process using a pre-trained QNLI model to assess the relevance of each response. Your goal is to implement a solution that can classify whether a given passage contains the answer to a specific question.

Instructions

100 XP
  • Initialize a classifier pipeline with a suitable QNLI model, such as "cross-encoder/qnli-electra-base".
  • Use this pipeline to evaluate whether the given passage answers the question.