How rs6739171-hash/enterprise_agentic_rag works
This is an agentic RAG application for answering Kubernetes-documentation questions, with a protected chat UI and a hosted evaluation workspace. The main flow sends a chat query from Streamlit to FastAPI, applies safety checks, routes it through LangGraph, retrieves and ranks context when needed, and returns a grounded answer and sources. The graph also shows document ingestion and evaluation as distinct product branches. Relationships are based on the excerpts, SOURCE INDEX references, or README; ingestion details are not sampled, so its runtime connections are omitted.
Main entry points: graph.py LangGraph router · hosted.py Hosted evaluation · main.py FastAPI service · app.py Chat UI
Components 23
User interfaces
- Chat UI
Interprise Grade Rag/ui/app.py - Evaluation UI
Interprise Grade Rag/evals/dashboard.py
Query runtime
- FastAPI service
Interprise Grade Rag/app/main.py - Safety gate
Interprise Grade Rag/app/guardrails/rails.py - Safety rules
Interprise Grade Rag/app/guardrails/colang_rules.py - LangGraph router
Interprise Grade Rag/app/agents/graph.py - Request planner
Interprise Grade Rag/app/agents/nodes/planner.py - Answer responder
Interprise Grade Rag/app/agents/nodes/responder.py - Agent state
Interprise Grade Rag/app/agents/state.py
Knowledge and retrieval
- Context retriever
Interprise Grade Rag/app/agents/nodes/retriever.py - Document ingestion
Interprise Grade Rag/app/ingestion/processor.py - Vector search
Interprise Grade Rag/app/services/retrieval/qdrant_service.py - Embedding service
Interprise Grade Rag/app/services/retrieval/embeddings.py - Context ranking
Interprise Grade Rag/app/services/retrieval/ranking_service.py
Evaluation
- Evaluation routes
Interprise Grade Rag/evals/routes.py - Hosted evaluation
Interprise Grade Rag/evals/hosted.py - Query pipeline
Interprise Grade Rag/evals/pipeline.py - Safety cases
Interprise Grade Rag/evals/guardrails_eval.py - Evaluation metrics
Interprise Grade Rag/evals/metrics.py - Evaluation reports
Interprise Grade Rag/evals/dashboard.py
Other components
- Questioner
- Qdrant
- LLM provider
Connections 26
- Questioner → Chat UI: asks
Interprise Grade Rag/ui/app.py - Chat UI → FastAPI service: posts query
Interprise Grade Rag/ui/app.py - FastAPI service → Safety gate: checks request
Interprise Grade Rag/app/main.py - Safety gate → Safety rules: uses rules
Interprise Grade Rag/app/guardrails/rails.py - FastAPI service → LangGraph router: invokes graph
Interprise Grade Rag/app/main.py - LangGraph router → Request planner: routes requests
Interprise Grade Rag/app/agents/graph.py - LangGraph router → Context retriever: routes technical
Interprise Grade Rag/app/agents/graph.py - LangGraph router → Answer responder: routes answers
Interprise Grade Rag/app/agents/graph.py - Request planner → LLM provider: plans with
Interprise Grade Rag/app/agents/nodes/planner.py - Answer responder → LLM provider: generates with
Interprise Grade Rag/app/agents/nodes/responder.py - Context retriever → Vector search: searches
Interprise Grade Rag/app/agents/nodes/retriever.py - Context retriever → Context ranking: reranks results
Interprise Grade Rag/app/agents/nodes/retriever.py - Vector search → Embedding service: embeds query
Interprise Grade Rag/app/services/retrieval/qdrant_service.py - Vector search → Qdrant: queries vectors
Interprise Grade Rag/app/services/retrieval/qdrant_service.py - LangGraph router → Agent state: uses state
Interprise Grade Rag/app/agents/graph.py - FastAPI service → Evaluation routes: mounts routes
Interprise Grade Rag/app/main.py - Evaluation UI → Evaluation reports: displays reports
Interprise Grade Rag/ui/app.py - Evaluation routes → Hosted evaluation: starts evaluation
Interprise Grade Rag/evals/routes.py - Hosted evaluation → Query pipeline: queries samples
Interprise Grade Rag/evals/hosted.py - Query pipeline → FastAPI service: posts samples
Interprise Grade Rag/evals/pipeline.py - Hosted evaluation → Safety cases: runs safety cases
Interprise Grade Rag/evals/hosted.py - Hosted evaluation → LLM provider: scores answers
Interprise Grade Rag/evals/hosted.py - Evaluation routes → Evaluation reports: serves report
Interprise Grade Rag/evals/routes.py - Chat UI → Questioner: shows answer
Interprise Grade Rag/ui/app.py - Document ingestion → Embedding service: creates vectors
Interprise Grade Rag/app/ingestion/processor.py - Hosted evaluation → Evaluation metrics: computes metrics