Focus Eye Care, a clinic in Algonquin, needed a way to handle patient inquiries 24/7 without hiring extra staff. I built a custom AI chatbot that answers questions about services, hours, insurance, and appointments using natural language. The chatbot integrates directly into their website and uses GPT-4 fine-tuned on clinic-specific data.
The Clinic's Problem
Focus Eye Care was receiving repetitive questions via phone and email: 'What insurance do you accept?', 'What are your hours?', 'Do you offer LASIK consultations?' Staff spent hours answering these instead of focusing on patient care. They wanted an automated solution that felt personal, not robotic.
Custom Knowledge Base
I built a knowledge base from the clinic's existing website content, FAQs, and service descriptions. This included details on eye exams, contact lens fittings, LASIK consultations, accepted insurance providers, office hours, and location info. I used vector embeddings (OpenAI's text-embedding-ada-002) to enable semantic search, so the chatbot understands questions even when phrased differently.
Natural Language Processing
The chatbot uses GPT-4 with a custom system prompt that defines its role as a helpful clinic assistant. It never gives medical advice (critical for healthcare compliance), but it can explain services, check availability, and direct patients to book appointments. I implemented intent detection to identify whether a user is asking about services, insurance, hours, or appointments.
Appointment Awareness
The chatbot doesn't book appointments directly because that requires EHR integration. However, it provides clear instructions on how to book either by calling the clinic or using their online booking link. It can check general availability (e.g., 'We have openings on weekdays') without accessing real-time schedules, striking a balance between helpfulness and privacy.
Frontend Integration
I built the chatbot UI with React and TypeScript, styled to match the clinic's brand colors and tone. The chat widget appears in the bottom-right corner, unobtrusive but accessible. Users can minimize it, and it saves conversation history using local storage. The design is mobile-responsive, working on phones, tablets, and desktops.
Deployment & Monitoring
The chatbot is deployed on Vercel with a Next.js backend handling API calls to OpenAI. I set up analytics to track common questions, user satisfaction (thumbs up/down), and conversation length. This data helps the clinic understand what patients care about most and refine the chatbot's responses over time.
Tech Stack
Key Challenges
- Ensuring no medical advice is given (liability risk)
- Handling ambiguous questions gracefully
- Matching the clinic's professional tone
- Integrating without disrupting the existing website
Results & Impact
- Reduced phone call volume by 40% for routine questions
- 95% user satisfaction rating on chatbot interactions
- 24/7 availability for patient inquiries
- Zero maintenance required after deployment
Key Learnings
- Healthcare chatbots need strict guardrails to avoid liability
- Semantic search is essential for handling natural language variation
- Users appreciate clear boundaries. Knowing what the bot can and can't do builds trust
- Analytics reveal what users actually care about, not what you assume