How yacinebessadi/bennabi-rag works
Project type and purpose
• This is a single-page, full-stack RAG (Retrieval-Augmented Generation) chatbot built in Python with a Streamlit UI.
• It retrieves passages from three PDF books by Malek Bennabi using FAISS and BM25, re-ranks with a cross-encoder, and then generates answers via the Mistral LLM.
File structure
• Top-level files:
• app.py – the entrypoint defining the Streamlit UI and orchestrating the RAG pipeline
• Procfile – Heroku deployment specification (web: streamlit run app.py)
• PDFs – source documents loaded at runtime (Les_conditions_de_la_renaissance.pdf, probleme.idees_.pdf, vocation-de-lislam.pdf)
• README.md – project overview
• .gitignore – excludes Python artifacts
Extract additional insights from the README
• Core features:
• Hybrid retrieval: FAISS vector store + BM25 inverted index
• Cross-encoder re-ranking of candidate passages
• LangChain for document loading, chains, and prompt templates
• Streamlit web interface
• Deployment target: Cloud (Heroku or similar)