Skip to content

Repository files navigation

🚀 QueryDesk — AI Customer Support RAG Agent

An intelligent customer support assistant powered by Retrieval Augmented Generation (RAG), LangChain, ChromaDB, and Groq LLMs.

Built to demonstrate modern AI application development with semantic search, vector databases, conversational memory, and context-aware responses.


#LIVE DEMO

https://querydesk-ai.streamlit.app/


📌 Overview

QueryDesk is an AI-powered customer support assistant that helps users get accurate answers from a company's internal knowledge base.

Instead of generating random responses, QueryDesk uses Retrieval Augmented Generation (RAG) to:

  1. Understand the user's query
  2. Retrieve relevant information from a local knowledge base
  3. Provide a grounded response using an LLM
  4. Maintain conversation history for follow-up questions

Example:

User:
Do you ship to India?

Assistant:
Yes, we ship to India. The shipping charge is ₹499.

User:
How much does it cost?

Assistant:
Shipping to India costs ₹499.

✨ Features

🤖 AI Customer Support Chat

  • Interactive conversational interface built with Streamlit
  • Real-time AI responses
  • Clean modern UI experience

🔎 Retrieval Augmented Generation (RAG)

  • Uses a fictional company FAQ knowledge base
  • Retrieves relevant documents before generating responses
  • Prevents hallucination by grounding answers in retrieved information

🧠 Conversational Memory

QueryDesk remembers previous conversation turns.

Example:

User:
Do you ship to India?

Assistant:
Yes, we do.

User:
How much does it cost?

Assistant:
Shipping to India costs ₹499.

The assistant understands that "it" refers to the previous shipping discussion.

📚 Source Citations

Every response includes the retrieved knowledge source:

Source:
GigaCorp FAQ (Retrieved from Chroma Vector Database)

⚡ Semantic Search

Uses HuggingFace sentence embeddings to convert text into vectors and perform similarity search.

🎨 Modern User Interface

  • Custom Streamlit UI
  • Chat-style conversation layout
  • Sidebar feature panel
  • Responsive design

🏗️ System Architecture

                 User Query
                     |
                     ↓
          Streamlit Chat Interface
                     |
                     ↓
          Query Understanding
                     |
                     ↓
        ChromaDB Vector Retrieval
                     |
                     ↓
        Relevant FAQ Documents
                     |
                     ↓
             Groq LLM Processing
                     |
                     ↓
        Context-Aware Final Answer


🛠️ Tech Stack

Technology Purpose
Python Backend development
Streamlit Web application interface
LangChain AI orchestration framework
Groq API Large Language Model inference
ChromaDB Vector database
HuggingFace Embeddings Semantic document retrieval
dotenv Environment configuration

📂 Project Structure

QueryDesk/

│
├── app.py
│   └── Main Streamlit application
│
├── create_vectorstore.py
│   └── Creates ChromaDB vector database
│
├── faq.txt
│   └── Mock company knowledge base
│
├── vectorstore/
│   └── Stored document embeddings
│
├── requirements.txt
│   └── Project dependencies
│
└── README.md


📖 Knowledge Base

The application uses a fictional company named GigaCorp.

The FAQ contains information about:

  • 🚚 Shipping policies
  • ↩ Return procedures
  • 🕒 Business hours
  • ⭐ Subscription/service tiers
  • 📞 Customer support information

⚙️ Installation & Setup

1. Clone Repository

git clone https://github.com/PurviDhiman1/QueryDesk.git

cd QueryDesk

2. Create Virtual Environment

python3 -m venv venv

source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure API Key

Create a .env file:

GROQ_API_KEY=your_groq_api_key

5. Create Vector Database

python3 create_vectorstore.py

6. Run Application

streamlit run app.py

The application will open in your browser:

http://localhost:8501

🧪 Sample Queries

Try asking:

Do you ship to India?
How much does shipping cost?
What are your business hours?
Tell me about premium plans.

🚀 Deployment

QueryDesk can be deployed using:

  • Streamlit Community Cloud
  • Hugging Face Spaces
  • Render

The application supports deployment using environment secrets for secure API key management.


🔮 Future Improvements

Possible enhancements:

  • Multiple company knowledge bases
  • PDF document ingestion
  • User authentication
  • Customer ticket creation
  • Analytics dashboard
  • Conversation export
  • Agent feedback system

👩‍💻 Author

Purvi Dhiman

B.Tech Computer Science Engineering AI/ML Enthusiast


⭐ Project Highlights

This project demonstrates practical implementation of:

✅ Large Language Models ✅ Retrieval Augmented Generation ✅ Vector Databases ✅ Prompt Engineering ✅ AI Agent Workflows ✅ Full-stack AI Application Development


⭐ If you find this project interesting, consider giving it a star!

About

Enterprise-style AI support assistant powered by RAG, LangChain, ChromaDB, and conversational memory for accurate, context-aware responses.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages