PaperBot lets you upload PDFs, extract and chunk text, generate embeddings, store them in Qdrant, and answer questions via retrieval-augmented generation (RAG) with an LLM.
- Upload PDFs and automatically extract text
- Chunk text and generate embeddings
- Store vectors in Qdrant with similarity search
- Answer questions using RAG over retrieved chunks
backend/: FastAPI app for upload, parsing, embeddings, RAGbackend/uploads/: Uploaded PDFs (ignored by Git by default)
frontend/PaperBot/: Vue-based frontendDoc/: Design docs, deployment notes, and API references
- git clone the project
git clone git@github.com:nuclearslippers/PaperBot.gitRecommended: start everything with docker-compose (ensure .env is set).
- Create
backend/.env(example):
# LLM (example)
LLM_API_KEY=sk-xxxxxx
LLM_MODEL_NAME=deepseek-chat
LLM_URL=https://api.example.com/v1/chat/completions
# Embeddings (example)
EMBED_API_KEY=sk-xxxxxx
EMBED_MODEL_NAME=text-embedding-v4
EMBED_URL=https://embed.example.com/v1
# Qdrant
DB_URL=http://qdrant:6333
DB_NAME=mypdf
# URLs (optional)
FRONT_URL=http://localhost:5173
BACK_URL=http://localhost:8000- Start (from repo root):
docker-compose up --build- Stop:
docker-compose downBackend:
# Python 3.10+ or Conda environment is recommended
python -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000Frontend:
cd frontend/PaperBot
npm install
npm run devAPI (common):
- POST
/upload/: upload PDF (form-data, field namefile) - POST
/query/: RAG query, JSON body: { "question": "..." }
- Check backend logs (container or local)
- Validate
.envsettings for LLM/Embedding/DB URLs & keys - Run
python -m py_compile backend/*.pylocally for syntax checks - For upload issues, verify
backend/uploads/permissions and disk space
Issues and PRs are welcome. When reporting problems, include logs, repro steps, and sanitized env settings.
See Doc/ for design and API notes.
