Plastic Surgery AI Consultant
Industry
Healthcare
Client
therealpatients.org
Team
STARTER
Year
2024
We were hired to build an LLM-powered assistant that answers plastic surgery questions using curated medical literature, giving patients science-based information in plain language while staying locked to the domain and resisting manipulation attempts.

Challenge
The information landscape around plastic surgery is broken. Patients trying to make informed decisions are caught between medical literature they can't easily parse and a flood of marketing content, such as influencer promotions and misleading before-and-after photos, designed to sell procedures rather than inform. Some practitioners advertise qualifications they don't hold. Some patients receive no post-operative documentation, which makes it impossible to seek recourse when things go wrong.
The consequences are measurable. The NHS reports that treating complications from procedures performed abroad costs around £94 million per year, with cases rising 94% in three years. The real patients was built to address this gap and they needed a virtual assistant that could do what search engines and social media can't: provide clear, medically accurate answers grounded in peer-reviewed sources, without the noise.
The technical constraint was as important as the medical one. A healthcare-adjacent chatbot that drifts off-topic or can be manipulated into unreliable responses is worse than no chatbot at all. The system had to stay strictly within the plastic surgery domain and ground every answer in curated literature.
Approach
The build started with model selection. We evaluated GPTs, LLaMA, Falcon, Dolly, and Guanaco against a curated benchmark of 50 common plastic surgery questions and answers compiled from public and client-provided medical data. Each model was tested not just for accuracy but for its tendency to drift, hallucinate, or comply with off-topic prompts. The winner was the one that stayed most reliably on-domain.
For the knowledge base, we built an automated pipeline that ingests PDFs from trusted medical sources, strips out irrelevant sections like reference lists, and creates a structured index of retrievable content. Chunking and context sliding techniques keep the information that reaches the LLM concise and relevant: the system retrieves targeted passages rather than dumping entire documents into context. This pipeline runs continuously, so the knowledge base stays current as new literature is published.
Security testing was treated as a first-class requirement. We ran manual jailbreak attempts and adversarial prompt injection to ensure the assistant refuses off-topic queries and maintains consistent behavior under hostile inputs. For a tool that influences health decisions, reliability under edge cases matters as much as accuracy under normal use.
The final system was deployed as a Python/Flask API in Docker on Google Cloud Platform to integrate directly with the client's existing web interface.
Architecture/Backend
Docker Python/Flask API; automated PDF ingestion, indexing & context-aware RAG.
AI/ML models
LLMs (GPT/LLaMA/Falcon) fine-tuned on surgery Q&A; adversarial jailbreak testing.
Infrastructure/Deployment
Google Cloud Platform; Docker; direct integration with therealpatients.org web platform.
Key results
Built a domain-locked medical assistant that provides science-based plastic surgery answers grounded in curated literature, replacing the marketing-heavy information landscape patients were navigating on their own.
Automated knowledge base construction from trusted medical PDFs with continuous ingestion, ensuring responses reflect current literature rather than static training data.
Hardened the system against manipulation through systematic jailbreak testing and adversarial prompt evaluation, meeting the reliability standard required for a tool that influences healthcare decisions.
Delivered a scalable, cloud-hosted assistant integrated with the client's platform, giving patients a way to access clear medical information without parsing complex scientific literature themselves.



