How ioncrade/rankwise works
Project type and purpose
• This is a full-stack Retrieval-Augmented Generation (RAG) web application named “RankWise.”
• Purpose: Users upload PDF documents, the system extracts and indexes text chunks, and answers user queries by retrieving relevant passages, re-ranking them, chaining retrievals, and finally generating answers with a Groq LLM.
File structure
• Top-level:
– backend/ (Flask API, PDF processing, vector store)
– frontend/ (React UI)
• backend/app.py: Main Flask server exposing upload and query endpoints
• backend/backend/faiss_index.bin + metadata.pkl: Serialized FAISS index and chunk metadata
• backend/build/: Production React build served by Flask in prod
• frontend/src/: React components, app entry point, CSS, tests
• Configuration files: requirements.txt, package.json, .env (for API key)
README for additional insights
• Clear two-tier architecture: Flask backend + React frontend
• PDF processing pipeline: PyMuPDF → text splitting → Sentence-Transformers for embeddings → FAISS vector DB
• Query pipeline: Hybrid dense + semantic search → CrossEncoder re-ranking → Chained retrieval → Multi-hop QA → Groq LLM call
• Tech stack: Flask, PyMuPDF, Sentence-Transformers, FAISS, CrossEncoder, Groq API, React
Final advice
• Be detailed: decompose the backend into ingestion, embedding, retrieval, re-ranking, chaining, generation, and storage modules
• Essential elements: user, UI, API boundary, PDF pipeline, vector store, ranking modules, LLM, and history