Skip to content

hammaadworks/rag-lld-mentor

Repository files navigation

RAG-LLD Mentor 🚀

A Streamlit-powered RAG application for learning Low-Level Design (LLD), built with LangChain, FAISS, and OpenAI.


📌 Index

  1. Overview
  2. Features
  3. Getting Started
  4. Updating the Knowledge Base
  5. Tech Stack
  6. Future Enhancements
  7. License
  8. Contributing
  9. Acknowledgments
  10. Contact

📌 Overview

RAG-LLD Mentor is an AI-powered chatbot designed to assist users in learning Low-Level Design (LLD). It leverages LangChain for orchestration, FAISS for efficient similarity searching, and OpenAI's LLM for intelligent chat completions. The agent has been trained on knowledge bases from Refactoring Guru and Educative's Grokking LLD.


LLD RAG Demo
AI Designs Low Level Architecture


✨ Features

Retrieval-Augmented Generation (RAG): Enhances LLM responses with context from relevant documents.
Streaming Responses: Provides real-time AI-generated answers for a smoother experience.
User Authentication: Secure login functionality to manage user sessions.
FAISS Vector Search: Efficiently retrieves relevant documents for better responses.
Custom Knowledge Base: Easily update the document store with new learning materials.


🚀 Getting Started

1️⃣ Clone the Repository

 git clone https://github.com/hammaadworks/rag-lld-mentor.git
 cd rag-lld-mentor

2️⃣ Set Up Environment Variables

Create a .env file and add your OpenAI API key:

 OPENAI_API_KEY=your_openai_api_key

3️⃣ Configure Authentication

Modify constants.py to set up your username and password:

USERNAME = "your_username"
PASSWORD = "your_password"

4️⃣ Install Dependencies

 pip install -r requirements.txt

5️⃣ Run the Application

 streamlit run app.py

📚 Updating the Knowledge Base

To add more documents for training, edit update_vector_db.py and re-run it:

 python update_vector_db.py

This will update the FAISS vector database with new documents.


🛠️ Tech Stack

  • Streamlit – For the frontend UI
  • LangChain – For managing LLM interactions
  • FAISS – For similarity search and retrieval
  • OpenAI – For generating chat responses
  • Python – The core programming language

🎯 Future Enhancements

🔹 Improve UI/UX with a chatbot-style interface
🔹 Support multiple LLMs (e.g., Claude, Gemini)
🔹 Add support for uploading custom PDFs/articles


📜 License

This project is licensed under the MIT License.


💡 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request. 🚀


🙌 Acknowledgments

Special thanks to Refactoring Guru and Educative for providing valuable LLD resources. 🎉


📞 Contact


🌟 Star the repo if you found this useful! ⭐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages