Skip to content

22AD040/smart-knowledge-ai-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages