How vickyy234/knowledgeflow_ai works
KnowledgeFlow AI is a Streamlit RAG application. Users register or log in, upload supported documents, build a per-user knowledge base, then ask questions and receive generated answers with source citations. Index construction extracts and chunks document text, embeds it, and persists both chunk data and a FAISS index; question handling retrieves chunks before generating an answer. The README documents the broader workflow and capabilities; links involving unsampled application wiring are omitted where source evidence does not establish the caller.
Main entry points: build_index.py Index Builder · dashboard.py Dashboard · document_loader.py Document Loading · storage_manager.py Per-user Storage
Components 24
Accounts
- Authentication
auth/auth.py - Password Security
auth/security.py - User Database
database/database.py
Document Ingestion
- Upload Storage
core/file_manager.py - Document Loading
core/document_loader.py - PDF Loader
core/loaders/pdf_loader.py - DOCX Loader
core/loaders/docx_loader.py - TXT Loader
core/loaders/txt_loader.py - Markdown Loader
core/loaders/md_loader.py - Text Chunking
core/text_splitter.py
Knowledge and Retrieval
- Per-user Storage
core/storage_manager.py - Index Builder
build_index.py - Embedding Adapter
core/embeddings.py - Gemini Models
utils/genai/gemini_models.py - Knowledge Loading
core/knowledge_loader.py - Chunk Retrieval
core/retriever.py - FAISS Index
- Answer and Citations
core/rag.py
Streamlit Interface
- Login UI
ui/login.py - Registration UI
ui/register.py - Session Navigation
ui/navigation.py - Dashboard
ui/dashboard.py
Other components
- User
- Supabase PostgreSQL
Connections 29
- User → Login UI: signs in
README.md - User → Registration UI: registers
README.md - Authentication → Password Security: hashes and verifies
auth/auth.py - Authentication → User Database: creates and looks up
auth/auth.py - User Database → Supabase PostgreSQL: queries
README.md - Authentication → Per-user Storage: creates user storage
auth/auth.py - User → Dashboard: uploads and asks
README.md - Dashboard → Session Navigation: logs out through
ui/dashboard.py - Dashboard → Upload Storage: saves uploads
ui/dashboard.py - Upload Storage → Per-user Storage: gets document path
core/file_manager.py - Dashboard → Index Builder: builds knowledge base
ui/dashboard.py - Index Builder → Per-user Storage: gets paths
build_index.py - Index Builder → Document Loading: loads documents
build_index.py - Document Loading → PDF Loader: dispatches PDF
core/document_loader.py - Document Loading → DOCX Loader: dispatches DOCX
core/document_loader.py - Document Loading → TXT Loader: dispatches TXT
core/document_loader.py - Document Loading → Markdown Loader: dispatches Markdown
core/document_loader.py - Index Builder → Text Chunking: splits documents
build_index.py - Index Builder → Embedding Adapter: embeds chunks
build_index.py - Embedding Adapter → Gemini Models: requests embeddings
core/embeddings.py - Index Builder → FAISS Index: creates and writes index
build_index.py - Index Builder → Per-user Storage: persists knowledge data
build_index.py - Dashboard → Knowledge Loading: loads saved knowledge
ui/dashboard.py - Knowledge Loading → Per-user Storage: gets stored paths
core/knowledge_loader.py - Dashboard → Chunk Retrieval: retrieves chunks
ui/dashboard.py - Chunk Retrieval → Embedding Adapter: embeds question
core/retriever.py - Chunk Retrieval → FAISS Index: searches index
- Dashboard → Answer and Citations: generates response
ui/dashboard.py - Answer and Citations → Gemini Models: requests text output
core/rag.py