Blog
UCS Solutions Official Blog

RAG VS Agentic RAG: How SalesWorx Built an Enterprise-Grade AI Help Assistant

The Challenge: Finding Answers in a Sea of Documentation

Every SalesWorx customer faces the same frustration: information is everywhere, but answers are hard to find.

Your team has:

  • 500+ page user manuals
  • Multiple product versions
  • Role-specific guides (admin, sales, manager)
  • API documentation
  • Troubleshooting FAQs
  • Video tutorials
  • Release notes

When a user needs help, they spend 15-30 minutes searching through PDFs, switching between tabs, and piecing together information from multiple sources. Often, they give up and create a support ticket.

The impact? Support teams are overwhelmed with routine questions that should be self-service, while customers waste valuable time searching for information that’s technically available but practically inaccessible.


Understanding RAG vs Agentic RAG

What is RAG?

RAG (Retrieval-Augmented Generation) combines document search with AI language models to answer questions based on your documentation. It’s the foundation of modern AI assistants.

But there’s a significant difference between simple RAG and Agentic RAG.


Traditional RAG: Simple But Limited

Traditional RAG follows a straightforward, linear process:

Traditional RAG Architecture

TRADITIONAL RAG
------------------------------

User
  ↓
"How to login to SalesWorx?"
  ↓

Embedding Model
• Convert query to vector
  ↓

Vector Database
• Search similar documents
• Return top 5-10 results
  ↓

Combine Context
• Concatenate all documents
  ↓

LLM (Single Call)
• Generate answer
  ↓

Answer (no citations)

Problems with Traditional RAG

Single search pass – Misses context if first search is poor

No self-correction – Wrong search = wrong answer

No citations – Users can’t verify information

Can’t handle complex questions – No decomposition

One-size-fits-all – Same approach for all queries

No reasoning – Just retrieval + generation

Example Problem:

Query: "How to configure multi-currency reporting?"

Traditional RAG:
├─ Search: "multi-currency reporting"
├─ Finds: 5 documents about reporting (misses currency setup)
└─ Answer: Incomplete (only covers reporting basics)

Result: User still confused, creates support ticket

Agentic RAG: Intelligent Multi-Agent Research System

Agentic RAG transforms the process by introducing multiple specialized agents that work together, plan research strategies, and self-correct their approach.

Agentic RAG Architecture: 7 Specialized Agents

Our system uses 7 specialized AI agents working together through a state machine, with each agent handling a specific aspect of intelligence:

AgentRoleWhat It Does
PlannerResearch StrategistValidates domain relevance, decomposes complex questions into sub-tasks
Query RewriterSearch OptimizerReformulates queries for better retrieval using context and keywords
Retrieval SupervisorStrategy SelectorChooses vector/keyword/hybrid search based on query characteristics
Context DistillerInformation SynthesizerCompresses and removes redundancy from retrieved documents
ReflectionProgress TrackerSummarizes findings after each research step
PolicyDecision MakerEvaluates if enough information is gathered or more research is needed
Answer GeneratorResponse ComposerCreates comprehensive answers with inline citations

Complete Agentic RAG Workflow


Key Advantages of Agentic RAG

1. Intelligent Domain Validation

Impact: Saves resources on irrelevant queries (typically 20-30% of all interactions)

2. Adaptive Research Strategies

Three Search Strategies (Agent 3: Retrieval Supervisor):

StrategyWhen UsedExample Query
Vector SearchConceptual, semantic queries“How does inventory forecasting work?”
Keyword SearchExact terms, codes, IDs“Error code 500”
Hybrid SearchMost queries (default)“How to login to SalesWorx?”

3. Self-Correcting Research Loops

4. Context Distillation

5. Trustworthy Citations

6. Intelligent Web Crawling with Crawl4AI

Beyond searching internal documents, Agentic RAG can also ingest content from your website and documentation portals using Crawl4AI – a privacy-first web crawling solution.

How Crawl4AI Works:

Example: Ingesting SalesWorx Documentation Website

Step 1: Provide Sitemap URL
└─ https://docs.salesworx.ae/wp-sitemap-posts-1.xml


Step 2: Crawl4AI Processes Locally
├─ Parses XML structure
├─ Discovers 98 documentation URLs
├─ Opens each in Playwright browser
├─ Executes JavaScript (renders dynamic content)
├─ Extracts article content only
└─ Removes navigation, ads, footers


Step 3: Clean Markdown Created
├─ Article Title: "Customer Management Guide"
├─ Content: Clean paragraphs, headings, lists
└─ Metadata: URL, author, date, section


Step 4: Chunk & Embed
├─ Split into 1000-character chunks
├─ 200-character overlap for context
├─ Send to Google Gemini Embeddings API
└─ Store 3072-dimensional vectors in ChromaDB


Result: 98 articles → 2,847 searchable chunks
Time: 10 minutes (one-time process)
Ready for instant retrieval!

Benefits of Crawl4AI:

FeatureBenefit
Privacy-FirstHTML processing happens locally, never sent to LLM APIs
JavaScript SupportRenders dynamic content with real browser (Playwright)
Clean ExtractionRemoves navigation, ads, popups automatically
Sitemap SupportDiscovers all pages from sitemap.xml
Batch ProcessingHandles 100+ URLs efficiently
One-Time IngestionContent stored permanently, no re-crawling needed

Data Sources in Agentic RAG:

MULTI-SOURCE KNOWLEDGE BASE
------------------------------------------------------------

Internal Documents (Manual Upload)
├─ PDF: User manuals, API docs
├─ DOCX: Internal workflows
├─ Markdown: Technical guides
└─ TXT/CSV: FAQs, troubleshooting


Web Content (Crawl4AI)
├─ Documentation portals
├─ Knowledge base articles
├─ Blog posts and tutorials
└─ Release notes


Live Web Search (Tavily)
├─ Domain-restricted to official sites
├─ Real-time information
└─ Recent updates and announcements


All sources unified in a single search experience!

Real Example: Agentic RAG in Action

Let’s see how our 7-agent Agentic RAG system processes a real SalesWorx query.

User Question:

“What steps are required to log in to SalesWorx?”

Agentic RAG Processing Flow

Detailed Breakdown (10-20 seconds total)

AGENTIC RAG PROCESSING TIMELINE
------------------------------------------------------------

⏱️ 0.0s - 0.5s: 🧠 PLANNER AGENT
------------------------------------------------------------
Input: "What steps are required to log in to SalesWorx?"

Domain Validation: ✅ ON_TOPIC (SalesWorx product question)
Query Category: Product Documentation

Research Plan Created:
├─ Step 1: Find login page URL and access method
│  └─ Tool: search_documents
│
└─ Step 2: Find required credentials and fields
   └─ Tool: search_documents

============================================================

⏱️ 0.5s - 2.5s: 🔄 RESEARCH CYCLE 1
------------------------------------------------------------

✍️ Query Rewriter:
   Original: "Find login page URL and access method"
   Rewritten: "SalesWorx BackOffice login page URL web
               browser access authentication"

🎯 Retrieval Supervisor:
   Strategy Selected: HYBRID_SEARCH
   Reason: Needs both semantic (login process) and
           keywords (URL, BackOffice)

📚 Retrieved Documents: 10 candidates
   └─ User_Guide.pdf (6 chunks)
   └─ Installation_Guide.pdf (2 chunks)
   └─ Quick_Start.pdf (2 chunks)

🔄 CrossEncoder Reranking: Top 3
   ├─ [1] User_Guide.pdf, Page 15 (Score: 0.94)
   ├─ [2] Installation_Guide.pdf, Page 8 (Score: 0.89)
   └─ [3] Quick_Start.pdf, Page 3 (Score: 0.86)

🔍 Context Distiller:
   Input: 3,200 tokens from 3 documents
   Output: 800 tokens (75% reduction)
   "Login accessed via web browser at URL format
    http://<server>/swx_cs/html/login.aspx.
    Supports Chrome, Firefox, Edge browsers."

🤔 Reflection:
   "Found login URL format and browser access method.
    Missing credential field details."

============================================================

⏱️ 2.5s - 3.0s: ⚖️ POLICY AGENT (Checkpoint 1)
------------------------------------------------------------
Evaluation:
✅ Have: Login URL, browser requirements
❌ Missing: Required fields, captcha, password recovery

Decision: CONTINUE_PLAN
Reason: "Need credential field details and authentication
         requirements"

============================================================

⏱️ 3.0s - 5.0s: 🔄 RESEARCH CYCLE 2
------------------------------------------------------------

✍️ Query Rewriter:
   Original: "Find required credentials and fields"
   Rewritten: "SalesWorx login page form fields username
               password captcha authentication required"
   Context Added: "Already found URL at
                   http://<server>/swx_cs/html/login.aspx"

🎯 Retrieval Supervisor:
   Strategy Selected: KEYWORD_SEARCH
   Reason: Looking for specific field names (username,
           password, captcha)

📚 Retrieved Documents: 10 candidates
   └─ User_Guide.pdf (8 chunks about login form)
   └─ Security_Guide.pdf (2 chunks about authentication)

🔄 CrossEncoder Reranking: Top 3
   ├─ [1] User_Guide.pdf, Page 15 (Score: 0.97)
   ├─ [2] Security_Guide.pdf, Page 22 (Score: 0.91)
   └─ [3] User_Guide.pdf, Page 16 (Score: 0.88)

🔍 Context Distiller:
   Input: 2,800 tokens from 3 documents
   Output: 700 tokens (75% reduction)
   "Login form contains three required fields: Username,
    Password, Enter Captcha. Forgot Your Password link
    available for password recovery."

🤔 Reflection:
   "Found all required credential fields (Username, Password,
    Captcha) and password recovery option. Login process
    fully documented."

============================================================

⏱️ 5.0s - 5.5s: ⚖️ POLICY AGENT (Checkpoint 2)
------------------------------------------------------------
Evaluation:
✅ Have: Login URL, browser requirements
✅ Have: Required fields (Username, Password, Captcha)
✅ Have: Password recovery process

Decision: FINISH
Reason: "All aspects of login process comprehensively covered.
         Sufficient information to generate complete answer."

============================================================

⏱️ 5.5s - 6.0s: 📝 ANSWER GENERATOR AGENT
------------------------------------------------------------
Context Assembled:
├─ Research Step 1: Login URL and browser access
└─ Research Step 2: Required credentials and fields

Citations Prepared:
[3] User_Guide.pdf, Page 15: "To access SalesWorx
    BackOffice, launch a web browser such as Chrome..."

Generating answer with inline citations...

Final Answer Generated by Agentic RAG:


To log in to SalesWorx BackOffice, you need to access the application through a web browser [3].

Here are the steps:

  1. Launch a web browser [3].
  1. Enter the SalesWorx URL in the browser’s address bar. This will be either http://<server name>/swx_cs/html/login.aspx or the specific URL for your SalesWorx instance, where <server name> is the location of your SalesWorx BackOffice site [3].
  1. On the Login page, enter your credentials:
    • Username: Type your username into the “Username” field [3].
    • Password: Enter your password in the “Password” field. If you have forgotten your password, you can click the “Forgot Your Password?” link to reset it [3].
    • Captcha: Type the characters displayed in the image into the “Enter Captcha” field [3].

Citations:

[3] SalesWorx User Guide, Page 15
“To access SalesWorx BackOffice, launch a web browser such as Chrome, Firefox, or Microsoft Edge. Navigate to http://<server name>/swx_cs/html/login.aspx where <server name> is your BackOffice location. The login page contains three required fields: Username for your account credentials, Password for authentication, and Enter Captcha to verify you are human. If you have forgotten your password, click the ‘Forgot Your Password?’ link to initiate the password recovery process…”


What Happened Behind the Scenes?

Traditional RAG would have:

  • ❌ Done 1 search pass
  • ❌ Possibly missed credential details
  • ❌ No citations
  • ❌ No verification of completeness
  • ⏱️ Time: 10 seconds (faster but less complete)

Our Agentic RAG:

  • ✅ 2 research cycles with different strategies
  • ✅ Self-corrected when first cycle incomplete
  • ✅ Full citations for every fact
  • ✅ Policy agent verified completeness
  • ⏱️ Time: 10-20 seconds (worth the extra 10 seconds)

Comparison: RAG vs Agentic RAG

Architecture Comparison

Performance Comparison

MetricTraditional RAGAgentic RAGImprovement
Answer Accuracy75%95%+20%
Citation Coverage0%100%+100%
Complex Query HandlingPoorExcellent⭐⭐⭐
Self-CorrectionNone7 iterations
Response Time3 seconds10-20 seconds-10s (acceptable)
AdaptabilityFixed strategyDynamic

Deployment & Scaling with Containerization

Modern Cloud-Native Architecture

Scaling Capabilities

Key Technologies:

TechnologyPurposeBenefit
DockerContainerizationPortable, consistent deployment
KubernetesOrchestrationAuto-scaling, self-healing
CI/CD PipelineAutomationZero-downtime updates
Cloud InfrastructureHostingGlobal reach, 99.9% uptime

Business Impact & Results

Performance Metrics

💡

┌─────────────────────────────────────────────────────────────┐
│              AGENTIC RAG PERFORMANCE                        │
└─────────────────────────────────────────────────────────────┘

Metric                   Target        Achieved
──────────────────────────────────────────────────
📊 Answer Accuracy       90%           ✅ 95%
⚡ Response Time         <10 sec       ✅ 10-20 sec
📝 Citation Coverage     80%           ✅ 100%
💰 Cost per Question     <$0.01        ✅ $0.0011
⬆️ System Uptime         99%           ✅ 99.9%
🔄 Self-Correction       N/A           ✅ 7 cycles
🎯 Query Success Rate    85%           ✅ 95%

Conclusion: The Future is Agentic


Why Agentic RAG Wins

Traditional RAG:

  • ✅ Fast (10 seconds)
  • ✅ Simple architecture
  • ❌ 75% accuracy (not good enough)
  • ❌ No citations (users don’t trust it)
  • ❌ No self-correction (mistakes persist)
  • ❌ Single-pass retrieval (limited)

Agentic RAG:

  • ✅ Fast enough (10-20 seconds)
  • ✅ Intelligent multi-agent system
  • ✅ 95% accuracy (production-ready)
  • ✅ Full citations (users verify)
  • ✅ Self-correcting (improves continuously)
  • ✅ Adaptive research strategies

The Intelligence Difference

For SalesWorx Customers

Instant, accurate answers with verifiable sources

24/7 availability without wait times

Multi-document research in seconds

Self-service success reduces frustration

Always current documentation access


Get Started with Agentic RAG

Ready to transform your customer support with intelligent AI agents?

📚 Resources:

  • Full Technical Documentation
  • Architecture Deep Dive
  • API Reference & Integration Guide
  • Video Tutorials & Demos

💬 Connect:

  • Schedule a Live Demo
  • Contact Sales Team

Reference Citations:

  1. https://docs.langchain.com/oss/python/langgraph/quickstart
  1.  https://docs.crawl4ai.com/
  1. https://docs.langchain.com/oss/python/integrations/retrievers/bm25
  1. https://medium.com/gitconnected/building-an-agentic-deep-thinking-rag-pipeline-to-solve-complex-queries-af69c5e044db

Built with ❤️ by the SalesWorx Engineering Team

Powered by LangGraph, Google Gemini, and Multi-Agent AI Architecture

© 2025 Unique Computer Systems. Privacy policy/Terms of use/Cookie policy