Introduction

Why We Wrote This Book

In a new era of technologies that will change society and human life, the new synergy between AI and healthcare gradually emerges with new possibilities. LLMs and Generative AI for Healthcare: The Next Frontier explores what the future of healthcare may look like with the public awareness and breakthrough capabilities of AI large language models (LLMs) and generative AI.

We understand that a lot of promises have been made on the future of AI in healthcare1 that have not been kept. Challenges remain to truly make AI transformational for healthcare, but there is no denying the positive impacts of AI in healthcare.2 As authors and software engineers, we have built and seen the application of various aspects of AI in healthcare, which include machine learning, deep learning, computer vision, and natural language processing. This book is about a future we believe will fully come to fruition in a five- to seven-year time period, with transformational impacts to healthcare.

This is not a technical whitepaper but rather a nontechnical primer or vision guide about what is possible using the capabilities of LLMs. It describes several healthcare use cases that are possible but not yet developed. LLMs enable many challenging and time-consuming healthcare tasks to be easier, faster, and even automatic. The allure of the future for LLMs is not to further automate most of the trivial tasks but eventually address big challenges to make healthcare work for everyone and to make healthcare more efficient, more personalized, and simply better. This is a vision of what is possible in healthcare using AI and LLMs, but it is not a guide on how to build these future LLM solutions.

There are no recipes for LLM development here. This is a guidebook for healthcare companies, organizations, entrepreneurs, and health professionals on understanding and applying LLMs through the depiction of multiple use cases. The healthcare world of data is the most complicated type of problem for data science. Queries are very hard, expertise is required for many unique use cases, critical information can be easily missed, or searches for patient medical data can be like finding a needle in a haystack.

Medical-specific language models like Med-PaLM and general-purpose language models will likely evolve significantly in the next two years, potentially transforming their capabilities and applications in clinical settings. Now is the time to understand and begin to build LLM-based apps and applications for patients, consumers, and clinicians. This journey is not easy! There are several challenges and also significant ethical issues. Should LLMs interfere with the sacred patient-physician relationship, or should they enhance communication and outcomes?

If we solve these challenges, millions of lives can be saved with the utilization of medical LLM apps, transforming healthcare globally. We need better, finely tuned LLM apps for healthcare, with search and conversation modalities that are extensively quality controlled in the real world with real clinical usage. The potential of LLMs in healthcare is boundless. They provide a once-a-century opportunity to finally improve human health and usher in a new era of healthcare delivery. We invite you to join us in imagining what actual AI products and solutions are going to look like in the near future.

There are many stories that inspired this book. One such story is about a young family having their first baby, and like all such families, they were excited. Their obstetrician was quite experienced but unknown to the young couple. The baby’s abdomen was swollen from a congenital condition called hydrops. It was a potential birthing disaster. The baby was predictably stuck in the birth canal. We were told this story from the lawyer representing the family and pursuing a case against the obstetrician and her employer, a large healthcare provider.

The provider’s obstetrician knew or should have known that a cesarean section would be an infinitely safer option, but went forward with a vaginal delivery. The obstetrician failed to provide the parents with the options or notify them of the risks. At time of delivery, the obstetrician presented a life and death situation for both the mother and the baby. Seconds mattered. The obstetrician removed the baby from the birth canal using forceps by the head, consequently breaking the baby’s neck, shoulder, and her arms. The baby was left as a partial quadriplegic with brain damage. A lawsuit was brought describing a litany of medical errors and wrongful conduct by both the provider and its obstetrician.

The provider who employed the obstetrician was accused of not fostering a culture of patient-centered care, one that promotes communication and respects patient’s ideas about their treatment options. This is not an isolated story in healthcare, and we can do better.

There are many ways a chatbot powered by an LLM could have assisted the parents. The hypothetical Medical Swiss Army Knife LLM chatbot previewed in Chapter 1 could be trained to scour physician review sites such as Healthgrades, Vitals, and RateMDs, as well as social media sites like Yelp, and then could retrieve and process reviews containing the name of the targeted obstetrician. Scraping and paraphrasing existing bad posts written by upset former patients would be quick and easy.

The LLM could use a sentiment analysis method to automatically assign the reviewed cases to positive, negative, or neutral. Giving the parents a measure of the parental satisfaction with the obstetrician would enable them to use their own judgment when choosing a specialized care provider. The LLM could listen in on conversations between the parents and the obstetrician, and it could inform the parents when clinical guidelines were not being followed. The Medical Sherpa app, a chatbot, would operate as a companion to the parents to both listen to their concerns and make recommendations. These would not be clinical recommendations but would make sure the parents were asking the right questions and being listened to by the obstetrician.

One more story. Gerry, short for Geraldine, is an African American woman who celebrated her 93rd birthday in 2024. She has high blood pressure and type 2 diabetes. Gerry takes two pills every morning: one is an extended-release formula of Metformin (MXR), prescribed for those with diabetes, and the second is for her chronic high blood pressure. Gerry trusts her primary care physician but feels that her doctor does not really know her. She doesn’t believe his treatment plan for her accounts for how she is responding.

One weekend, she’s talking to her cousin who is a tech guy (not an MD, but he has experience with AI). Gerry explains how she missed taking a dose of one of the medications and noticed the swelling she has been experiencing has subsided. She wonders if one of the medications is causing swelling and if she should stop or change the dosage. Her cousin gently responds to her: “Now, Gerry, as you know, I’m not a physician of any kind and thus my recommendation to you at this time is to check with your primary care doctor before making any changes to your treatment plan.”

However, Gerry’s cousin realizes that her question isn’t a good fit for a typical search-engine query that Gerry might use, and wonders if an LLM chatbot could have been useful in this scenario. Using this conversational medical-centric chatbot might have been able to provide Gerry with a more personalized and context-appropriate answer to her questions about medication adherence. For example, an LLM could provide general information on the importance of adherence to prescribed regimens and the potential risks of discontinuing medications without medical supervision. Such a chatbot could also help Gerry craft questions to ask her doctor at her next appointment, and help Gerry advocate for her health needs. Of course, an LLM chatbot should never replace the care and expertise that a physician provides to Gerry, but it could act as a supplement to that expert care, providing her with a supportive tool to help her engage with health questions.

Patients and consumers need help in navigating healthcare for a number of reasons. We preview several use cases of LLMs in Chapters 3, 4, and 5 that will make healthcare more personalized and be an aid to both clinicians, patients, and consumers. This book hopes to get professionals in the healthcare business to think about the art of what is possible using AI and LLMs.

Who This Book Is For

This book targets a diverse audience yearning to unlock the potential of AI in healthcare. Its pages offer insights for the following:

Doctors and clinicians

Learn how AI-powered diagnostics illuminate hidden patterns, enabling early interventions and personalized treatment plans. Discover how generative AI helps you craft patient-specific therapies and empowers deeper collaboration with AI colleagues.

Chief medical officers

Understand the unique capabilities of LLMs and generative AI for healthcare. Delve into various use cases for patient care and clinician decision making and business process automation.

Chief technology officers

There are myriad compounding challenges facing healthcare and life science companies, making it essential for the CTO to adopt technology to meet patient needs and ultimately transform care delivery.

Clinical leaders

Learn about LLMs’ present and future capabilities and learn about generative AI. Understand how LLMs will transform healthcare for clinicians, patients, and healthcare organizations.

Medical researchers

Dive into the LLMs and generative AI world to fuel your research with an understanding of emerging use cases. Explore the ethical considerations of AI deployment in clinical trials.

Ethicists

Navigate the complex ethical landscape of AI in healthcare, and grapple with data privacy issues, algorithmic fairness, and potential biases. Contribute to frameworks and guidelines for responsible development and deployment of AI tools.

Students

This book is your portal to the future of healthcare. Gain a solid foundation in LLM and generative AI principles and explore their potential to revolutionize diagnosis, treatment, and research. Be inspired by diverse career paths at the intersection of medicine and technology.

Whether you are a seasoned practitioner or a curious student, this book offers a compelling journey into the future of healthcare, where human expertise and AI intelligence converge to heal, empower, and transform.

How This Book Is Organized

The content of this book is structured in seven chapters and is organized as follows—reflecting the distinct characteristics of LLMs and other generative AI models in healthcare and their potential as well as their challenges and applications.

Chapter 1: Doctor’s Black Bag

This chapter explores the potential of LLMs and generative AI in healthcare, offering an overview of the promise of LLMs and their use in healthcare. In addition to describing future possibilities of LLMs, this chapter introduces challenges with using LLMs in healthcare.

Chapter 2: Peeking Inside the AI Black Box

Here, readers will learn about the anatomy of an LLM and how LLMs work. Instead of amorphization of LLMs, this chapter helps the reader understand the architecture and basic workings of how LLMs work and generate content.

Chapter 3: Beyond White Coats

This chapter examines how LLMs and generative AI can be used to automate more tasks in healthcare. It examines areas where this technology can be applied to improve operations and patient care.

Chapter 4: LLM and Generative AI’s Patient and Clinical Potential

In this chapter, we explore how generative AI can elevate the patient experience and impact clinical decision making: health bot concierges; doctors’ notes and doctor visits; health plan wizards; application for common health concerns such as black maternal health; medication reminders; and even oral health. Beyond common health concerns, we’ll explore clinical decision support tools, clinical insight bots, and AI curbside physicians. We also can’t forget about remote patient monitoring, digital twins, fully automated doctor letters, and the role of generative AI in health equity.

Chapter 5: LLMs in Pharmaceutical R&D, Public Health, and Beyond

This chapter presents the utilization of LLMs in drug discovery, clinical trial design and analysis, and genomic research. Specifically, we discuss the diverse applications of LLMs in pharmaceutical research and development as well as public health and genomics, and we further explore their benefits and potentials.

Chapter 6: Steering the Helm for Ethical Use of LLMs

This chapter focuses on the question of how LLMs used in healthcare can be developed in a responsible manner and designed to maximize positive impact. It begins with a discussion of what we mean by a “positive AI imaginary” and goes on to describe the ethical considerations surrounding LLMs, including bias, privacy, and the risk of illicit uses. It also discusses some strategies for dealing with these issues (e.g., monitoring LLM behavior, securing and protecting privacy, policies to enable ethical uses of LLMs, etc.). It discusses “AI and the Paperclip Problem” (i.e., alignment), which states that we must make sure that the goals of AI are aligned with human goals.

Chapter 7: Objects Are Closer Than They Appear

The final chapter provides a peek into the future of LLMs, including a discussion of the singularity and the potential for AGI to evolve. The final section is titled “Whispers of Tomorrow,” which provides five predictions of future LLMs and how they could affect our healthcare and society. Through this diverse collection of cases, the book provides a holistic view of the present reality and the future opportunities of LLMs and generative AI in healthcare, arming the reader with required knowledge and insights to navigate the ethical, technical, and social implications of these rapidly emerging technologies. After reading these seven chapters, readers will understand the possibility, problems, and the ethics of using LLMs and generative AI in healthcare. It is hoped that the sequencing across chapters will guide the reader to grasp a detailed understanding of how these tools, if used intelligently, can transform healthcare delivery and enhance patient outcomes.

O’Reilly Online Learning

Note

For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed.

Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, visit https://oreilly.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at https://oreil.ly/llms-gen-ai-healthcare.

For news and information about our books and courses, visit https://oreilly.com.

Find us on LinkedIn: https://linkedin.com/company/oreilly-media.

Watch us on YouTube: https://youtube.com/oreillymedia.

Acknowledgments

We would like to express our profound gratitude to the numerous colleagues and mentors who have shaped our understanding and perspectives on healthcare and AI throughout our careers. Our experiences at Google, IBM, Optum, and Johnson & Johnson have been invaluable, providing us with diverse insights and opportunities for growth. The collective wisdom and innovative spirit of these organizations and the individuals within them have been instrumental in forming the ideas presented in this work.

Kerrie Holley

First and foremost, I would like to express my deepest gratitude to my beloved wife, Melodie Holley. Your unwavering support, love, and encouragement have been the bedrock of my life and career. Your patience and understanding during the long hours spent researching and writing this book have been invaluable. I am truly fortunate to have you by my side.

Kier and Hugo, you are the living embodiment of all the traits I could have ever imagined and wished for in my sons. Your presence in my life is an unparalleled gift, and I am forever grateful for the joy, love, and inspiration you bring into my world every single day.

Reece, as a proud father and as you stand on the precipice of your senior year, I find myself filled with an overwhelming sense of pride and admiration for the young man you have become. I am excited to witness the incredible journey that lies ahead of you.

Aliya, my favorite daughter, you bring me joy and happiness every single day and in the moments we share. I love our daily bedtime activities and your old soul, intellect, kindred spirit, and sweet nature.

I am deeply grateful to Julie Zhu of UnitedHealth Group for her invaluable guidance in applying machine learning to healthcare, which has profoundly shaped my thinking. Her expertise opened my eyes to the transformative potential of deep learning and AI in medicine. I extend my heartfelt thanks to Dominik Dahlem, PhD, for challenging my perspectives and broadening my horizons in AI, particularly in MLOps. His insights on treating machine learning as a software discipline, integrating best practices of ML and software engineering, have been instrumental in tackling complex healthcare challenges. I appreciate the thoughtful review by Rackspace AI CTO, Ram Viswanathan. I also thank Rick Hamilton, an incredible inventor and technology executive, for his insightful review of the manuscript.

Manish Mathur

I would like to express my heartfelt gratitude to my parents, Dr. P. B. Mathur and Mrs. Asha Mathur, whose unwavering inspiration and guidance have been the driving force behind my pursuit of excellence. My father, Dr. P. B. Mathur, who now rests in the heavenly abode, has bestowed his blessings upon this endeavor, and I am confident that he continues to watch over me with pride. My mother, Ms. Asha Mathur, remains a constant source of blessings and wisdom, guiding me through life’s journey with her unique and invaluable ways.

Furthermore, I extend my deepest appreciation to the lights of my life, my sons Abhyuday and Kush, whose charming aspirations continuously motivate me to strive for greater heights each day. Their presence is a constant reminder to embody the values of perseverance and dedication, inspiring me to be a better person for their sake and for the betterment of society.

Kerrie and Manish

We would also like to thank the colleagues, mentors, and friends who have supported us throughout this journey. Your insights, feedback, and collaboration have been invaluable in shaping the ideas and concepts presented in this book.

We’d like to thank Angela Rufino, the O’Reilly content development editor, for shepherding us through the author process and for her insightful comments and edits. We also thank Adam Lawrence for his exceptional copyediting.

Finally, thank you, the reader, for taking the time to engage with the ideas and perspectives presented in this book. It is our sincere hope that the knowledge and insights shared within these pages will contribute to the ongoing conversation about the role of LLMs and generative AI in healthcare and beyond.

1 Liz Szabo, “Are Health Care Claims Overblown about Artificial Intelligence?” PBS News, December 30, 2019, https://www.pbs.org/newshour/health/are-health-care-claims-overblown-about-artificial-intelligence.

2 “Revolutionizing Healthcare: How Is AI Being Used in the Healthcare Industry?” Lost Angeles Pacific University, December 21, 2023, https://www.lapu.edu/ai-health-care-industry.

Get LLMs and Generative AI for Healthcare now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.