A Retrieval-Augmented Generation (RAG) application that answers Python programming questions using the GeeksforGeeks Python Tutorial as its knowledge base.
The project combines LangChain, FAISS, Hugging Face embeddings, and Google Gemini to retrieve relevant information and generate context-aware answers.
- Retrieval-Augmented Generation (RAG)
- Semantic search using FAISS
- Google Gemini for answer generation
- Hugging Face sentence-transformer embeddings
- Secure API key management using
.env - Context-aware responses based on the knowledge base
- Python
- LangChain
- Google Gemini API
- FAISS
- Hugging Face Sentence Transformers
- python-dotenv
Python-Tutor-RAG/
│
├── Python_Tutor_RAG.ipynb
├── README.md
├── requirements.txt
├── .gitignore
├── screenshots/
│ └── demo.png
└── .env
Place your screenshot inside the screenshots folder as demo.png.
screenshots/demo.png
Clone the repository:
git clone https://github.com/YOUR_GITHUB_USERNAME/Python-Tutor-RAG.gitInstall the required packages:
pip install -r requirements.txtCreate a .env file:
GEMINI_API_KEY=YOUR_API_KEYRun the notebook and ask questions about Python.
- What are the features of Python?
- Explain inheritance in Python.
- Explain exception handling.
- Difference between list and tuple.
- What are Python modules?
- Streamlit web interface
- Support for PDF documents
- Multiple knowledge sources
- Chat history
- Hybrid search
Lingesh Kumar