Skip to content

smiller-comet/customer-support-agent-chatbot

Repository files navigation

Ohm Sweet Ohm Customer Support Agent

A chatbot agent that answers customer questions about Ohm Sweet Ohm, a tech retail company. The agent uses LLM-based intent classification and routes queries to appropriate tools to answer questions about:

  • Order status and location
  • Product pricing
  • Product stock at stores
  • Store hours and locations
  • Return policies and FAQs

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your OpenAI API key (required for intent classification):
export OPENAI_API_KEY="your-api-key-here"

Or create a .env file:

OPENAI_API_KEY=your-api-key-here
  1. Run the agent:
python agent.py

Features

  • LLM-Based Intent Classification: Uses OpenAI with examples to classify customer queries into 8 categories
  • Tool-Based Architecture: Each intent routes to a specific tool:
    • order_status → Order lookup tool
    • product_price → Product information tool
    • product_stock → Store inventory tool
    • store_hours → Store information tool
    • store_location → Store information tool
    • return_policy, shipping_info, general_faq → FAQ RAG tool
  • RAG System: FAQ tool uses retrieval-augmented generation for policy questions

Example Queries

Try asking questions like:

  • "Where is my order TECH-001?"
  • "How much does the NexusWave Pro Headphones cost?"
  • "Do you have PulseSync Fitness Tracker in stock at the downtown location?"
  • "What are your store hours?"
  • "What is your return policy?"
  • "How much does shipping cost?"
  • "Where is your Union Square store?"

Data

The system uses fake data stored in:

  • data/orders.json - Customer orders (TECH-001 through TECH-012)
  • data/products.json - Product catalog (10 products with creative names)
  • data/stores.json - Store locations and hours (5 locations in San Francisco)
  • data/faq.txt - FAQ document for RAG

Architecture

The agent works by:

  1. Intent Classification: Uses LLM with examples to classify the customer query into one of 8 intent categories
  2. Tool Routing: Routes to the appropriate tool based on intent
  3. Tool Execution: Each tool queries the relevant data source and formats the response
  4. Response Generation: Returns the formatted answer to the customer

Tools

  • Order Lookup Tool: Queries orders database by order ID
  • Product Information Tool: Gets product details and pricing
  • Store Inventory Tool: Checks product availability at stores
  • Store Information Tool: Provides store hours and locations
  • FAQ RAG Tool: Uses retrieval-augmented generation to answer policy questions

Company Information

Ohm Sweet Ohm is a tech retail company with 5 locations in San Francisco:

  • Ohm Sweet Ohm Downtown (123 Market Street)
  • Ohm Sweet Ohm Union Square (456 Geary Street)
  • Ohm Sweet Ohm Mission District (789 Valencia Street)
  • Ohm Sweet Ohm Marina (321 Chestnut Street)
  • Ohm Sweet Ohm SoMa (555 Folsom Street)

About

Customer support agent chatbot used in a hands-on workshop for Opik enablement

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages