top of page

Designing a Friendly, Accurate AI Chatbot

Reducing hallucinations, introducing name recognition, and upgrading to a smarter model.

Project Overview

I designed and developed a conversational AI chatbot to explore how UX design principles can make AI interactions more trustworthy, personal, and emotionally engaging.

Through several iterations, I improved accuracy, introduced dynamic name recognition, and upgraded to a stronger AI model (Mistral-7B).


Quick Stats:

     🎯 Focus: Personalization + Accuracy

     🛠️ Tools: Flask, Hugging Face Inference API, HTML, CSS, JS

     🔧 Upgraded: BlenderBot → Mistral-7B

     🕒 Timeline: 3 Weeks

What I Did

  • Designed and coded the chatbot interface using HTML, CSS, and JavaScript.

  • Built the backend using Flask and connected it to Hugging Face’s BlenderBot model.

  • Emphasized quick, clear user feedback — like loading animations and typing indicators.

The Problem

Early versions of the chatbot hallucinated answers and felt robotic.

    ❌ Incorrect or "made-up" AI responses

    ❌ Chatbot forgot the user's name

    ❌ Interface looked plain and unengaging

Major Iterations

Model Upgrade:
BlenderBot ➔ Mistral-7B

After testing BlenderBot, I realized the model was not instruction-tuned enough for friendly chats.
I upgraded to Mistral-7B-Instruct, using Hugging Face’s Inference API.

​​

Mistral followed prompts better ("Always call user    by name")

✅ Responses became less random, more human-like

✅ Reduced hallucinations and improved trust

BlenderBot: Name Hallucinations

Screenshot 2025-04-09 at 3.22.34 PM.png

Mistral - 7B: Improved responses

Screenshot 2025-04-09 at 3.21.36 PM.png

Final Design Features

✅ Personalized greetings (remembers user's name)
✅ Controlled, polite AI responses

✅ Forgiving of typographical errors
✅ Typing indicator animations
✅ Mobile-style chat layout with avatars
✅ Secure environment with hidden API keys

Key Learnings

  • Visual cues (like a "bot is typing" animation) are crucial for keeping users engaged.

  • Error handling in chatbots needs to be graceful — users expect conversations to feel human even when they fail.

  • Small design details (like avatar icons, response timing) significantly impact user trust and comfort.

bottom of page