🏗️ SoRag Retrieval Architecture

Enterprise RAG System - LangGraph Workflow Visualizations

6
Main Workflows
9
Specialized Agents
59
Processing Components
22
Integration Tools

System Overview

Complete Architecture
The SoRag system is a comprehensive enterprise RAG solution built on LangGraph, featuring:
  • Supervisor Orchestrator: Main controller that routes requests to appropriate workflows
  • Multi-Agent System: Specialized agents for RAG, chat, and database integration
  • Indexing Pipeline: Complete document processing from raw files to search-ready vectors
  • Shop Integration: Database operations with 22 specialized tools
graph TB %% Style definitions classDef supervisor fill:#667eea,stroke:#fff,stroke-width:3px,color:#fff classDef orchestrator fill:#764ba2,stroke:#fff,stroke-width:2px,color:#fff classDef workflow fill:#f093fb,stroke:#333,stroke-width:2px,color:#333 classDef agent fill:#ff6b6b,stroke:#333,stroke-width:2px,color:#333 classDef node fill:#4ecdc4,stroke:#333,stroke-width:1px,color:#333 classDef startEnd fill:#4CAF50,stroke:#fff,stroke-width:2px,color:#fff %% Main flow START(("👤 USER QUERY")):::startEnd END(("📋 RESPONSE")):::startEnd %% Supervisor nodes SUPERVISOR["🎯 SUPERVISOR - Enterprise RAG Orchestrator"]:::supervisor QUERY_SPLITTER["📝 Query Splitter - Split complex queries"]:::node ORCHESTRATOR["🔄 Orchestrator - Coordinate agents"]:::orchestrator SYNTHESIZER["🔧 Synthesizer - Combine results"]:::node %% Workflow selection ROUTER{{"🔀 Workflow Router - chat_mode + parameters"}}:::node %% Workflows CHAT_WF["💬 Chat Workflow"]:::workflow RAG_RAW_WF["🔍 RAG Raw"]:::workflow RAG_AI_WF["🤖 RAG + AI"]:::workflow SHOP_WF["🏪 Shop Integration"]:::workflow %% Agents (from registry) subgraph AGENTS["Agent Registry"] RAG_AGENT["🔍 RAG Agent - 5-step pipeline"]:::agent CHAT_AGENT["💬 Chat Agent - Direct LLM"]:::agent INTEGRATION_AGENT["🏪 Integration Agent - Shop supervisor"]:::agent end %% Shop sub-agents subgraph SHOP_AGENTS["Shop Agents (22 tools total)"] SHOP_DB["🗄️ DB Agent - 11 CRUD tools"]:::agent SHOP_ANALYSIS["📈 Analysis - 8 query tools"]:::agent SHOP_VIZ["📊 Visualization - 3 render tools"]:::agent end %% Main flow START --> SUPERVISOR SUPERVISOR --> QUERY_SPLITTER QUERY_SPLITTER --> ROUTER %% Workflow selection ROUTER -->|"chat_mode=chat"| CHAT_WF ROUTER -->|"rag + no LLM"| RAG_RAW_WF ROUTER -->|"rag + LLM"| RAG_AI_WF ROUTER -->|"starts with /"| SHOP_WF %% All workflows go through orchestrator CHAT_WF --> ORCHESTRATOR RAG_RAW_WF --> ORCHESTRATOR RAG_AI_WF --> ORCHESTRATOR SHOP_WF --> ORCHESTRATOR %% Orchestrator uses agent registry ORCHESTRATOR --> RAG_AGENT ORCHESTRATOR --> CHAT_AGENT ORCHESTRATOR --> INTEGRATION_AGENT %% Integration agent manages shop agents INTEGRATION_AGENT --> SHOP_DB INTEGRATION_AGENT --> SHOP_ANALYSIS INTEGRATION_AGENT --> SHOP_VIZ %% Results synthesis ORCHESTRATOR --> SYNTHESIZER SYNTHESIZER --> END

Main Supervisor Workflow

Supervisor Workflow

🏗️ Complete System Architecture

View the detailed architecture by navigating through the tabs above

Each workflow has its own dedicated PNG visualization

Supervisor Workflow

Main Orchestrator
The supervisor is the main orchestrator that coordinates all workflows and agents in the system. It handles query splitting, routing, agent coordination, and result synthesis.
Supervisor Workflow

Chat Workflow

Direct LLM
Simple chat mode that directly uses LLM without RAG retrieval. Used for general conversations.
Chat Workflow

Chat workflow: Start → Chat (Direct LLM) → End

RAG Raw Workflow

Retrieval Only
The RAG Raw workflow implements retrieval without LLM generation. Pipeline: Memory Check → Retrieve → Rerank → Memory Store → Return raw results.
RAG Raw Workflow

RAG Pipeline Architecture

RAG Pipeline Architecture

RAG Pipeline (No LLM):

Start → Memory Check → Retrieve → Rerank → Memory Store → End

RAG + AI Workflow

Retrieval with LLM
The RAG + AI workflow adds LLM generation after retrieval. Pipeline: Memory Check → Retrieve → Rerank → Memory Store → LLM Generate → Return AI response.
RAG + AI Workflow

RAG Pipeline with LLM Generation:

Start → Memory Check → Retrieve → Rerank → Memory Store → LLM Generate → End

Shop Integration Workflow

Multi-Agent System
A supervisor-based multi-agent system with 3 specialized agents and 22 tools for database operations. Handles CRUD operations, data analysis, and visualization.
Appointment System (Clinic / Law Firm)
Integration Workflow

Detailed Multi-Agent Architecture

Shop Integration Detailed Architecture

Supervisor-based Multi-Agent System

🗄️ DB Agent (11 tools) | 📈 Analysis Agent (8 tools) | 📊 Visualization Agent (3 tools)