1.Intro
This project implements a Retrieval-Augmented Generation (RAG) research assistant using LangChain, HuggingFace embeddings, ChromaDB, and the Groq LLM API.
It allows researchers to upload academic papers (in .pdf or .txt format), automatically index them, and query the system to generate concise answers based on relevant publications.
The architecture follows a secure, modular pipeline for embedding, retrieval, and LLM inference — ideal for research discovery or literature analysis.
Key Features
Feature Description
Automatic Document Loading Supports both .txt and .pdf files; extracts and stores their contents in a local vector database.
Chunking for Efficient Search Breaks large research papers into semantic chunks for precise retrieval.
HuggingFace Embeddings Uses sentence-transformers/all-MiniLM-L6-v2 for lightweight yet powerful embeddings.
ChromaDB Vector Store Persistent, on-disk storage for document embeddings and metadata.
Groq LLM Integration Connects securely via environment variables (.env) to answer research queries.
Relevance Scoring Returns similarity scores for each document source used in an answer.
Secure API Management Follows .env + .gitignore best practices to keep API keys private.
Structure
LLM_LangChain_RAG_Research_Assistant/
├── data/ # Folder for your research papers (.pdf / .txt)
├── research_db/ # Persistent ChromaDB storage
├── llm_langchain_rag_ra_groq.py # Main program
├── .env_example # Template for environment variables
├── .gitignore # Excludes .env and other local files
└── requirements.txt # Python dependencies