WhatsApp enquiry automation
Students message a tutoring academy on WhatsApp at all hours about courses, fees and enrolment. An assistant now answers them, so the academy's staff only see the conversations that need a person.
- Where
- Teaching Circle, contract, remote
- When
- April to July 2026
- Built with
- Python, LangChain, OpenAI GPT-4 and GPT-5.1 mini, WhatsApp Cloud API, PostgreSQL, Docker
- Code
- Client work, private
The problem
Teaching Circle, a physics tutoring academy, was answering every WhatsApp enquiry by hand: timings, fees, payment confirmations, how to enrol. At more than 100 messages a day that took two to three people, and replies slowed down exactly when demand peaked.
Data
Two inputs: free-text WhatsApp messages, which are short and informal, and structured form submissions from students registering interest. A form submission arrives by webhook and starts the conversation.
Architecture
- Webhook ingestionWhatsApp messages and form submissions arrive by webhook and are queued for workers.
- Classify the enquiryCourse details, payments or enrolment, so each type gets the right handling.
- Draft the replyLangChain orchestrates OpenAI's GPT-4 and GPT-5.1 mini to answer from the academy's own information.
- Workers per conversationWorkers scale out while keeping each student's session separate, so concurrent chats never cross.
- Log everythingConversations are logged to PostgreSQL for review.
Results
| Measure | Result |
|---|---|
| Enquiries handled | 100+ a day |
| Classification accuracy | 95%+ across 100+ tests |
| Manual response work | down 80% |
| Support staff needed | 2–3 people replaced |
| Recorded outages | none |
Where it breaks
- The 95% figure comes from the automated test suite, not from a labelled sample of live traffic. Real messages drift, and the suite has to keep up with them.
- One enquiry in twenty misclassified matters most for payments, where a wrong answer costs trust.
- Answers are only as current as the course and fee information the assistant is given. When the academy changes a fee, that source has to change the same day.
- WhatsApp only allows free-form replies within 24 hours of a student's last message. Anything later needs a pre-approved template.
Next case study: Driver drowsiness detection