Smart_support_ai / README.md
VaibhavBhinge's picture
version updated
536f585 verified
|
Raw
History Blame Contribute Delete
3.39 kB

A newer version of the Gradio SDK is available: 6.19.0

Upgrade
metadata
title: Smart Support AI
sdk: gradio
emoji: πŸš€
colorFrom: blue
colorTo: indigo
pinned: false
sdk_version: 5.34.2
app_file: frontend/app.py

SmartSupport AI Workspace

An intelligent, enterprise-grade customer support agent designed to automate documentation lookup and streamline user assistance. The system leverages a Retrieval-Augmented Generation (RAG) architecture to securely query a localized company knowledge base, enabling precise, context-aware responses without data leakage.

πŸš€ Key Features Contextual RAG Retrieval: Queries a persistent, pre-built vector database to fetch exact text segments matching user inquiries.

Intelligent Conversation Memory: Maintains a continuous stateful chat history across sessions for fluid, natural dialogue.

Deterministic Tool Routing: Orchestrates actions dynamically, allowing the agent to switch between document lookups, ticket creation, and human escalation workflows.

Production-Ready Split Architecture: Decouples the lightweight client interface from the heavy server-side AI processing engine via RESTful endpoints.

πŸ› οΈ Tech Stack Frontend UI: Gradio

Backend API Framework: FastAPI & Uvicorn

Orchestration Framework: LangChain

LLM Engine: NVIDIA Nemotron Mini 4B (via langchain-nvidia-ai-endpoints)

Vector Store: ChromaDB

Environment Management: Python Dotenv

πŸ“ Project Structure Plaintext smart_support_ai/ β”‚ β”œβ”€β”€ backend/ β”‚ β”œ β”‚ β”œβ”€β”€ main.py # FastAPI application hosting the /chat endpoint β”‚ β”œβ”€β”€ Agent.py # LangChain execution engine & memory layer β”‚ └── tools.py # Core tools (ChromaDB search, Ticket engine) β”‚ β”œβ”€β”€ frontend/ β”‚ β”œ β”‚ └── app.py # Gradio web interface client application β”‚ β”œβ”€β”€ data/ β”‚ └── company_faqs.txt # Source documentation file for company data β”‚ β”œβ”€β”€ chroma_db/ # Persistent directory containing pre-built vector embeddings β”‚ β”œβ”€β”€ requirements.txt # Explicit project dependency listings └── .env # Local environment secrets and API keys

⚑ Installation & Local Setup

  1. Clone and Navigate to the Repository Bash cd smart_support_ai

  2. Configure the Environment Variables Create a file named .env in the root directory of your project and populate it with your credentials:

Plaintext HUGGINFACE_API_KEY=your_api_key_here

  1. Install System Dependencies Install all required third-party packages using pip:

Bash pip install fastapi uvicorn gradio langchain langchain-nvidia-ai-endpoints chromadb python-dotenv πŸƒ How to Run the Application To run the full stack, execute the backend server and frontend interface concurrently in separate terminal windows.

Step 1: Initialize the FastAPI Backend Launch the backend server application. It will initialize the LangChain engine and expose the necessary API routes on port 8000.

Bash uvicorn backend.main:app --reload Verification: Navigate to http://127.0.0.1:8000/docs in your browser to inspect the interactive Swagger API documentation.

Step 2: Launch the Gradio Frontend Client In a new terminal window, spin up the web interface layer to connect to the active backend gateway.

Bash python frontend/app.py Access Link: Open http://127.0.0.1:7860 in your web browser to interact with the operational support desk.