KnowledgeFlow AI is a Retrieval-Augmented Generation (RAG) application built from scratch in Python without using high-level frameworks such as LangChain or LlamaIndex. It enables users to upload documents, build a FAISS-based knowledge base, and ask questions using Google Gemini with source citations through a Streamlit web interface.
The website is live and accessible below
- User registration and authentication
- Secure password hashing with bcrypt
- Cloud-based user management using Supabase PostgreSQL
- Multi-format document support (PDF, DOCX, TXT, MD)
- Sentence-based text chunking
- Google Gemini Embeddings
- FAISS vector database
- Retrieval-Augmented Generation (RAG)
- AI-powered question answering
- Source citations
- Streamlit web interface
- Python
- Streamlit
- Google Gemini API
- FAISS
- Supabase PostgreSQL
- bcrypt
- NumPy
- PyPDF
- python-docx
Before running the project, ensure you have:
- Python 3.11 or later
- Git
- Google Gemini API Key
- Supabase Project
git clone https://github.com/vickyy234/KnowledgeFlow_AI.git
cd KnowledgeFlow_AIpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root.
GEMINI_API_KEY=your_gemini_api_key
DB_HOST=your_supabase_host
DB_PORT=5432
DB_NAME=postgres
DB_USER=postgres
DB_PASSWORD=your_supabase_passwordCreate a free Supabase project and execute the following SQL:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(100) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password_hash TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Start the application:
streamlit run streamlit_app.pyOpen the browser:
http://localhost:8501
- Register a new account.
- Login.
- Upload one or more documents.
- Build the Knowledge Base.
- Ask questions about the uploaded documents.
- View the generated answer and source citations.
| Format | Supported |
|---|---|
| ✅ | |
| DOCX | ✅ |
| TXT | ✅ |
| Markdown | ✅ |
- User accounts are stored in Supabase PostgreSQL.
- Uploaded documents and generated knowledge bases are stored locally.
- Uploaded files in the live demo are temporary and may be removed when the hosting service restarts.
- Rebuild the knowledge base after adding or modifying documents.
This project is licensed under the MIT License.
See the LICENSE file for details.