A production-ready Retrieval-Augmented Generation (RAG) system that processes research publications and provides intelligent answers to research questions using ChromaDB vector storage and Groq's LLaMA language models.
git clone https://github.com/felixchess5/RT-Project-1.git cd RT-Project-1
python -m venv venv # Windows venv\Scripts\activate # macOS/Linux source venv/bin/activate
pip install -r requirements.txt
# Copy the example environment file cp example.env_example .env
Edit the .env file with your actual API keys:
# Required: Get your Groq API key from https://console.groq.com/ GROQ_API_KEY='your_actual_groq_api_key_here' # Optional: HuggingFace token for enhanced model access HUGGINGFACEHUB_API_TOKEN='your_hf_token_here' # Project configuration (default values work fine) DOCUMENTS_PATH='./Documents' DB='./DB' CHUNK_SIZE=1000 CHUNK_OVERLAP=200
⚠️ Important: Never commit your
.envfile with real API keys to version control!
Place your research papers in .txt format in the Documents/ directory. The system comes pre-loaded with 10 research papers on:
python -m main # or python main.py
The system will:
What are the main challenges in RAG systems?
How do transformer architectures improve language models?
What techniques are used for fine-tuning LLMs?
Explain the concept of attention mechanisms in neural networks.
Type exit, quit, or press Ctrl+C to close the application gracefully.
RT-Project-1/
├── main.py # Core application logic and CLI interface
├── chroma_loader.py # Document processing, embeddings, and ChromaDB operations
├── requirements.txt # Python dependencies (organized by category)
├── .env # Environment variables (create from example)
├── example.env_example # Environment template
├── .gitignore # Git ignore rules (protects .env, DB/, etc.)
├── README.md # This file
├── Documents/ # Research papers (.txt format)
│ ├── Brain LLM.txt
│ ├── LLM NEO.txt
│ ├── Selectionless RAG.txt
│ └── ... (7 more papers)
├── DB/ # ChromaDB persistent storage (auto-created)
└── Deprecated Code/ # Legacy implementations
Documents/ directorysentence-transformers/all-MiniLM-L6-v2Adjust settings in your .env file:
| Variable | Description | Default |
|---|---|---|
GROQ_API_KEY | Your Groq API key (required) | '' |
HUGGINGFACEHUB_API_TOKEN | HuggingFace API token (optional) | '' |
DOCUMENTS_PATH | Path to research documents | './Documents' |
DB | ChromaDB storage location | './DB' |
CHUNK_SIZE | Size of text chunks | 1000 |
CHUNK_OVERLAP | Overlap between chunks | 200 |
This project demonstrates proficiency in:
.gitignore excluding sensitive filesrequirements.txt with version pinning"ModuleNotFoundError": Install dependencies with pip install -r requirements.txt
"GROQ_API_KEY is empty": Add your actual API key to the .env file
"No documents found": Ensure .txt files are in the Documents/ directory
"Unicode encode error": The system now handles Windows console encoding issues gracefully
"EOFError": This is expected when running in non-interactive environments
MIT License © 2025 Felix Elias
Pull requests welcome! For major changes, please open an issue first to discuss what you'd like to change.