How vishal0205/knowflow-ai works
KnowFlow AI is an enterprise knowledge assistant: users submit policy questions, the API routes them through a permission-aware RAG workflow, and the response includes citations or an abstention. The sampled code confirms the API-to-pipeline flow, retrieval entry point, database access, reranking, answer generation, and query logging. The README is empty and several RAG modules were not sampled, so connections for ingestion, indexing, and hybrid retrieval internals are left unspecified.
Main entry points: pipeline.py Answer pipeline · retriever.py Vector retrieval · main.py FastAPI service · App.jsx Question interface
Components 18
User interface
- Question interface
frontend/src/App.jsx
API and orchestration
- FastAPI service
app/main.py - Query models
app/models.py - Answer pipeline
app/rag/pipeline.py - Query routing
app/rag/query_router.py
Knowledge retrieval
- Hybrid search
app/rag/hybrid_search.py - Result reranking
app/rag/reranker.py - Answer generation
app/rag/llm.py - PDF ingestion
app/rag/ingestion.py - Vector retrieval
app/rag/retriever.py - Embedding model
app/rag/embeddings.py - Vector storage
app/rag/vector_store.py
Persistence and observability
- Database engine
app/db/database.py - Document records
app/db/models.py - Query logging
app/observability/logger.py
Other components
- Employee
- PostgreSQL
- Gemini API
Connections 14
- Employee → Question interface: asks question
- Question interface → FastAPI service: posts query
- FastAPI service → Query models: validates request
- FastAPI service → Answer pipeline: calls
- Answer pipeline → Query routing: routes query
- Answer pipeline → Hybrid search: retrieves candidates
- Answer pipeline → Result reranking: reranks results
- Answer pipeline → Answer generation: generates answer
- Answer pipeline → Query logging: logs query
- Vector retrieval → Embedding model: embeds query
- Vector retrieval → Database engine: queries
- Vector retrieval → Document records: selects chunks
- Database engine → PostgreSQL: connects
- Answer generation → Gemini API: generates content