Upload a resume PDF and ask anything about skills, experience, education, or summary. Answers come only from the resume.
ResumeRAG is a RAG-based (Retrieval-Augmented Generation) resume analyzer. Upload any resume as a PDF, then ask natural-language questions—skills, experience, education, projects, certifications—and get accurate, sourced answers with no hallucination. Built for recruiters, hiring managers, and candidates who want to query resumes like a document.
- Features
- Tech stack
- Prerequisites
- Quick start
- Installation
- Configuration
- Usage
- API reference
- Project structure
- How it works
- Tests
- Troubleshooting
- License
| Feature | Description |
|---|---|
| PDF upload | Upload a single resume PDF via the UI; previous data and index are cleared automatically. |
| Ground-truth answers | Every answer is grounded only in the uploaded resume—no external knowledge or hallucination. |
| Structured output | Answers use clear sections, bullet points, and bold labels (e.g. Skills:, Experience:). |
| Follow-up suggestions | After each answer, the app suggests 2–3 relevant follow-up questions. |
| Starter questions | One-click chips for common queries: summarize, list skills, experience timeline, education, key strengths. |
| Multilingual | Ask in English or Bangla; answers follow the question language. |
| Markdown rendering | Responses are rendered as clean HTML (lists, bold, paragraphs) in the UI. |
| Fresh on upload | Uploading a new resume clears old PDFs and index, rebuilds from the new file, and refreshes the in-memory cache. |
| Startup cache clear | On app startup, the RAG cache is cleared so the first request always uses the current index. |
| Layer | Technology |
|---|---|
| Web | FastAPI, Uvicorn |
| LLM | Groq (Llama 3.3 70B) via langchain-groq |
| Embeddings | Hugging Face via langchain-huggingface |
| Vector store | FAISS (CPU), langchain-community |
| Documents | PyPDF for PDF loading, LangChain text splitters |
| Env | python-dotenv for .env |
- Python 3.11 or 3.12
- Groq API key — Create one (free tier available)
- ~500 MB disk for the embedding model and FAISS index (first run downloads the model)
git clone <your-repo-url>
cd ResumeRAG
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
pip install -r requirements.txt
cp .env.example .env && notepad .env # set GROQ_API_KEY
python build_index.py # after placing a PDF in data/
python app.pyThen open http://localhost:8000, upload a resume or use one in data/, and start asking questions.
git clone <your-repo-url>
cd ResumeRAGWindows (PowerShell):
python -m venv .venv
.venv\Scripts\Activate.ps1Windows (CMD):
python -m venv .venv
.venv\Scripts\activate.batmacOS / Linux:
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtThis installs FastAPI, Uvicorn, LangChain, FAISS, sentence-transformers, langchain-groq, and supporting packages. The first run may download the Hugging Face embedding model (~80 MB).
Either:
- Option A: Place one or more PDFs in the
data/folder, then run:python build_index.py
- Option B: Start the app and upload a resume via the UI (no need to run
build_index.pyfirst for that flow).
| Variable | Required | Description |
|---|---|---|
GROQ_API_KEY |
Yes | Your Groq API key for the LLM. |
Copy the example file and edit:
cp .env.example .envThen set GROQ_API_KEY=your_key_here in .env. Do not commit .env; it is gitignored.
python app.pyThe server starts at http://localhost:8000 with hot-reload. Open the URL in a browser.
- If you have no index yet, upload a resume PDF using the “Upload & analyze” button.
- Wait for “Upload complete. Index rebuilt.”
- Use the starter chips or type a question (e.g. “Summarize this resume”, “List all skills”).
- Click suggested follow-up questions or ask new ones.
Uploading another PDF will:
- Remove all previous PDFs from
data/ - Remove the old FAISS index
- Save the new PDF and rebuild the index from it only
- Clear the in-memory RAG cache so the next question uses the new resume
Only one resume is “active” at a time.
| Method | Path | Description |
|---|---|---|
GET |
/ |
Serves the ResumeRAG web UI (HTML). |
POST |
/api/chat |
Send a question; returns { "answer": "...", "follow_ups": ["...", ...] }. |
POST |
/api/upload |
Upload a resume PDF (multipart); replaces current data and rebuilds index. |
curl -X POST http://localhost:8000/api/chat \
-H "Content-Type: application/json" \
-d '{"question": "What are the key skills?"}'Response:
{
"answer": "**Skills:**\n- Python\n- Machine Learning\n- ...",
"follow_ups": ["Which skills are most relevant for data science?", "Experience with Python?"]
}curl -X POST http://localhost:8000/api/upload \
-F "file=@/path/to/resume.pdf"ResumeRAG/
├── app.py # FastAPI app: routes, RAG chain, in-browser UI
├── build_index.py # CLI: build FAISS index from data/*.pdf
├── requirements.txt # Python dependencies
├── .env.example # Example env (copy to .env)
├── .gitignore
├── README.md
├── data/ # Resume PDFs (gitignored except .gitkeep)
│ └── .gitkeep
├── faiss_index/ # FAISS index (gitignored; created by build_index / upload)
└── tests/
├── __init__.py
└── test_rag.py # API tests (run with server at localhost:8000)
- Indexing: PDFs in
data/are loaded, split into chunks (1000 chars, 200 overlap), embedded with a local Hugging Face model, and stored in a FAISS index underfaiss_index/. - Question: The user’s question is embedded with the same model; FAISS returns the top-k closest chunks.
- Answer: Those chunks are passed as context to a Groq (Llama) prompt that is instructed to answer only from the context and to format with markdown.
- Follow-ups: A second LLM call suggests 2–3 follow-up questions based on the question and answer.
- UI: The front end renders the answer markdown (bold, lists) and shows follow-up chips.
With the app running at http://localhost:8000:
python -m tests.test_ragThis sends several sample questions to /api/chat and prints answers and follow-ups. The test expects the server to be up and an index to exist (upload a resume first if needed).
| Issue | What to do |
|---|---|
| “Knowledge base not found” | Run python build_index.py after placing a PDF in data/, or upload a resume via the UI. |
| “Groq API key not found” | Create a .env from .env.example and set GROQ_API_KEY. |
| Slow first request | The first request loads the embedding model and FAISS index; later requests are faster. |
| Wrong resume answered | Upload the correct resume again; uploading clears previous data and index and rebuilds. |
| Import errors | Ensure the virtual environment is activated and run pip install -r requirements.txt again. |
MIT.