13 Comments

Great post! I have just started following along but getting a "NameError: name 'partition_pdf' is not defined" at the pdf loader step: docs = loader.load()

Using default Google Colab notebook. After some online search, downgraded "unstructured" package to 0.7.12, but still get the error. Would be nice if you can update the post with the Python version/env details.

Expand full comment

Excellent post !! Easy to follow along !! What is the python version you are using? I am getting error when trying to import langchain.experimental .. "ModuleNotFoundError: No module named 'langchain.experimental" . Have seen there are some python version dependency? I am using default colab version of 3.10.12.

Expand full comment

I think Langchain is updated its versions very fast and experimental doesn't exist anymore I think

Expand full comment

Great content! I just managed to get the whole thing up and running and started wondering if we can use a chat model instead of llm as retrieval?

Expand full comment

Yes you can

Expand full comment

Amazing, beautifully written and a great example. Looking forward to learn more about LLM's from you. Probably if you have some time could you write a how LLM works, best practices of prompt engineering to have a holistic view of the LLM's landscape.

Expand full comment

The tutorial uses PineCone as vector database. What if I wanted to use a different vector db? Pinecone at $70 per month is a tad pricey! Any ideas?

Expand full comment

Look at the documentation. It integrates with 30 different databases

Expand full comment

Yes it does... just used FAISS instead.

Expand full comment

Nicely written! Please note the code where you are setting up "docs_db" does not work.

doc_db = Pinecone.from_documents(

docs_split,

embeddings,

index_name='langchain-demo'

)

Expand full comment

Why? You need to create the index first and connect to pinecone with the API key. Then you can run the above code.

Expand full comment

Correct, I have the index. The following import needs to be added as well.

from langchain.vectorstores import Pinecone

Thank you!

Expand full comment

Oh yeah I forgot to add that. I'll correct that.

Expand full comment