How krishnavamshi2912/enterprise-rag-assistant works
This is a Telecom BSS knowledge-base RAG assistant. A user submits a question through Streamlit; the backend runs the assistant workflow, which checks input safety, handles simple or out-of-domain queries directly, and routes technical questions through retrieval, response generation, and output safety checks. Startup prepares section-aware knowledge-base chunks and a Qdrant retriever; technical retrieval includes FlashRank reranking. Portkey routes LLM requests, while LangSmith tracing and evaluation support the application. Some links reflect README capabilities or SOURCE INDEX references; unsampled internals are not expanded beyond that evidence.
Main entry points: pipeline.py RAG setup and ask · graph.py Workflow graph · vector_store.py Vector store · llm.py LLM access
Components 22
Application entry
- Streamlit UI
app/ui/streamlit_app.py - Backend API
app/main.py - RAG setup and ask
app/retrieval/pipeline.py
Knowledge preparation
- BSS knowledge base
Documents/Telecom_BSS_Knowledge_Base.txt - Document loader
app/ingestion/loader.py - Section chunking
app/ingestion/chunking.py - Vector store
app/retrieval/vector_store.py - FlashRank reranker
app/retrieval/reranker.py - Qdrant service
Assistant workflow
- Workflow graph
app/agents/graph.py - Agent state
app/agents/state.py - Input/output guardrails
app/guardrails/guardrails.py - Query planner
app/agents/nodes/planner.py - Deterministic classifier
app/utils/query_classifier.py - Retriever node
app/agents/nodes/retriver.py - Response generator
app/agents/nodes/responder.py
Models and services
- Jina embeddings
app/retrieval/embeddings.py - LLM access
app/retrieval/llm.py - Portkey gateway
app/gateway/gateway.py - Portkey service
- LangSmith tracing
app/retrieval/tracing.py
Other components
- User
Connections 25
- User → Streamlit UI: asks
README.md - Streamlit UI → Backend API: submits query
- Backend API → RAG setup and ask: uses RAG pipeline
app/main.py - RAG setup and ask → Document loader: loads documents
app/retrieval/pipeline.py - BSS knowledge base → Document loader: provides content
- RAG setup and ask → Section chunking: chunks documents
app/retrieval/pipeline.py - RAG setup and ask → Vector store: builds or loads
app/retrieval/pipeline.py - Vector store → Jina embeddings: embeds chunks
app/retrieval/vector_store.py - Vector store → Qdrant service: stores vectors
README.md - RAG setup and ask → LangSmith tracing: checks tracing
app/retrieval/pipeline.py - RAG setup and ask → Workflow graph: creates workflow
app/retrieval/pipeline.py - RAG setup and ask → Workflow graph: invokes workflow
app/retrieval/pipeline.py - Workflow graph → Input/output guardrails: registers guardrails
app/agents/graph.py - Workflow graph → Query planner: routes to planner
app/agents/graph.py - Query planner → Deterministic classifier: checks simple queries
app/agents/nodes/planner.py - Query planner → LLM access: classifies queries
app/agents/nodes/planner.py - Workflow graph → Retriever node: routes technical queries
app/agents/graph.py - Retriever node → FlashRank reranker: reranks results
app/agents/nodes/retriver.py - Retriever node → Vector store: searches vectors
- Workflow graph → Response generator: routes retrieved context
app/agents/graph.py - Response generator → LLM access: generates answer
app/agents/nodes/responder.py - Input/output guardrails → LLM access: checks safety
app/guardrails/guardrails.py - LLM access → Portkey gateway: requests model
app/retrieval/llm.py - Portkey gateway → Portkey service: routes model calls
app/gateway/gateway.py - Workflow graph → Agent state: uses workflow state
app/agents/graph.py