Skip to content

The Project "Vector Search RAG" utilises advanced frameworks and language models (LangChain and OpenAI APIs) to enhance query responses by retrieving relevant documents and generating contextually accurate answers. This repo contains End-to-End implementation of RAG for training LLMs in custom data.

Notifications You must be signed in to change notification settings

Karthi-DStech/VectorSearch-RAG-using-LangChain-OpenAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VectorSearch-RAG-using-LangChain & OpenAI

LangChain-RAG is a project that implements Retrieval-Augmented Generation (RAG) using LangChain and OpenAI's language models. This project demonstrates how to use LangChain for document retrieval and embedding, and OpenAI's API for generating responses based on the retrieved documents from Websites.

Project Structure

  • package_requirements/:

    • install_requirements.sh/:
    • requirements.txt/
  • configuration.py: Contains the Config class to set up environment variables.

  • document_processor.py: Handles loading, splitting, and embedding documents.

  • rag_process.py: Contains the RAGProcess class for creating and querying the RAG model.

  • setup.py: Script to install required packages.

  • main.py: Main script to run the RAG process.

Usage

To run the RAG process, use the run.py script. This script will prompt you to enter a question and then use the RAG model to generate a response.

The script will:

  • Set up the configuration using the provided API keys.
  • Load and preprocess documents from the specified URL.
  • Generate a response based on the provided question.
  • Calculate and display the cosine similarity score between the query and the retrieved document.

Requirements

  • Subscription in OpenAI's API.
  • Subscription in LangChain's API.

About

The Project "Vector Search RAG" utilises advanced frameworks and language models (LangChain and OpenAI APIs) to enhance query responses by retrieving relevant documents and generating contextually accurate answers. This repo contains End-to-End implementation of RAG for training LLMs in custom data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published