Skip to content

ThomasJanssen-tech/LangChain-Pinecone-RAG

Repository files navigation

Retrieval Augmented Generation (RAG) with Streamlit, LangChain and Pinecone

Watch the full tutorial on my YouTube Channel

 
Thomas Janssen Youtube  
 

Prerequisites

  • Python 3.11+

Installation

1. Clone the repository:
git clone https://github.com/ThomasJanssen-tech/LangChain-Pinecone-RAG.git
cd LangChain Pinecone RAG
  1. Create a virtual environment
python -m venv venv
  1. Activate the virtual environment
venv\Scripts\Activate
(or on Mac): source venv/bin/activate
  1. Install libraries
pip install -r requirements.txt
  1. Create accounts
  1. Add API keys to .env file
  • Rename .env.example to .env
  • Add the API keys for Pinecone and OpenAI to the .env file

Executing the scripts

  1. Open a terminal in VS Code

  2. Execute the following command:

python sample_ingestion.py
python sample_retrieval.py
python ingestion.py
python retrieval.py
streamlit run chatbot_rag.py