This repository demonstrates the implementation of a Retrieval-Augmented Generation (RAG) model applied to a movie database. The RAG model efficiently retrieves information from a vector database and uses a language model to generate responses, making it ideal for querying structured and unstructured datasets.
Retrieval-Augmented Generation (RAG) is a hybrid approach that combines the strengths of information retrieval systems and language models. The pipeline involves Three key components:
- Embedding & Storing : Embeded the DataSet and store into pinecone
- Retriever: Fetches relevant information from pinecone vector database.
- Generator: Processes the retrieved data and generates a coherent, context-aware response using LLM(openai).
Below is an overview of the RAG pipeline:
The following technologies were used to build the RAG Movie Info system:
- LangChain: A framework for building applications powered by language models.
- OpenAI: Provides the LLM (e.g., GPT-3.5-Turbo) for generating responses.
- Hugging Face: Used for embedding text data into vector representations.
- Pinecone: Serves as the vector database for efficient similarity search and retrieval.
Follow these steps to set up the project locally:
git clone https://github.com/Dharansh-Neema/RAG-movie-info.git
cd RAG-movie-info
Create a virtual environment to isolate the dependencies for this project:
python -m venv env
- On Windows:
.\env\Scripts\activate
- On Linux/MacOS:
source env/bin/activate
Install all required dependencies listed in dependency.txt
:
pip install -r dependency.txt
Create a .env
file in the root directory and add the following keys:
OPENAI_API_KEY=your_openai_api_key
PINECONE_API_KEY=your_pinecone_api_key
Replace your_openai_api_key
and your_pinecone_api_key
with your actual API keys.