Skip to content

Harshit26042004/RAGenerate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 RAG Tutor: Document-Grounded Mentoring System

RAG Tutor is a Streamlit-based Retrieval-Augmented Generation (RAG) application designed to provide personalized tutoring and mentoring based on your uploaded documents. This system processes documents like PDFs and DOCX files, retrieves relevant content, and uses a Large Language Model (LLM) to generate accurate, contextual answers and explanations.


✨ Features

  • Multi-Document Support: Easily upload and process .pdf, .docx, and .txt files.
  • Contextual Q&A: The RAG pipeline grounds all answers strictly in the content of your documents, minimizing LLM hallucination.
  • Intuitive UI: Built with Streamlit for a simple, interactive, and fast chat interface.
  • Vector Database: Uses ChromaDB to efficiently store and retrieve document embeddings (vector representations) for rapid similarity search.
  • LangChain Orchestration: Utilizes the LangChain framework to manage the entire RAG workflow: document loading, chunking, embedding, retrieval, and response generation.

🛠️ Technology Stack

Component Technology Role
Frontend/UI Streamlit Interactive web application interface.
Orchestration LangChain Framework connecting the LLM, documents, and vector store.
Vector DB ChromaDB Stores document embeddings for efficient retrieval.
Document Parsing pypdf, python-docx Libraries to read and extract text from various file formats.
Backend Python 3.x Core programming language.

🚀 Setup and Installation

Prerequisites

  1. Python: Ensure you have Python 3.8+ installed.
  2. API Key: An API key for your chosen Large Language Model (In our case it is Google Gemini API key.).

Installation Steps

  1. Clone the Repository:

    git clone [YOUR-REPO-URL]
    cd rag-tutor-system
  2. Create and Activate a Virtual Environment (Recommended):

    python -m venv venv
    # Activate on Linux/macOS
    source venv/bin/activate
    # Activate on Windows
    .\venv\Scripts\activate
  3. Install Dependencies: You'll need the requirements.txt file (see the next section) to install all necessary packages.

    pip install -r requirements.txt
  4. Set API Key: Set your LLM API key as an environment variable in the ./rag_tutor/generator.py (GEMINI_API_KEY).

    os.environ["GOOGLE_API_KEY"] = "********YOUR-API-KEY********"
  5. Run the Application:

    streamlit run app.py # Replace app.py with your main Streamlit file

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages