Skip to content

Asymmetric-OG/rag-qa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Retrieval Augmented Generation based
Q&A System


642a-d3d4-4418-a2f7-124fefe0a4a2.mp4

Features

  • PDF based document ingestion
  • Semantic search using dense vector embeddings
  • FAISS powered similarity retrieval
  • Context grounded answer generation
  • LangGraph based retrieval-generation workflow
  • Streamlit frontend for interaction
  • Modular backend architecture for easy extension

Tech Stack

Component Technology
Language Python
LLM Orchestration LangChain
Workflow Graph LangGraph
Vector Database FAISS
Embeddings Hugging Face Embeddings
LLM Provider Hugging Face Inference API
PDF Parsing PyPDFLoader
Text Chunking RecursiveCharacterTextSplitter
Frontend Streamlit
Backend API FastAPI

Installation

1. Clone the Repository

git clone <your-repository-url>
cd <repository-name>

2. Create a Virtual Environment

python -m venv .venv

3. Activate Environment

Windows

.venv\Scripts\activate

Linux / MacOS

source .venv/bin/activate

4. Install Dependencies

pip install -r requirements.txt

5. Configure Environment Variables

Create a .env file in the project root:

HUGGINGFACEHUB_API_TOKEN=your_token_here

Running the Project

1. Add Documents

Place all PDF files inside:

research/

2. Start FastAPI Backend

uvicorn rag_chain:app --reload

Backend runs at:

http://127.0.0.1:8000

3. Start Streamlit Frontend

streamlit run app.py

File Structure

├── app.py                 # Streamlit frontend
├── rag_chain.py           # RAG pipeline and FastAPI backend
├── requirements.txt       # Project dependencies
├── .env                   # Hugging Face API token
├── research/              # PDF document corpus
│   ├── paper1.pdf
│   ├── paper2.pdf
│   └── ...

About

A LangChain powered RAG pipeline to retrieve context accurate answers to queries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages