Project overview
TrustMed AI is a case study in building an AI assistant for a domain where accuracy, tone, boundaries, and citations matter as much as the chat experience.
The goal was to design a product-shaped system around retrieval, answer verification, escalation language, and a user interface that makes uncertainty visible.
The product problem
People often ask health questions in moments of stress, but generic chatbot answers can overstate confidence, hide sources, or fail to explain what the user should do next.
The product challenge was to create a useful information assistant while keeping the experience conservative, transparent, and clearly scoped.
Solution direction
The system combines a conversational API, retrieval pipeline, response guardrails, and citation-first answer formatting.
Instead of optimizing for long generated responses, the interaction model prioritizes grounded summaries, source visibility, and safe handoff language for higher-risk questions.
What I owned
- ›Designed the end-to-end assistant flow from intake to answer generation.
- ›Structured backend boundaries for retrieval, response generation, citation formatting, and safety checks.
- ›Built frontend patterns for displaying answer confidence, sources, and follow-up actions.
- ›Explored guardrail prompts and refusal paths for sensitive medical scenarios.
Feature system
Guardrailed response flow
Routes health questions through conservative answer rules, escalation language, and source-aware formatting.
Retrieval-first answers
Keeps generated responses tied to source material instead of relying on model memory alone.
Citation visibility
Surfaces supporting references as part of the answer experience, not as an afterthought.
Product-ready UI states
Handles loading, empty, uncertain, and safety-sensitive states with clear user-facing language.
How the system fits together
const answer = await assistant.respond({
question,
context: await retrieveTrustedSources(question),
guardrails: ["medical_scope", "cite_sources", "escalate_risk"],
});Engineering decisions
Avoiding unsafe certainty
decision.01Answer templates were designed to qualify uncertainty and recommend professional care when risk signals appear.
The assistant feels useful without presenting itself as a doctor.
Keeping citations connected
decision.02The architecture treats citations as structured output tied to retrieved context.
The UI can display sources consistently instead of scraping them from text.
Where the project stands
The project is currently presented as a public case study with private source code.
The strongest learning was that responsible AI work is mostly product design, system design, and constraint design before it is model selection.
