openai-cookbook icon indicating copy to clipboard operation
openai-cookbook copied to clipboard

Fix error in compute_doc_embeddings example to return expected value/shape in Question_answering_using_embeddings.ipynb

Open bebrws opened this issue 2 years ago • 1 comments

From reading the code sample in the notebook below this change I can see that these 2 functions (compute_doc_embeddings and load_embeddings) were supposed to return the same "shape". This PR is to fix this issue that may not be noticed because the code calling compute_doc_embeddings is commented out.


    document_embeddings = load_embeddings("https://cdn.openai.com/API/examples/data/olympics_sections_document_embeddings.csv")

    # ===== OR, uncomment the below line to recaculate the embeddings from scratch. ========

    # document_embeddings = compute_doc_embeddings(df)

bebrws avatar Mar 03 '23 17:03 bebrws

I will take a look at this - thanks!

ted-at-openai avatar Mar 16 '23 23:03 ted-at-openai

I'm doing a full rewrite of this example and will fix this up.

ted-at-openai avatar Mar 28 '23 23:03 ted-at-openai

Fixed!

ted-at-openai avatar Apr 14 '23 19:04 ted-at-openai

Awesome, thanks for such a great write up! So helpful!

bebrws avatar Apr 26 '23 23:04 bebrws