Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Python Tutor RAG

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.


🚀 Features

  • 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

🛠️ Tech Stack

  • Python
  • LangChain
  • Google Gemini API
  • FAISS
  • Hugging Face Sentence Transformers
  • python-dotenv

📂 Project Structure

Python-Tutor-RAG/
│
├── Python_Tutor_RAG.ipynb
├── README.md
├── requirements.txt
├── .gitignore
├── screenshots/
│   └── demo.png
└── .env

📸 Demo

Place your screenshot inside the screenshots folder as demo.png.

screenshots/demo.png

⚙️ Installation

Clone the repository:

git clone https://github.com/YOUR_GITHUB_USERNAME/Python-Tutor-RAG.git

Install the required packages:

pip install -r requirements.txt

Create a .env file:

GEMINI_API_KEY=YOUR_API_KEY

Run the notebook and ask questions about Python.


💡 Example Questions

  • What are the features of Python?
  • Explain inheritance in Python.
  • Explain exception handling.
  • Difference between list and tuple.
  • What are Python modules?

🔮 Future Improvements

  • Streamlit web interface
  • Support for PDF documents
  • Multiple knowledge sources
  • Chat history
  • Hybrid search

👨‍💻 Author

Lingesh Kumar

About

Retrieval-Augmented Generation (RAG) system for answering Python programming questions using LangChain, FAISS, Hugging Face embeddings, and Google Gemini.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages