Skip to content

yash4agr/Psych-LLM

Repository files navigation

Psych-LLM: Advanced RAG Pipeline for Psychology Research

Kaggle Notebook Python 3.9+

📖 Overview

A Retrieval-Augmented Generation (RAG) system designed for psychology research documentation, developed for the CASML Generative AI Hackathon. This solution combines advanced document retrieval with generative AI to provide context-aware answers from academic literature (OpenStax Psychology (2e), CC BY 4.0).

Key Features:

  • PDF document parsing with page-aware chunking
  • Hybrid vector database integration (ChromaDB)
  • Metadata-enriched text embeddings
  • LLM-powered response generation with source attribution

🛠️ Technical Stack

  • Embeddings: TogetherAI/m2-bert-80M-2k-retrieval
  • Vector DB: ChromaDB
  • LLM: meta-llama/Llama-3.3-70B-Instruct-Turbo-Free
  • Text Processing: pdfplumber, custom chunking pipeline

⚙️ Installation

Prerequisites

  • Python 3.9+
  • Together API key

Setup Instructions

  1. Clone repository
git clone https://github.com/yash4agr/Psych-LLM.git
cd psych-llm
  1. Create a virtual environment
python -m venv .venv
  1. Activate the virtual environment
# On Windows:
.venv\Scripts\activate

# On macOS/Linux:
source .venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Register and obtain your API key

  2. Export your Together API Key

export TOGETHER_API_KEY=<your_api_key>  # On macOS/Linux
$env:TOGETHER_API_KEY="<your_api_key>"  # On Windows (Powershell)
  1. Run the application
python main.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages