Internal Knowledge Assistant powered by RAG + LangChain
Upload documents, ask natural language questions, and get contextual answers instantly.
KnowFlow is a Retrieval-Augmented Generation (RAG) system that provides contextual answers to user queries based on internal documents.
It uses FastAPI as the backend, vectorizes documents into a FAISS index, and routes tasks to appropriate agents using multi-agent logic.
- FastAPI – Web API server
- LangChain – Chain and document retrieval logic
- FAISS – Local vector database
- OpenAI GPT-3.5 / GPT-4 – Answer generation
- HuggingFace Embedding –
snunlp/KR-SBERT-V40K-klueNLI-augSTS - Sentence Transformers – Used for multi-prompt embedding similarity-based routing
- Pydantic + pydantic-settings – Configuration management
- Uvicorn – ASGI server
- Streamlit – Lightweight UI demo
main.py– FastAPI application entry pointconfig.py– Loads environment variablesrouter.py– Multi-agent routing logicagents/– IncludesSummaryAgent,QAAgent,NERAgent,ClassificationAgent, andFallbackAgentretriever.py– FAISS-based document retrievergenerator.py– GPT-based response generatoringestion.py– Loads, splits, embeds documents and saves vectorstorestreamlit_app.py– Streamlit-based UI demoutils.py– Utility functions (stub)agent.py– Agent interface definition (stub)data/docs/– Directory for raw text and PDF filesdata/vectorstore/– FAISS vector index storage
- RAG-based response generation
- Named entity extraction, classification, summarization
- REST API endpoint (
/ask) - Full Korean embedding support
OPENAI_API_KEY=your-openai-key
EMBEDDING_MODEL=snunlp/KR-SBERT-V40K-klueNLI-augSTS
VECTORSTORE_PATH=./data/vectorstore/index.faisspip install -r app/requirements.txtPYTHONPATH=. python core/ingestion.pyuvicorn app.main:app --reload
→ 브라우저에서 http://localhost:8000/docs 접속streamlit run interface/streamlit_app.py- Enhance multi-agent routing with LangGraph or FSM
- Upload API for new documents
- Automatic report generation (PDF/Markdown)
- Save chat history per user
- Support for local LLMs (e.g., Ollama, GPT4All)
MIT License © 2025 KnowFlow