Skip to content

About

Production-ready Generative AI RAG system that enables intelligent document querying using LangChain, Gemini LLM, FAISS vector search, and HuggingFace embeddings with source-aware responses.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub stars GitHub forks GitHub repo size


Python Streamlit Gemini HuggingFace FAISS Generative AI License


📚 Smart Knowledge AI Assistant

🧠 Industry-Level RAG (Retrieval-Augmented Generation) System for Intelligent Document Q&A

Built with Streamlit


🚀 Live Demo

🔗 Try the App Here: 👉 https://smart-knowledge-ai-rag-eigycfwp9rfdq7sn6kedz2.streamlit.app/


📸 Screenshots

🏠 Home UI

Home

📂 Upload Documents

Upload

🤖 AI Generated Answer

Answer


🧠 Overview

Smart Knowledge AI Assistant is a production-ready Generative AI application that allows users to:

  • 📄 Upload documents (PDF/TXT)
  • 💬 Ask questions based on documents
  • 🔍 Perform semantic search using embeddings
  • 🧠 Get accurate, structured AI-generated answers
  • 📌 View source references

⚙️ Features

  • ✅ RAG (Retrieval-Augmented Generation)
  • 📂 Multi-document upload support
  • 🔎 Semantic search with FAISS
  • 🤖 Gemini 2.5 Flash LLM integration
  • 🧾 Source citation for answers
  • 💬 Chat history tracking
  • 🌐 Works with or without documents

🏗️ Tech Stack

Layer Technology
UI Streamlit
LLM Gemini 2.5 Flash
Embeddings HuggingFace (MiniLM)
Vector DB FAISS
Framework LangChain

📁 Project Structure

smart-knowledge-ai-rag/
│
├── app/
│   └── app.py
│
├── core/
│   ├── embeddings.py
│   ├── llm.py
│   └── vectorstore.py
│
├── services/
│   ├── doc_loader.py
│   └── rag_pipeline.py
│
├── assets/
│   ├── home.png
│   ├── upload.png
│   └── answer.png
│
├── data/
├── requirements.txt
├── README.md
├── .gitignore
└── LICENSE

🔄 How It Works

  1. 📄 User uploads documents
  2. ✂️ Documents are split into chunks
  3. 🔍 Embeddings are created
  4. 📦 Stored in FAISS vector database
  5. ❓ User asks a question
  6. 📌 Relevant chunks retrieved
  7. 🤖 Gemini generates structured answer

⚡ Installation

git clone https://github.com/22AD040/smart-knowledge-ai-rag.git
cd smart-knowledge-ai-rag

pip install -r requirements.txt

🔐 Environment Setup

Create .env file:

GEMINI_API_KEY=your_api_key_here

▶️ Run Locally

streamlit run app/app.py

☁️ Deployment

Deployed using Streamlit Cloud

Steps:

  1. Push code to GitHub
  2. Connect repo in Streamlit
  3. Add secrets:
GEMINI_API_KEY="your_api_key"
  1. Deploy 🚀

🎯 Use Cases

  • 📚 Academic Assistant
  • 🏢 Company Knowledge Base
  • ⚖️ Legal Document Analysis
  • 📄 Research Paper Q&A
  • 🧑‍💼 HR Policy Assistant

📈 Future Improvements

  • 💬 ChatGPT-style UI
  • 🧠 Memory-based conversations
  • 📊 Better document visualization
  • ⚡ Faster retrieval (caching)
  • 🔐 User authentication

🤝 Contributing

Contributions are welcome! Feel free to fork and improve 🚀


📜 License

This project is licensed under the MIT License


👩‍💻 Author

Ratchita B 🎓 Generative AI Intern 💡 Passionate about AI, ML & Real-world Applications


⭐ Show Your Support

If you like this project:

👉 Give a ⭐ on GitHub 👉 Share with others 👉 Use it in your projects


About

Production-ready Generative AI RAG system that enables intelligent document querying using LangChain, Gemini LLM, FAISS vector search, and HuggingFace embeddings with source-aware responses.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages