NgosisCraft
My clinic bot
In this post, we share our experience in developing an AI Chat Bot with database search capabilities.

The Scenario
Our client required a chatbot capable of managing and scheduling appointments for the clinic's medical staff. With this chatbot, each doctor can seamlessly schedule patient appointments through a conversational interface and inquire about their own and their colleagues' schedules.
For patients, the chatbot provides an easy way to check their appointments. A key requirement was the chatbot’s ability to communicate with patients, including those with various visual impairments, offering them accessible support.
Patients can confirm, cancel, or request rescheduling through the chatbot while also receiving detailed appointment information.
Key Features Requested:
-
Doctor Schedule Management: The chatbot must interact with doctors, administrative staff, and patients.
-
Appointment Scheduling: Doctors should be able to create appointments effortlessly.
-
Real-time Appointment Status: Patients should be able to check their current appointment details.
-
Administrative Insights: The chatbot should provide high-level, aggregated scheduling information to the administration.
-
Conflict Resolution & Adjustments: The chatbot must detect scheduling conflicts and handle cancellations or rescheduling requests.
-
Voice Interaction: The chatbot should support both speech recognition and spoken responses.
This chatbot will streamline scheduling, improve accessibility, and enhance overall efficiency for the clinic.
The Solution
Our team developed a Chat-Bubble widget that seamlessly integrates with the company's existing web-based management tools. This Chat-Bubble serves as the interface for the AI-powered chatbot while also supporting a standalone mode—an essential feature for patient interaction use cases.
​
To enable efficient appointment management, we designed a comprehensive set of APIs that allow the chatbot to create, update, and delete appointments within the company’s existing database. Leveraging these APIs, the AI Assistant (powered by ChatGPT) can schedule appointments on behalf of users (e.g., doctors) while also retrieving and filtering appointment data. This enables the assistant to detect scheduling conflicts and provide valuable insights to the clinic’s administrative team.
​
All APIs were developed with the goal of implementing a Retrieval-augmented generation (RAG) model. Essentially, we equip the AI Assistant with function signatures it can invoke to fetch or generate relevant information, enhancing its ability to interact dynamically with the company’s data ecosystem.
​
Two separate AI Assistants were deployed on the OpenAI platform—one designed for clinic staff and another for patient interaction. This separation was necessary as each user group required a distinct communication style and different levels of access to information.
​
For instance, the patient-facing chatbot was restricted from responding to inquiries about other patients or doctors. It could only provide details related to the patient's own appointments, ensuring strict compliance with privacy and confidentiality standards. Additionally, its communication style was more conversational and less technical compared to the AI Assistant designed for doctors.
​
To enhance usability, text-to-speech (TTS) and speech-to-text (STT) capabilities were integrated, enabling voice interaction with the chatbot. This feature proved to be highly convenient for both doctors and patients. During a consultation, a doctor could simply say, "Please create an appointment for next Monday at 3:00 PM for patient X. We will be evaluating the impact of a specific medication…" The AI Assistant would then process this command, extract relevant details, and seamlessly schedule the appointment in the system—automatically including any additional notes provided by the doctor.
​​
By integrating AI-powered chatbots with both text and voice capabilities, we successfully enhanced the efficiency of appointment management while improving the user experience for both clinic staff and patients. The seamless integration with existing systems, the implementation of a Retrieval-Augmented Generation (RAG) model, and the careful distinction between different user roles ensured that the AI Assistants operated with precision, security, and usability in mind.
​
This solution not only streamlined administrative tasks but also empowered doctors to focus more on patient care, reducing time spent on manual scheduling. Meanwhile, patients benefited from a more accessible and responsive interaction with the clinic. As AI continues to evolve, this project serves as a foundation for further enhancements, such as expanding the chatbot’s capabilities to include medical reminders, prescription management, and deeper insights for healthcare professionals.
​
With this innovative AI integration, the clinic is now better equipped to provide a modern, efficient, and patient-centric healthcare experience.