π§ Industry-Level RAG (Retrieval-Augmented Generation) System for Intelligent Document Q&A
π Try the App Here: π https://smart-knowledge-ai-rag-eigycfwp9rfdq7sn6kedz2.streamlit.app/
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
- β 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
| Layer | Technology |
|---|---|
| UI | Streamlit |
| LLM | Gemini 2.5 Flash |
| Embeddings | HuggingFace (MiniLM) |
| Vector DB | FAISS |
| Framework | LangChain |
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
- π User uploads documents
- βοΈ Documents are split into chunks
- π Embeddings are created
- π¦ Stored in FAISS vector database
- β User asks a question
- π Relevant chunks retrieved
- π€ Gemini generates structured answer
git clone https://github.com/22AD040/smart-knowledge-ai-rag.git
cd smart-knowledge-ai-rag
pip install -r requirements.txtCreate .env file:
GEMINI_API_KEY=your_api_key_herestreamlit run app/app.pyDeployed using Streamlit Cloud
Steps:
- Push code to GitHub
- Connect repo in Streamlit
- Add secrets:
GEMINI_API_KEY="your_api_key"- Deploy π
- π Academic Assistant
- π’ Company Knowledge Base
- βοΈ Legal Document Analysis
- π Research Paper Q&A
- π§βπΌ HR Policy Assistant
- π¬ ChatGPT-style UI
- π§ Memory-based conversations
- π Better document visualization
- β‘ Faster retrieval (caching)
- π User authentication
Contributions are welcome! Feel free to fork and improve π
This project is licensed under the MIT License
Ratchita B π Generative AI Intern π‘ Passionate about AI, ML & Real-world Applications
If you like this project:
π Give a β on GitHub π Share with others π Use it in your projects


