Project Name: Chatbot Sahbi 💡 Inspiration The inspiration for Chatbot Sahbi came from observing the daily workflow at the Gastroenterology department of the Mahmoud El Matri University Hospital in Ariana.
We identified a "Triad of Inefficiency" that affects both staff and patients:
The Intake Bottleneck: Doctors spend the first 10–15 minutes of every consultation asking the same basic questions (surgical history, current symptoms, allergies), leaving less time for actual diagnosis and care.
The Patient Confusion: Patients often crowd the emergency room for minor issues because they don't know if they need an urgent intervention or a standard appointment. Furthermore, they frequently arrive without the correct administrative paperwork, leading to frustration and delays.
The Handoff Gap: Valuable clinical details are often lost when doctors change shifts or discuss complex cases informally in the hallways.
We built "Sahbi" (Tunisian for "My Friend") to be the connective digital tissue between the patient's home and the doctor's office.
💻 What it does Sahbi is a comprehensive ecosystem powered by Gemini 3 Pro that serves three distinct functions:
Smart Pre-Consultation (For the Doctor) Before the patient even enters the consultation room, Sahbi interviews them. It collects their name, surgical history, and current complaints. It then processes this raw data to generate a structured medical observation, giving the doctor a concise summary instantly before they even say "Hello."
The Triage & Admin Companion (For the Patient) A chatbot that speaks fluent Tunisian Derja. It helps patients by:
Triage: Deciding whether their described symptoms require an immediate visit to the Urgencies or if they should book a standard appointment.
Admin Guide: Listing exactly which papers are needed for registration, reducing administrative rejection rates.
Stress Reduction: Using empathetic language to calm patient anxiety regarding hospital procedures.
- Doctor-to-Doctor Voice Link (Collaborative) A Speech-to-Text feature that allows doctors to record voice notes about common patients. The system transcribes and summarizes these discussions into a shared history log, ensuring no detail is missed during shift changes.
⚙️ How we built it We bypassed complex custom NLP training by leveraging Google AI Studio and the Gemini 3 Pro API.
The "Derja" Reasoning Engine: We used Gemini 3 Pro as our primary reasoning engine. Its multilingual capabilities allowed us to handle the Tunisian dialect naturally. We didn't need to hard-code dialect rules; we simply prompted the model to act as a compassionate, medically-aware Tunisian assistant.
Medical Observation Generation: We designed a specific prompt chain in Google AI Studio. The API takes the raw patient answers (often messy and colloquial) and restructures them into standard medical observation formats (Subjective, Objective, Assessment).
Voice Processing: We utilized Speech-to-Text to capture doctor conversations, which are then passed to Gemini to extract key clinical entities (medications, urgencies) and store them.
🚧 Challenges we faced The "Urgency" Threshold: Defining the logic for when the bot tells a patient "Go to the ER" vs "Make an appointment" was critical. We had to carefully prompt-engineer the Gemini model to err on the side of caution (safety first) while still being useful.
Structured vs. Unstructured Data: Transforming a casual conversation in Tunisian dialect into a formal medical observation required extensive testing in Google AI Studio to ensure the medical terminology was accurate and professional.
Audio Quality: Handling background noise in doctor voice notes while maintaining high transcription accuracy for specific medical terms.
🧠 What we learned Prompting is Programming: We learned that with Gemini 3 Pro, the "code" is often the prompt itself. Crafting the right system instructions in Google AI Studio was more effective and faster than writing hundreds of lines of Python logic.
The Value of Pre-Work: We realized that saving a doctor just 5 minutes per patient adds up to hours of extra care capacity per day for the hospital.
Dialect is Accessibility: Making technology speak the local language isn't just a "nice to have"—it's the only way to make healthcare accessible to the elderly and rural populations.
🚀 What's next for Chatbot Sahbi EHR Integration: Pushing the generated medical observations directly into the hospital's database system.
Multi-Specialty Support: Expanding the pre-consultation questions to cover Cardiology and Pneumology.
WhatsApp Integration: Moving the patient-facing interface to WhatsApp Business API for even easier access.
Log in or sign up for Devpost to join the conversation.