How zulkarnainfaizan/agentic-enterprise-it-support-rag works
This is an employee-facing IT support copilot: employees ask questions in the web UI, the API invokes a LangGraph workflow, and the workflow returns an answer, citations, and a decision trace. IT support questions are checked against private Pinecone knowledge first; weak evidence can trigger Tavily search, grading, and a bounded query rewrite/retry. Authorized staff can upload documents for ingestion and indexing. The graph preserves the workflow’s distinct decision stages; its implementation is concentrated in app/rag/workflow.py. Relationships are based on the shown source and README; unsampled template and infrastructure details are not expanded.
Main entry points: workflow.py Evidence grading · routes.py Chat and ingest API · app.js Support web UI · vectorstore.py Vector store adapter
Components 22
User interface
- Support web UI
static/js/app.js
API and services
- FastAPI app
app/main.py - Chat and ingest API
app/api/routes.py - App settings
app/core/config.py - Logging setup
app/core/logging.py - Query audit
app/services/audit.py - Document loading and chunking
app/services/ingestion.py
Agentic RAG
- Workflow state
app/rag/state.py - RAG workflow
app/rag/workflow.py - Question routing
app/rag/workflow.py - Private KB retrieval
app/rag/workflow.py - Evidence grading
app/rag/workflow.py - Query rewrite and retry
app/rag/workflow.py - Answer generation
app/rag/workflow.py - Web fallback search
app/rag/workflow.py
Data and integrations
- Vector store adapter
app/rag/vectorstore.py - Pinecone knowledge store
- SQLite audit database
data/audit.db - OpenAI chat and embeddings
- Tavily search
Other components
- Employee
- Authorized IT staff
Connections 31
- Employee → Support web UI: asks
README.md - Support web UI → Chat and ingest API: POSTs chat
static/js/app.js - Chat and ingest API → RAG workflow: calls ask
app/api/routes.py - RAG workflow → Question routing: starts at
app/rag/workflow.py - Question routing → Private KB retrieval: routes KB
app/rag/workflow.py - Question routing → Answer generation: routes direct
app/rag/workflow.py - Private KB retrieval → Vector store adapter: retrieves from
app/rag/workflow.py - Vector store adapter → Pinecone knowledge store: reads and writes
app/rag/vectorstore.py - Private KB retrieval → Evidence grading: grades private evidence
app/rag/workflow.py - Evidence grading → Answer generation: uses sufficient KB
app/rag/workflow.py - Evidence grading → Web fallback search: falls back when weak
app/rag/workflow.py - Web fallback search → Tavily search: searches
app/rag/workflow.py - Web fallback search → Evidence grading: grades web evidence
app/rag/workflow.py - Evidence grading → Query rewrite and retry: rewrites when weak
app/rag/workflow.py - Query rewrite and retry → Private KB retrieval: retries retrieval
app/rag/workflow.py - Evidence grading → Answer generation: uses sufficient web
app/rag/workflow.py - Answer generation → OpenAI chat and embeddings: generates with
app/rag/workflow.py - Question routing → OpenAI chat and embeddings: classifies with
app/rag/workflow.py - Evidence grading → OpenAI chat and embeddings: grades with
app/rag/workflow.py - Query rewrite and retry → OpenAI chat and embeddings: rewrites with
app/rag/workflow.py - Vector store adapter → OpenAI chat and embeddings: embeds with
app/rag/vectorstore.py - RAG workflow → Workflow state: uses
app/rag/workflow.py - Chat and ingest API → Query audit: writes trace
app/api/routes.py - Query audit → SQLite audit database: stores audit
app/services/audit.py - Authorized IT staff → Support web UI: uploads document
static/js/app.js - Support web UI → Chat and ingest API: POSTs upload
static/js/app.js - Chat and ingest API → Document loading and chunking: loads and chunks
app/api/routes.py - Chat and ingest API → Vector store adapter: indexes chunks
app/api/routes.py - FastAPI app → Chat and ingest API: includes router
app/main.py - FastAPI app → Logging setup: configures
app/main.py - FastAPI app → Query audit: initializes database
app/main.py