# π Twiga AI Challenge: Document Processing & RAG System
## π― Overview
This repository contains two interconnected challenges for building a complete document processing and RAG (Retrieval-Augmented Generation) system for academic research papers.
## π What You'll Build
This project is split into two main challenges:
- **Document Parsing**: Convert academic PDFs into clean, structured markdown, preserving academic sections, citations, and logical hierarchy. This prepares your data for downstream AI tasks.
- **RAG System**: Build a Retrieval-Augmented Generation (RAG) pipeline that uses your parsed documents to answer academic questions with accurate, cited responses.
## π Project Structure
```
twiga-challenge-1/
βββ README.md # This file - Main overview
βββ parsing-challenge/ # Challenge 1: Document Parsing
β βββ README.md # Parsing challenge documentation
β βββ strategy1_llamaparse_direct.ipynb
βββ rag-challenge/ # Challenge 2: RAG Implementation
β βββ README.md # RAG challenge documentation
β βββ strategy1_chromadb_basic.ipynb RAG
βββ data/
β βββ papers/ # Original PDF files
β βββ input_papers/ # Parsed markdown files
β βββ vector_store/ # Vector database storage
βββ LICENSE
```
## π Challenge Progression
### Phase 1: Document Parsing
- **Notebook**: `parsing-challenge/strategy1_llamaparse_direct.ipynb`
- **Goal**: Parse academic PDFs into structured markdown for RAG.
### Phase 2: RAG System
- **Notebook**: `rag-challenge/strategy1_chromadb_basic.ipynb`
- **Goal**: Build a RAG pipeline for question answering over your parsed documents.
## π οΈ Setup & Installation
### Prerequisites
```bash
# Core dependencies
pip3 install llama_parse pypdf together pydantic
# RAG dependencies
pip3 install chromadb sentence-transformers langchain openai
pip3 install faiss-cpu numpy pandas matplotlib
```
### API Keys Required
Create a `.en β¦