Assignment: File-Chat RAG Chatbot
Goal
Build a “Chat with your files” application where users upload documents and images, store
them in a bucket,
and chat with an AI assistant that answers questions grounded in the uploaded content
using RAG.
Tech Stack (Mandatory)
Frontend: React (TypeScript)
Backend: Django + Django REST Framework
Optional: Django Channels for realtime or streaming chat
Core Features
1. Authentication
- Basic email/password or token-based authentication
- Users must only access their own files and chats
2. File & Image Upload + Bucket Storage
Users should be able to:
- Upload files (PDF, TXT, DOCX) and images (PNG, JPG, JPEG)
- View a list of uploaded assets with metadata (type, size, uploaded_at, etc.)
- Rename/update metadata
- Delete assets (and associated indexed data)
All raw files and images must be stored in object storage (not local disk).
Bucket options (choose one and justify):
- AWS S3 / S3-compatible storage
- Google Cloud Storage
- Azure Blob Storage
- Cloudflare R2
- DigitalOcean Spaces
- Supabase Storage
- Cloudinary (especially suitable for images)
3. RAG Pipeline (Text + Images)
For documents:
- Extract text from files
- Chunk text using a reasonable strategy
- Generate embeddings for chunks
- Store embeddings with sufficient metadata for retrieval
For images:
- Extract textual meaning using an AI vision/OCR approach
(e.g., OCR, image captioning, or multimodal models)
- Convert extracted text or descriptions into embeddings
- Store image-derived embeddings with metadata
During chat:
- Retrieve relevant text and/or image-derived chunks
- Generate grounded answers using retrieved context
- Clearly respond when answers are not present in the uploaded content
4. Chat Experience
- Chat UI where users can select one or more assets (or all assets)
- Persistent conversation history
- Each assistant response should surface the retrieved context
(snippets, citations, or references to documents/images)
AI Resources (choose and justify)
LLMs:
- OpenAI (GPT-4.1 / GPT-4o-mini with vision support)
- Anthropic Claude (vision models)
- Google Gemini (multimodal)
- Open-source multimodal models (with justification)
Embeddings:
- OpenAI embeddings
- Cohere embeddings
- Gemini embeddings
- Open-source embeddings (bge, instructor, etc.)
Vector Stores:
- Postgres + pgvector (preferred)
- Pinecone
- Qdrant
- Weaviate
- Chroma
Non-functional Requirements
- Clean README with setup instructions
- Environment variable management
- Proper access control and user isolation
- Logging for ingestion, indexing, and retrieval
- Basic error handling (invalid file type, extraction failure, missing keys)
Deliverables
- GitHub repository or zip archive
- README and .[Link]
- 2–5 minute demo video showing upload → chat → delete flow
Evaluation Criteria
- Correctness of the end-to-end RAG flow (text + images)
- Completeness of asset CRUD functionality
- Quality of retrieval and grounding in responses
- Image understanding approach and justification
- Security and access control
- Code quality, structure, and maintainability
- Documentation clarity
- Bonus features (streaming, abstractions, multi-document/multi-image chat)