Skip to content

Conversation

@jamescalam
Copy link
Collaborator

Updates outdated models and Q&A from old RAG chatbot notebook. Also updates the langchain-pinecone package to the latest version 0.2.5

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jhamon jhamon self-requested a review April 15, 2025 16:23
Copy link
Collaborator

@jhamon jhamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few details need adjusting, but overall this is a very nice update. Thanks!

"id": "CK13RD1jZrwL"
},
"source": [
"Then we initialize the index. We will be using OpenAI's `text-embedding-ada-002` model for creating the embeddings, so we set the `dimension` to `1536`."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to update this text to refer to ext-embedding-3-small

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

"id": "AulXyZWNZrwM"
},
"source": [
"Our index is now ready but it's empty. It is a vector index, so it needs vectors. As mentioned, to create these vector embeddings we will OpenAI's `text-embedding-ada-002` model — we can access it via LangChain like so:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model name needs updating here as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

" # if does not exist, create index\n",
" pc.create_index(\n",
" index_name,\n",
" dimension=1536, # dimensionality of embed 3 small\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the actual model name in this comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

" spec=spec\n",
" )\n",
" # wait for index to be initialized\n",
" while not pc.describe_index(index_name).status['ready']:\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sleeps are not necessary. This whole cell needs to be updated along the lines of the modernization guide https://www.notion.so/Python-docs-examples-modernization-guide-1ae2b1c5593b80eaaa2bf791bfbe900b#1ae2b1c5593b80eaaa2bf791bfbe900b

Especially:

  • Remove unnecessary sleeps
  • Use kwarg names for all arguments, including name
  • Don't say "connect"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't access the link, but I followed what is in the hello pinecone aws notebook — let me know if the update is correct

@jhamon
Copy link
Collaborator

jhamon commented Apr 16, 2025

Looks good, thanks!

@jamescalam jamescalam merged commit 08d0ed0 into master Apr 18, 2025
10 checks passed
@jamescalam jamescalam deleted the james/rag-chatbot-update branch April 18, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants