An intelligent, AI-powered system for asking questions about uploaded academic documents (PDFs) using Retrieval-Augmented Generation (RAG) and modern language models.
Upload your papers, ask natural questions, and get context-aware answers using ChromaDB + LLAMA3.
- 📄 Upload academic PDF files
- ❓ Ask free-text questions like: "What is the main argument of this paper?"
- 🧠 Answers generated with LLAMA3 via Ollama
- 🔍 Context retrieved from your actual documents using ChromaDB
- 🌐 Swagger UI for ease-of-use (no coding required)
👉 One-click run via GitHub Codespaces:
Once Codespace is open, the server will automatically run using:
docker-compose up --buildThen go to:
📎 http://localhost:5000/apidocs
| Component | Technology |
|---|---|
| 🌐 Backend | Python + Flask |
| 📚 Vector Store | ChromaDB |
| 🔤 Embeddings | Nomic Embed Text |
| 🤖 LLM | Ollama (LLAMA3) |
| ☁️ Database | MongoDB |
| 📦 Deployment | Docker + Docker Compose |
| 🚦 API UI | Swagger via Flasgger |
app/
├── api/
│ ├── __init__.py
│ └── endpoints.py
├── database/
│ ├── __init__.py
│ ├── chroma_client.py
│ └── mongo_client.py
├── rag/
│ ├── __init__.py
│ ├── chain.py
│ ├── output_parser.py
│ └── prompt_templates.py
├── utils/
│ ├── __init__.py
│ └── pdf_processor.py
├── config.py
├── main.py
├── embeddings.py
└── logging.pydocker-compose up --build
---
## 💡 How to Use via Swagger
1. 📤 Upload a PDF file
`POST /upload`
2. ❓ Ask a question
`GET /query?question=What are the main findings?`
3. 📘 Get an AI-generated answer and citations
**Example Response:**
```json
{
"answer": "The paper argues that...",
"citations": ["page_3", "page_8"]
}
- 🖥️ Web-based GUI (non-Swagger) for non-technical users
- 📄 Support for DOCX and TXT formats
- 🧠 Chat history and memory
- 😊 Sentiment & tone detection
- ⬆️ Drag & drop PDF interface
Feel free to open issues, submit pull requests, or suggest features.
Let’s make this project even better — together!