How darshankamate1254/securerag-enterprise-knowledge-assistant works
This is an enterprise RAG application: users sign in, submit a namespace-scoped question, and receive an answer with sources. Ingestion tags and chunks departmental documents; the query pipeline expands queries, retrieves and reranks context, synthesizes an answer, and redacts sensitive terms. The excerpts show the Flask-to-pipeline and retrieval internals. Caching, guardrails, streaming, and observability are documented capabilities, but their implementation paths are not established by the supplied tree and excerpts.
Main entry points: pipeline.py Answer synthesis · main.py Flask routes · loader.py Document loading · config.py Runtime settings
Components 20
Web and identity
- Flask routes
app/main.py - User accounts
app/auth/users.py - Namespace access
app/auth/rbac.py - Chat interface
templates/chat.html
Document ingestion
- Department documents
data - Document loading
app/ingestion/loader.py - Namespace tagging
app/ingestion/metadata.py - Hierarchical chunking
app/ingestion/loader.py
RAG query pipeline
- Vector index
- HyDE and expansion
app/rag/hyde.py - Hybrid retrieval
app/rag/retriever.py - Cross-encoder reranking
app/rag/reranker.py - Answer synthesis
app/rag/pipeline.py
Platform capabilities
- Runtime settings
app/utils/config.py - Query guardrails
app/rag - Semantic response cache
app/rag - SSE streaming
app/main.py - Telemetry and logging
app - RAGAS evaluation
eval/evaluate.py
Other components
- User
Connections 23
- User → Flask routes: submits queries
app/main.py - Flask routes → User accounts: authenticates
app/main.py - Flask routes → Namespace access: checks permissions
app/main.py - Flask routes → Chat interface: renders chat
app/main.py - User → Chat interface: uses
README.md - Department documents → Document loading: loads documents
app/ingestion/loader.py - Document loading → Namespace tagging: tags documents
app/ingestion/loader.py - Document loading → Hierarchical chunking: creates chunks
app/ingestion/loader.py - Hierarchical chunking → Vector index: indexes leaves
README.md - Flask routes → Answer synthesis: runs chat
app/main.py - Answer synthesis → Namespace access: redacts output
app/rag/pipeline.py - Answer synthesis → HyDE and expansion: expands query
app/rag/pipeline.py - Answer synthesis → Hybrid retrieval: builds retriever
app/rag/pipeline.py - Hybrid retrieval → Vector index: retrieves context
- Answer synthesis → Cross-encoder reranking: reranks results
app/rag/pipeline.py - Answer synthesis → Runtime settings: reads settings
app/rag/pipeline.py - Document loading → Runtime settings: reads settings
app/ingestion/loader.py - Flask routes → Runtime settings: loads settings
app/main.py - Answer synthesis → Query guardrails: applies safeguards
README.md - Flask routes → Semantic response cache: uses response cache
README.md - Flask routes → SSE streaming: streams tokens
README.md - Answer synthesis → Telemetry and logging: emits telemetry
README.md - RAGAS evaluation → Answer synthesis: evaluates answers
eval/evaluate.py