How do I debug my semantic_search_retrieve? I seem to consistently be getting inaccurate outputs but even when I follow the examples extremely closely it still seems to be sending the wrong documents.
that is stating you to check if indexing is done correctly
Hi @0rb
For Code line
Calculate the cosine similarity scores between the query embedding and the pre-computed document embeddings
similarity_scores = You are using incorrect (global) variable recall for query embedding, query_embed isn’t correct.
remember the previous code line generates the embedding for the query using the pre-trained model, apply the same embedding recall to the cosine similarity score.
Also as extra tip on coding and debugging, when you are referring code section or instructions, make sure if your grade function is explicitly looking for local variable arguments or a global variable recall. This way you are focused on the grade function codes you are working and also getting help from the instructions and other code cells.
Keep Learning!
Regards
DP
