Skip to content

Bug: Pet Clinic Agent is outputting products that we currently don't have or it does not exist #238

@liustve

Description

@liustve

Hi @awsapm can you look into this?

🚨 ROOT CAUSE ANALYSIS: Pet Clinic Chatbot Recommending Non-Existent Products

CRITICAL FINDINGS:

  1. NUTRITION SERVICE DATA GAPS (HIGH SEVERITY)
    Issue: The nutrition service backend has incomplete pet data coverage
    Evidence:
    • GET /nutrition/rabbit returns 404 Not Found (statusCode: 404)
    • Nutrition agent logs show: "Error: Nutrition service could not find information for pet: rabbit"
    • Similar errors for birds and other pet types

  2. AI AGENT HALLUCINATION (HIGH SEVERITY)
    Issue: When the nutrition service fails, the AI agents fabricate product recommendations
    Evidence:
    • Agent recommends "AvianVital Mineral Supplement", "ScaleStrong Calcium Boost", "ReptileVitality D3 Formula"
    • Agent recommends "HoppyHerb Rabbit Pellets", "RabbitVital Wellness Drops"
    These products don't exist in your actual inventory

  3. SYSTEM ARCHITECTURE PROBLEM (HIGH SEVERITY)
    Issue: Poor error handling between services causes AI hallucination
    Evidence:
    • 12.50% fault rate in nutrition_agent.DEFAULT
    • 185 error occurrences detected in logs
    • KeyError exceptions in agent processing

OPERATIONAL RECOMMENDATIONS:

IMMEDIATE ACTIONS (Fix Today):

  1. Update Nutrition Service Database
    • Add missing pet type data for: rabbit, birds, and other missing animals
    • Ensure all pet types your clinic serves have corresponding nutrition data
    • Verify database completeness against your actual service offerings

  2. Implement Proper Error Handling
    • Configure agents to respond with "I don't have that information available" instead of fabricating products
    • Add validation to prevent product recommendations when data is unavailable
    • Implement fallback responses that direct customers to speak with veterinarians

  3. Agent Configuration Adjustment
    • Update agent prompts to be more conservative when data is missing
    • Remove or modify the instruction to "always recommend specific product names"
    • Add explicit instructions to not fabricate product information

MONITORING IMPROVEMENTS:

  1. Set Up SLO Monitoring
    • Create SLOs for nutrition service availability (target: >99%)
    • Monitor agent error rates (target: <1%)
    • Set up alerts for 404 responses from nutrition service

  2. Enhanced Logging
    • Add structured logging for product recommendations
    • Track when agents fall back to generic responses
    • Monitor customer satisfaction with chatbot responses

INFRASTRUCTURE OPTIMIZATIONS:

  1. Service Reliability
    • Address the 95ms latency spikes in nutrition service
    • Optimize MongoDB queries (currently showing 28ms query times)
    • Consider caching frequently requested pet nutrition data

  2. Agent Performance
    • Reduce the 84-second latency in pet clinic agent calls
    • Optimize the agent-to-agent communication path
    • Consider implementing circuit breakers for failed service calls

VERIFICATION STEPS:

  1. Test Coverage: Verify nutrition data exists for all pet types your clinic serves
  2. Agent Testing: Test chatbot responses for edge cases and missing data scenarios
  3. Product Validation: Ensure all recommended products actually exist in your inventory
  4. Customer Communication: Consider notifying recent customers who received incorrect product recommendations

This issue is causing customer confusion and potentially lost sales. The immediate priority should be fixing the data gaps and preventing AI hallucination of non-existent
products.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions