Hi all,
Would it be possible to update Lesson 5? It appears that the evaluations module has changed. I believe it happened in version 0.0.258 and the current notebook environment is running langchain 0.0.179. If running the latest, predictions = qa.apply(examples) throws an error.
The lesson is still not updated so I came up with this workaround (it might help you). We define a new examples list excluding the manual elaborated ones and extracting the query-set pair from ‘qa_pairs’ as follows:
modified_examples = [example['qa_pairs'] for example in examples[2:]]
# we add the hardcoded examples again to modified_examples
predictions = qa.apply(modified_examples)
Note : Please make sure to replace all the following instances of examples by modified_examples or just define examples again following above idea (although I prefer having a new variable so you can recall this issue if you revisit the code later on)