A Retrieval-Augmented Generation (RAG) demo application for portfolio and interview use. Upload a document (e.g., your resume), ask questions, and get LLM-generated answers with cited sources using vector search and OpenAI or local embeddings.
- Upload TXT, Markdown, or PDF documents
- Embedding and chunking with Sentence Transformers (or OpenAI)
- Vector search with FAISS
- LLM answer synthesis with OpenAI GPT-3.5/4 (API key required)
- React frontend for upload, Q&A, and answer display
- Dockerized for easy deployment
- Python 3.11+
- Node.js 18+
- (Optional) OpenAI API key for LLM answers
- Backend
cd backend pip install -r requirements.txt uvicorn main:app --reload --host 0.0.0.0 --port 8000 - Frontend
cd frontend npm install npm run dev - Visit http://localhost:3000
docker-compose up --buildSet your OPENAI_API_KEY in the environment for LLM answers.
- Upload a document (resume, portfolio, etc.)
- Backend chunks and embeds the text, stores in FAISS vector DB
- Ask a question: top-k relevant chunks are retrieved
- LLM (OpenAI GPT-3.5/4) generates an answer using only retrieved context, with citations
- Resume Q&A: Upload your resume, ask about your experience, skills, or projects
- Portfolio search: Upload docs, answer questions about your work
- General RAG demo for interviews or technical discussions
This repository includes an automated demo script that programmatically uploads the repository README to the app, asks a sample question, captures screenshots, and produces an animated GIF at screenshots/demo.gif.
Prerequisites: backend running on http://localhost:8000 and frontend on http://localhost:3000.
Run the demo (from the repository root):
# Activate backend venv (example for PowerShell)
cd backend
.\venv\Scripts\Activate
pip install -r ../scripts/requirements-demo.txt
python -m playwright install chromium
cd ..
python scripts/demo_capture.pyThe script will write screenshots/upload.png, screenshots/answer.png, and screenshots/demo.gif.
Before pushing, ensure you have removed or excluded any secrets (API keys). This project already contains a .gitignore that excludes virtual environments, node_modules, Playwright artifacts and local logs.
To create a clean commit with the demo assets:
git add -A
git commit -m "Add demo capture script, demo GIF, and README demo section"
git pushMIT
