Member-only story
Chat with PDF
4 min readDec 11, 2024
Namaste, In this post, we will create a RAG (Retrieval Augmented Generation) application to chat with PDF files.
Technology Stack: Python, LangChain, Ollama, LLM model: Phi3.
Installation required:-
Python3 and Ollama must be installed on your Machine. Start Ollama before the implementation.
Enter http://localhost:11434/ in your browser. You will see the following message:
Now, we need to install the following Libraries:
!pip install langchain
!pip install langchain-core
!pip install langchain-community
!pip install pypdf
!pip install docarray
First, you have to pull the Phi3 or any other LLM from ollama as follows:
ollama pull phi3
Phi3 (mini) model is around ~2.2GB. It will take time to complete.