An AI-powered Retrieval-Augmented Generation (RAG) assistant that helps researchers analyze scientific papers efficiently. This tool can read, understand, and summarize vast amounts of data in real-time.
- Document loading from various sources (PDF, text files)
- Text splitting techniques for different document formats (including LaTeX)
- Document embedding using sentence transformers
- Vector database storage with ChromaDB
- Retrieval system to fetch relevant document segments
- QA Bot with Gradio interface for easy interaction
The project is organized into separate modules for each task:
document_loading.py- Loading documents using LangChaintext_splitting.py- Splitting text (especially LaTeX) into chunksembeddings.py- Creating vector embeddings for textvector_database.py- Creating and searching ChromaDB vector databasesretriever.py- Developing a retriever for fetching document segmentsqa_bot.py- QA Bot with Gradio interface for document interactionmain.py- Central script that runs all tasks sequentially
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt- Set up environment variables:
HF_API_TOKEN: Your Hugging Face API token
To run all tasks sequentially:
python main.pyYou can also run each task separately:
# Task 1: Document Loading
python document_loading.py
# Task 2: Text Splitting
python text_splitting.py
# Task 3: Document Embedding
python embeddings.py
# Task 4: Vector Database
python vector_database.py
# Task 5: Retriever
python retriever.py
# Task 6: QA Bot
python qa_bot.pyThe PDF and text files should be placed in the "/Users/{user}/Downloads/" directory or update the paths in the code
This project is licensed under the MIT License.