KAIU Natural Living’s AI chatbot provides 24/7 customer support via WhatsApp using Claude AI (Anthropic). The system handles product inquiries, provides recommendations, and seamlessly transfers to human agents when needed.
Claude AI has access to two tools for real-time data:
searchInventory
Product Database SearchQueries the live product inventory:
{ name: "searchInventory", description: "Busca en el inventario actual de KAIU para responder sobre precios, disponibilidad y variantes. ÚSALA SIEMPRE que el cliente pregunte por un producto.", input_schema: { type: "object", properties: { query: { type: "string", description: "Nombre del producto o ingrediente (Ej: 'Lavanda', 'Gotero 10ml')" } }, required: ["query"] }}
Tool returns only active products with available stock information, ensuring AI never recommends unavailable items.
searchKnowledgeBase
Policy & Information SearchSearches company policies, shipping times, and general information:
{ name: "searchKnowledgeBase", description: "Busca manuales de la empresa, tiempos de envío, costos de envío a ciudades, y políticas generales de la marca.", input_schema: { type: "object", properties: { query: { type: "string", description: "Pregunta o concepto (Ej: 'Tiempos de envío Bogotá', 'Manejan contra entrega')" } }, required: ["query"] }}
Currently disabled due to memory constraints on free-tier hosting. Returns placeholder response instructing handover to human agent for policy questions.
Multiple safeguards prevent the AI from making up information:
1
Forced Tool Calls
When customers ask for photos, system injects instruction:
if (/(foto|imagen|ver|mostrar)/i.test(userQuestion)) { userQuestion += "\n[SISTEMA: Obligatorio ejecutar searchInventory " + "para obtener IDs reales (UUID). NO inventes IDs.]";}
2
Short Context Window
History limited to last 4 messages to force fresh database queries:
const recentHistory = chatHistory.slice(-4);
Prevents AI from relying on outdated information from earlier in conversation.
3
Strict Prompting
System prompt explicitly forbids making up data:
“ESTRICTAMENTE PROHIBIDO ADIVINAR O ALUCINAR DATOS. NUNCA respondas sobre la existencia, precios, variantes o imágenes de un producto basándote en tu memoria.”
Customer: Hola, tienen aceite de lavanda?AI: (calls searchInventory with query “lavanda”)AI: ¡Hola! Sí, manejamos Aceite Esencial de Lavanda en estas presentaciones:
10ml - $45.000
30ml - $120.000
50ml - $180.000
¿Cuál te gustaría?🤖 Asistente Virtual KAIU
Customer: El de 30ml está disponible?AI: (calls searchInventory with query “lavanda 30ml”)AI: Sí, el Aceite Esencial de Lavanda de 30ml está disponible por $120.000. ¿Te gustaría hacer el pedido?🤖 Asistente Virtual KAIU
Customer: Mándame foto del productoAI: (system injects forced tool call)AI: (calls searchInventory to get UUID)AI: Aquí está la foto del Aceite Esencial de Lavanda 30ml. [SEND_IMAGE: a1b2c3d4-…]System: (sends WhatsApp image message)Customer: (receives product photo)🤖 Asistente Virtual KAIU
Customer: Necesito hablar con una personaAI: (detects keyword “persona”)AI: Te estoy transfiriendo con un asesor humano. Un momento por favor.System: (disables bot, alerts dashboard)Human Agent: Hola, ¿en qué puedo ayudarte?