Hi! Your approach on indexing the TOKENIZED_DATA object is correct. As next step, you should cal the BM25_RETRIEVER.retrieve function with the appropriate parameters (here you add the tokenized query and the appropriate parameter for the top k).
No, we are not supposed to index the tokenized query with the retriever.
TOKENIZED_DATA is a globally indexed, and ideally there should not be a need to index it again locally. The requirement in the graded cell seems to be a redundancy.
Hi, This assignment is really giving me trouble… I tried to follow the steps exactly as instructed, howver i run into errors. i tried to comment out this line : # Index the tokenized chunks with the retriever
# BM25_RETRIEVER.index(tokenized_query) , i believe i am calling the retrieve method correctly : # Use the ‘BM25_RETRIEVER’ to retrieve documents and their scores based on the tokenized query
# Retrieve the top ‘k’ documents
results, scores = BM25_RETRIEVER.retrieve(tokenized_query , k = top_k) but still encounter errors… i have been at it for a while now
I’m having some similar issue, everything is working fine when i execute my cells, even the tests are all passwed, however when i submit my assignment i got the following error for all graded cells.
There was a problem compiling the code from your notebook, please check that you saved before submitting. Details: name 'BM25_RETRIEVER' is not defined
Hey @jahanzebnawaz, the code for this exercise has just been updated & fixed on Coursera, refreshing your workspace should give you access to the fixed copy of the notebook. Let me know if that solves your issue.