Moiz Ali
Tetovo Available for projects
RUN #006Building since 2026Phase 2 shipped · live text demo · voice, admin UI and eval next

Balkan AI Receptionist

A multilingual AI receptionist for a dental clinic's WhatsApp and phone, where FAQs are answered only from the clinic's own knowledge base and double booking is blocked by the database, not just the prompt.

Client
Own product · AI receptionist for small businesses in North Macedonia and the Balkans
Role
Design · build · ship the live demo
Timeline
In progress
Stack
Python · FastAPI · Gemini · Postgres · Redis
Status
Building

01 — The system

6 nodes · 5 edges

02 — Results

Measured over Phase 2 + the public demo
4languages for the opening disclosure and emergency line
7agent tools, each argument checked in code first
1database constraint that blocks a double booking
2/5build phases shipped; voice is an open PR, admin UI and eval are next

03 — The problem

Small clinics in North Macedonia answer their phone and WhatsApp by hand, in whichever of four languages a caller happens to use, and a missed call during a treatment is a missed booking. I wanted a receptionist a dental clinic could trust with its FAQs and its calendar without it ever inventing a price or a policy, in Macedonian, Albanian, Serbian or English.

04 — Decisions & tradeoffs

  • The model decides, code validates. The LLM never writes to the database; a tool call is checked (dates in the future, inside opening hours, no double booking, phone format) before anything executes, and only the validated code path touches Postgres.
  • Grounded-only FAQ answers. The agent answers from the clinic's own knowledge base, injected into the prompt. A missing topic becomes a message for the owner, not a guess.
  • Disclosure at the start, in the caller's language. Every conversation opens by stating it's an AI assistant and that the conversation may be recorded — for EU AI Act transparency and GDPR's recording notice. The production system prompt has that line written out in all four languages.
  • Handoff triggers are code rules, not the model's self-confidence. A medical emergency, an angry caller, two failed tool validations in a row, or a knowledge-base miss asked twice all go straight to a human handoff, and the code-level check runs before the model is even asked.
  • Double booking is blocked by the database, not only the prompt. bookings has a Postgres exclusion constraint on business + staff + time range, so an overlapping confirmed booking for the same staff cannot be inserted, independent of whatever the model decides to do.
  • Multi-tenant from day one. Every table carries a business ID, so a second clinic is a new row, not a new deployment.
  • Replayable runs. Every turn stores the prompt version, model, knowledge-base hash and tool I/O, so a conversation can be replayed later and diffed against a new prompt or model.
  • A public demo gets its own guardrails, not the product's. The live demo wraps the same engine in demo-only rules: a shared secret between the portfolio and the backend, per-IP and global rate limits sized to Gemini's free tier, phone numbers faked and contact details redacted before anything is logged, and every conversation purged within the hour.

05 — What's hard / risks

  • WhatsApp Business Cloud API verification with Meta can take days, and replies outside the 24-hour window need pre-approved templates — this needs to start early, before the real WhatsApp webhook can replace the 501 stub.
  • Local Twilio numbers may not be available in North Macedonia; the likely workaround is a foreign number with call forwarding from the clinic's own line.
  • Macedonian and Albanian speech recognition quality is unmeasured — Phase 3 (voice) will measure it, not assume it.
  • Keyword-based emergency detection is a safety net, not a guarantee; the keyword list and the clinic's emergency number still need a clinic-side review.

06 — What's shipped

Phase 2 — the conversation loop, the seven agent tools, argument validation and replayable logging — is done, running against a fictional demo clinic. The real WhatsApp webhook is still a 501 stub pending Meta's business verification; what's live today is a public, rate-limited, privacy-scrubbed demo of the same engine, try it here, running on Gemini's free tier with no real clinic, phone number, or persistent data behind it.

07 — What's next

  • Phase 3 — Voice (open PR). Twilio for calls, ElevenLabs for speech-to-text and text-to-speech.
  • Phase 4 — Admin UI. A Next.js + TypeScript app for editing the knowledge base, managing bookings and reading transcripts.
  • Phase 5 — Evaluation. 20 scripted conversations across the four languages, scored by an eval script.
Next run · RUN #003Cold outreach agent