Engineers at UC San Diego have created a new kind of medical chatbot that walks people through their symptoms using trusted doctor-designed flowcharts. The AI tool aims to cut unnecessary ER visits, speed care for serious cases and give health systems more control over the advice patients receive.
A new kind of medical chatbot could soon help people decide what to do about worrying symptoms — and do it using the same step-by-step logic doctors rely on, rather than whatever happens to float to the top of a web search.
Engineers at the University of California San Diego and collaborators have built an artificial intelligence-powered self-triage system that talks with users in everyday language while quietly following trusted medical flowcharts in the background. The work, published in Nature Health, points to a future where people can get clearer, safer guidance at home about whether to watch and wait, book a clinic visit or head straight to the emergency room.
Self-triage is something most people already do, often by typing symptoms into a search engine or using generic chatbots. But those tools can be overwhelming, impersonal or based on unverified information, which can push people either to rush to the ER when they do not need to, or to delay care when they actually do.
The new system takes a different approach. Instead of letting a large language model improvise answers, the chatbot is trained on 100 step-by-step medical flowcharts developed by the American Medical Association. These flowcharts, also called protocols or algorithms, are the same kinds of decision trees clinicians use to assess common symptoms.
The design gives health systems a way to shape what patients see, according to senior author Edward Wang, a professor in the Department of Electrical and Computer Engineering at the UC San Diego Jacobs School of Engineering and the Design Lab.
“It can be further adapted to accommodate provider-specific protocols, which gives healthcare organizations full control over the clinical logic their patients encounter,” Wang said in a news release.
First author Yujia (Nancy) Liu, an electrical and computer engineering doctoral student at the UC San Diego Jacobs School of Engineering, explained that the flowcharts are not just a reference — they are the backbone of every conversation.
“Our system uses these flowcharts to ground the conversation with the patient,” Liu said in the news release.
Here is how it works.
Imagine a 35-year-old with abdominal pain opening the chatbot. Behind the scenes, three specialized AI agents collaborate to guide the exchange.
Based on the user’s first description of their symptoms, the first agent figures out what general problem is being described and selects the most appropriate medical flowchart, taking into account details such as age and sex. That choice determines the overall path the conversation will follow.
The chatbot then begins asking questions drawn from that flowchart. The second AI agent interprets the user’s replies and decides which branch of the flowchart to follow next. Crucially, it is designed to handle natural, messy language instead of just “yes” or “no” answers, so people can describe what they are feeling in their own words.
The third agent focuses on translation — not between languages, but between clinical jargon and everyday speech. A doctor-facing protocol might ask, “Is the pain severe?” In the chatbot, that becomes, “How bad is the pain on a scale of 1 to 10?” The goal is to make each question easy to understand and answer, especially for people without medical training.
The system continues down the flowchart until it reaches a recommendation, such as monitoring symptoms at home, scheduling a routine appointment or seeking urgent or emergency care.
By tying every step to a clinician-vetted decision tree, the researchers say the tool is more transparent and trustworthy than a typical free-form AI chatbot. Wang emphasized the difference between this approach and letting a large language model generate advice on its own.
“Large language models are powerful, but they’re a black box,” said Wang. “We do not know how they generate their responses, and that makes it hard to verify or trust them. But with this system, every recommendation can be traced back to a clinician-validated flowchart.”
To test the system, the team ran more than 30,000 simulated conversations. In those trials, the chatbot chose the correct medical flowchart about 84% of the time and followed the decision-making steps within that flowchart with more than 99% accuracy, even when users described the same symptoms in different ways.
The researchers stress that the tool is meant to support clinicians, not replace them. Used well, they argue, it could help overburdened health systems by handling routine triage questions before a person ever sets foot in a clinic.
Liu explained that shifting some of this work to AI could free up staff time while still keeping clinicians in the loop.
“It can offload triage tasks from clinicians by providing patients reliable medical guidance at home,” said Liu. “Clinicians could also review the conversations and step in when needed.”
For patients, that could mean faster reassurance when symptoms are mild, clearer instructions when they are not, and fewer hours spent in crowded waiting rooms for non-urgent issues. For hospitals and clinics, it could mean fewer unnecessary emergency visits and a better chance of catching serious problems earlier.
So far, most testing has been done with simulated patients rather than real ones. The team now plans to partner with hospitals to see how the chatbot performs in real-world settings and how people respond to its guidance.
They are also working on a mobile app version and exploring features such as voice input, support for multiple languages and the ability to share images. Those upgrades could make the tool more accessible to older adults, people with limited literacy and non-English speakers, who often face extra barriers when seeking care.
Longer term, the researchers envision integrating the chatbot into electronic health record systems so that triage conversations can flow directly into a patient’s chart, giving clinicians more context before a visit and reducing the need for patients to repeat their stories.
Co-led by Li, Wang and Xin Liu, a senior research scientist at Google Research, the study involved collaborators from UC San Diego, Kaiser Permanente, UC San Francisco and Korea University Ansan Hospital.
As AI continues to move into health care, the UC San Diego team’s work highlights one promising path: using powerful language models, but keeping them firmly anchored to the same carefully tested protocols that guide human clinicians every day.
