Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

RAG Demo App

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.

Features

  • 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

Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • (Optional) OpenAI API key for LLM answers

Local Development

  1. Backend
    cd backend
    pip install -r requirements.txt
    uvicorn main:app --reload --host 0.0.0.0 --port 8000
  2. Frontend
    cd frontend
    npm install
    npm run dev
  3. Visit http://localhost:3000

Docker Compose

docker-compose up --build

Set your OPENAI_API_KEY in the environment for LLM answers.

How it Works

  • 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

Example Use Cases

  • 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

Screenshots

Demo GIF

Demo

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.py

The script will write screenshots/upload.png, screenshots/answer.png, and screenshots/demo.gif.

Ready to push

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 push

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages