GroveAI
Examples

AI Chatbot Examples

Real-world AI chatbot implementations across industries, from simple FAQ bots to sophisticated multi-turn conversational agents with tool use and memory.

Customer Support Chatbot with Escalation Logic

intermediate

A chatbot that handles tier-1 support queries using a knowledge base of FAQs and product documentation. When confidence drops below a threshold or the customer expresses frustration, it seamlessly hands off to a human agent with full conversation context.

// Escalation logic pseudocode
async function handleMessage(message, context) {
  const intent = await classifyIntent(message);
  const confidence = intent.confidence;
  const sentiment = await analyseSentiment(message);

  if (confidence < 0.6 || sentiment.score < -0.5 || context.turnCount > 5) {
    return escalateToHuman(context);
  }

  const response = await generateResponse(intent, context.knowledgeBase);
  return { reply: response, escalate: false };
}

Key takeaway: Effective escalation logic is more important than raw accuracy — customers forgive AI mistakes but not being trapped in a loop.

Internal IT Helpdesk Bot

intermediate

An AI assistant integrated with ServiceNow that helps employees reset passwords, check ticket status, and troubleshoot common issues. Uses RAG over internal documentation to answer policy questions.

// Tool-use pattern for IT helpdesk
const tools = [
  { name: "resetPassword", params: ["employeeId"] },
  { name: "checkTicketStatus", params: ["ticketId"] },
  { name: "createTicket", params: ["category", "description", "priority"] },
  { name: "searchKnowledgeBase", params: ["query"] },
];

// The LLM decides which tool to invoke based on user intent
const toolCall = await llm.chat({
  messages: conversationHistory,
  tools: tools,
  systemPrompt: "You are an IT helpdesk assistant..."
});

Key takeaway: Internal bots see higher adoption when they can actually perform actions (password resets, ticket creation) rather than just answering questions.

Lead Qualification Chatbot for B2B SaaS

beginner

A website chatbot that engages visitors, qualifies them against BANT criteria (Budget, Authority, Need, Timeline), and books meetings for sales reps. Integrates with CRM to log interactions and scoring.

// BANT qualification flow
const qualificationCriteria = {
  budget: { question: "What budget range are you considering?", weight: 0.3 },
  authority: { question: "Who else is involved in this decision?", weight: 0.25 },
  need: { question: "What problem are you trying to solve?", weight: 0.25 },
  timeline: { question: "When are you looking to implement?", weight: 0.2 },
};

function calculateLeadScore(responses) {
  return Object.entries(responses).reduce((score, [key, value]) => {
    return score + (qualificationCriteria[key].weight * value.score);
  }, 0);
}

Key takeaway: Conversational qualification outperforms static forms — companies report 3x more qualified leads when replacing forms with AI chat.

Multi-Lingual Support Bot with Translation Layer

advanced

A chatbot serving customers across 12 languages by detecting the input language, translating to English for processing, generating a response, then translating back. Uses a single English knowledge base to avoid maintaining parallel content.

// Multi-lingual pipeline
async function processMultiLingual(message) {
  const detectedLang = await detectLanguage(message);

  // Translate to canonical language for processing
  const englishMessage = detectedLang !== "en"
    ? await translate(message, detectedLang, "en")
    : message;

  // Process against English knowledge base
  const response = await generateResponse(englishMessage);

  // Translate response back to user's language
  return detectedLang !== "en"
    ? await translate(response, "en", detectedLang)
    : response;
}

Key takeaway: A translate-process-translate pipeline with one canonical knowledge base scales better than maintaining separate knowledge bases per language.

Voice-Enabled AI Receptionist

advanced

A phone-based AI receptionist using speech-to-text and text-to-speech that answers calls, routes enquiries, takes messages, and schedules appointments. Handles interruptions and unclear speech gracefully.

// Voice bot conversation loop
async function voiceConversationLoop(callSession) {
  while (callSession.active) {
    const audio = await callSession.listenForSpeech({
      silenceTimeout: 3000,
      maxDuration: 30000
    });
    const transcript = await speechToText(audio);

    if (!transcript || transcript.confidence < 0.4) {
      await callSession.speak("Sorry, I didn't catch that. Could you repeat?");
      continue;
    }

    const response = await processIntent(transcript.text);
    await callSession.speak(response.text, { voice: "professional-female" });

    if (response.action === "transfer") {
      await callSession.transferTo(response.department);
    }
  }
}

Key takeaway: Voice bots need to handle silence, background noise, and partial utterances — the conversation design is more important than the AI model choice.

E-Commerce Product Recommendation Chatbot

intermediate

A shopping assistant that asks about preferences, budget, and use case, then recommends products from the catalogue. Uses embeddings to match natural language descriptions to product attributes and handles comparison queries.

// Product recommendation with embeddings
async function recommendProducts(userPreferences) {
  const prefEmbedding = await embed(userPreferences.description);

  const candidates = await vectorStore.similaritySearch(prefEmbedding, {
    filter: { priceRange: userPreferences.budget },
    topK: 10,
  });

  // Re-rank with LLM considering full context
  const ranked = await llm.chat({
    messages: [{
      role: "system",
      content: "Rank these products for the customer. Consider their stated preferences, budget, and use case."
    }, {
      role: "user",
      content: JSON.stringify({ preferences: userPreferences, candidates })
    }]
  });

  return ranked.top3;
}

Key takeaway: Combining collaborative filtering with LLM-driven conversation produces better recommendations than either approach alone.

Patterns

Key patterns to follow

  • Effective chatbots combine retrieval (knowledge bases) with generation (LLMs) rather than relying on either alone
  • Escalation paths to humans are critical — define clear triggers based on confidence, sentiment, and conversation length
  • Tool use and action execution dramatically increase chatbot value beyond simple Q&A
  • Start with a narrow domain and expand — broad chatbots underperform focused ones

FAQ

Frequently asked questions

It depends on your requirements. For simple FAQ bots, smaller models like GPT-4o-mini or Claude Haiku work well and are cost-effective. For complex multi-turn conversations requiring reasoning, Claude Sonnet or GPT-4o provide better results. Always prototype with multiple models before committing.

Ground responses in retrieved documents (RAG), add confidence thresholds that trigger escalation, implement fact-checking against your knowledge base, and use system prompts that instruct the model to say 'I don't know' when uncertain.

Costs vary widely. A basic chatbot handling 1,000 conversations per day with a mid-tier model typically costs £200-500/month in API fees. Add infrastructure, monitoring, and maintenance for total cost. Many businesses see ROI within 3 months through reduced support staff workload.

Buy if you need quick deployment and standard features. Build if you need deep integration with internal systems, custom conversation flows, or handle sensitive data that cannot leave your infrastructure. Most mid-market companies benefit from a hybrid approach — using a platform with custom integrations.

Track resolution rate (issues solved without human help), customer satisfaction scores (CSAT), average handling time, escalation rate, and cost per conversation. Compare these against your pre-chatbot baselines to measure real impact.

Need custom AI implementation?

Our team can help you build production-ready AI solutions. Book a free strategy call.