Skip to content

furkankupcu/Hybrid_RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 RAG-Based PDF QA System

This project provides a REST API built with FastAPI that enables question answering over PDF documents using LangChain. It allows users to ask questions, which are answered by a Large Language Model (LLM) based on the information contained in a predefined PDF document.

🚀 Features

  • ✅ Load and split content from a PDF file
  • ✅ Lexical retrieval using BM25 and TF-IDF
  • ✅ Re-ranking with Flashrank
  • ✅ Use of EnsembleRetriever + ContextualCompressionRetriever
  • ✅ RAG pipeline powered by LangChain
  • ✅ HTTP endpoint built with FastAPI
  • ✅ Configuration via .env file

🧠 Technologies

Installation

git clone https://github.com/kullaniciadi/rag-pdf-qa.git
cd rag-pdf-qa```

python -m venv venv
source venv/bin/activate

pip install -r requirements.txt

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PDF_PATH LLM_API_KEY LLM_API_BASE RERANKER_MODEL EMBEDDING_MODEL

Usage/Examples

uvicorn main:app --reload

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages