Customer Support Chatbot Powered by RAG and SQL Agents


As businesses scale, customer support becomes a critical yet challenging operation. Traditional support systems often struggle with increasing query volumes, leading to long wait times, inconsistent responses, and rising operational costs. To tackle these issues, I developed an AI-powered multi-agent chatbot that automates customer inquiries in real time, ensuring fast, accurate, and scalable support.

Tech Stack

The chatbot is powered by:

  • FastAPI – Backend framework for handling chatbot requests efficiently.
  • LangGraph – Manages multi-agent workflows for structured task delegation.
  • Pinecone – Vector database for fast retrieval of FAQs and policies.
  • Streamlit – Interactive UI framework for customer interactions.
System Architecture Diagram
Figure 1: System Design of the Chatbot

How It Works

This chatbot is built on a multi-agent architecture with specialized agents collaborating under a structured framework:

  • SQL Agent – Retrieves real-time customer data, such as order statuses, restaurant details, and payment records, by interacting with a PostgreSQL database.
  • RAG Agent – Extracts relevant information from company policies, FAQs, and terms of service using Retrieval-Augmented Generation (RAG) to provide precise, up-to-date responses.
  • Coordinator – Analyzes customer queries and assigns tasks to the appropriate agents for optimal efficiency.
  • Representative – Synthesizes responses and communicates them professionally to users, mimicking a real customer support representative.

This system ensures that users receive instant, context-aware responses without requiring human intervention, significantly reducing operational costs while enhancing the customer experience.

Slide 1Slide 2Slide 3Slide 4Slide 5

Why It Matters

By replacing traditional customer support with AI-driven automation, businesses can:

βœ” Reduce response times from minutes to seconds
βœ” Lower customer support costs by minimizing the need for human agents
βœ” Improve customer satisfaction through instant, accurate, and professional responses
βœ” Scale effortlessly as customer demand grows

This project has several real-world applications across various industries:

  • Food Delivery Services (Uber Eats, Foodpanda, DoorDash, etc.) – Automates queries related to orders, refunds, and delivery issues.
  • E-Commerce Platforms – Handles product inquiries, shipping details, and return policies.
  • Telecom & Utilities – Assists customers with billing queries, service upgrades, and troubleshooting.

Final Thoughts

This project showcases the power of AI-driven automation in customer service and highlights my expertise in LLMs, SQL integration, and multi-agent architectures. As AI continues to reshape customer interactions, solutions like this will play a crucial role in making support systems smarter, faster, and more reliable.

Screenshot of Customer view

Figure: Screenshot of user interaction with the chatbot, with an optional β€˜Show Tool Calls’ button to reveal agent tool calls and intermediate responses.

Check out the project on GitHub.
Curious to learn more? Let’s connect!


Written by

Fran

Tariq Mehmood

Machine Learning
Engineer