AI Customer Service Agent

Lead AI Engineer2024 Q2

Key Results

📈
90%
query resolution rate** without human intervention...

🛠️ Technology Stack

Google ADK
Cloud SQL
Vertex AI
MySQL

Overview

Betty Bird Boutique AI Customer Service Agent is an intelligent conversational AI system built for a pet store using Google's Agent Development Kit (ADK). The agent provides comprehensive customer support by integrating multiple data sources including product databases, document search capabilities, and web search functionality. The system handles diverse customer queries about store information, products, and bird care with robust error handling and session management.

Problem Statement

Pet stores face challenges with customer service:

  • High volume of repetitive questions about products, care, and store information
  • Need for accurate product availability and pricing information
  • Requirement for reliable bird care advice from trusted sources
  • Difficulty maintaining consistent service quality across channels

Solution

Built a production-ready AI customer service agent featuring:

  • Google Agent Development Kit (ADK): Modern framework for building conversational agents
  • Cloud SQL MySQL Integration: Real-time product database queries
  • Vertex AI Search: Document search across PDF knowledge base
  • Google Search Integration: Web search for up-to-date information
  • Comprehensive Error Handling: Graceful failure management and recovery
  • Session Management: Maintains context across conversation turns
  • Guardrails: Ensures safe, appropriate responses

Technical Details

Architecture

The agent follows a tool-based architecture:

  1. Conversation Handler:

    • Manages user interactions and session state
    • Routes queries to appropriate tools
    • Synthesizes responses from multiple sources
  2. Product Database Tool:

    • Connects to Cloud SQL MySQL database
    • Queries product availability, pricing, and specifications
    • Returns structured product information
  3. Document Search Tool:

    • Leverages Vertex AI Search for PDF document retrieval
    • Provides accurate bird care information from curated sources
    • Ensures information quality and reliability
  4. Web Search Tool:

    • Uses Google Search API for current information
    • Fetches latest bird care trends and news
    • Complements database and document knowledge

Key Technologies

  • Google Agent Development Kit (ADK): Provides framework for building production agents
  • Cloud SQL MySQL: Hosts product catalog and inventory data
  • Vertex AI Search: Enables semantic search across PDF documents
  • Google Search API: Provides real-time web information access

Error Handling & Guardrails

Error Handling:

  • Database connection failures gracefully handled with fallback responses
  • API timeouts trigger retry logic with exponential backoff
  • Invalid queries return helpful error messages

Guardrails:

  • Response validation ensures appropriate content
  • Safety filters prevent harmful or inappropriate information
  • Rate limiting prevents abuse

Session Management:

  • Maintains conversation context across multiple turns
  • Tracks user preferences and history
  • Enables personalized recommendations

Challenges & Resolutions

Challenge: Integrating multiple data sources with different response formats
Resolution: Built unified response synthesizer that normalizes data from all sources

Challenge: Ensuring accurate product information from database
Resolution: Implemented caching layer and query optimization for fast responses

Challenge: Balancing document search relevance with speed
Resolution: Configured Vertex AI Search with appropriate ranking parameters

Challenge: Handling ambiguous customer queries
Resolution: Implemented clarification logic with follow-up questions

Results

  • 90% query resolution rate without human intervention
  • Average response time under 2 seconds for product queries
  • High customer satisfaction with accurate, helpful responses
  • Successfully deployed to production serving Betty Bird Boutique customers
  • Comprehensive deployment checklist ensures reliable resource management

Learnings

This project showcased the power of Google's Agent Development Kit for building production-ready conversational AI systems. The integration of multiple data sources (database, documents, web) demonstrated how to create comprehensive knowledge systems. The emphasis on error handling and guardrails proved critical for maintaining system reliability in production environments. The modular tool-based architecture made it easy to add new capabilities and maintain the system over time.