RAG system for local PDF Q&A, aiding RAG beginners
Top 55.1% on sourcepulse
A local RAG system designed for beginners to understand core components and workflows, enabling hands-on practice with PDF processing, intelligent Q&A, and hybrid retrieval. It supports local Ollama models and optional web search, offering a user-friendly Gradio interface for an accessible learning experience.
How It Works
The system processes uploaded PDFs by extracting text, splitting it into chunks, and generating embeddings using sentence-transformers
. These embeddings are stored in a FAISS index for semantic search, while BM25 is used for keyword retrieval. A hybrid search combines both, followed by re-ranking using a cross-encoder or LLM to refine results. The LLM (Ollama or SiliconFlow) then generates answers based on the retrieved context, with optional web search (SerpAPI) and recursive querying for deeper information retrieval.
Quick Start & Requirements
pip install -r requirements.txt
python rag_demo_pro.py
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is positioned as an entry-level RAG implementation, suggesting potential for further development in areas like advanced text splitting, FAISS index management, and context compression for more complex scenarios.
1 month ago
1 day