Blog | Vigilance Santé

ChatGPT in pharmacy practice: A guide to safe and effective use

Written by Jean-Félix Charest, Pharm.D., MBA | Aug 15, 2024 1:17:06 PM

Born from remarkable advances in the artificial intelligence sector in recent years, ChatGPT burst onto the scene on November 30, 2022: the day a free version of the tool was released to the public. Since then, AI has demonstrated its potential to revolutionize a wide range of fields, including health care. Although ChatGPT sometimes gets a bad rap (it's been criticized for fabricating information, showing bias, violating copyright, and even making some jobs obsolete) it can be a powerful and practical tool when used properly. In my opinion, pharmacists should embrace this technology, as it has several of useful applications in our practice.

In this article, I'll provide an overview of the principles of artificial intelligence and how to use ChatGPT to help you get the most out of AI and minimize the associated risks.

By the time you finish reading, I hope that you, too, will see this tool as a valuable ally that can help you optimize patient care and work more efficiently.

What exactly is artificial intelligence?

Artificial intelligence (AI) has become an unavoidable buzzword, all too often used for marketing purposes, commercial gain, and clickbait. For a clearer understanding of what AI is, here are a few definitions adapted from "Une intelligence artificielle bien réelle : les termes de l'IA ," a French glossary produced by the Office québécois de la langue française.

  • Artificial intelligence (AI): A field of study concerned with the artificial reproduction of the cognitive faculties of human intelligence, with the aim of creating systems or machines capable of performing functions normally falling within its scope.
  • AI system (or AI): A system designed to simulate human intelligence processes to perform functions traditionally associated with human intelligence.
  • Strong AI, or artificial general intelligence (AGI): An artificial intelligence system designed to mimic the functioning of human intelligence as a whole, including the ability to question itself, analyze information, and understand its reasoning.
  • Weak AI: An artificial intelligence system designed to mimic a specific function of human intelligence, enabling it to reproduce certain human behaviours to accomplish one or more specific tasks.

To put it more simply, AI is the science that allows computers to imitate abilities normally associated with human intelligence. Note that the term AI is also commonly used to refer to AI systems. What's more, there is no universally accepted definition of artificial intelligence.

In fact, when most of us talk about artificial intelligence, we're usually thinking of strong AI (as portrayed in Terminator, I, Robot, and other works of science fiction), whereas ChatGPT and other current AI technologies fall into the category of weak AI. The latter type is being increasingly integrated into tools and software to enhance their functionality. There are several types of weak AI, including generative AI, which is the technology behind ChatGPT.

What is generative AI?

Let's start with a definition: generative AI is a content production tool that relies on algorithms and big data to generate content, usually in the form of a text, audio, video, or image file (definition adapted from the Vitrine linguistique).

In a nutshell, it's an AI system capable of mimicking the human process of content creation after analyzing a vast amount of text and information.

Why is it important to understand the principles of generative AI?

Because doing so helps demystify and debunk the myths surrounding tools like ChatGPT, which makes people more comfortable using them. By gaining a basic understanding of this technology, you will have a much easier time integrating it into your practice and using it efficiently.

Principles of generative AI

Many generative AI tools are often built on large language models (LLMs). This type of AI is designed to understand and generate text. Think of LLMs as huge dictionaries that can form sentences in natural language by predicting what word comes next. They are trained on huge quantities of text, usually sourced from the internet, to interpret human language and produce coherent text.

During training, the model learns how words are associated in different contexts. It can then predict the next word in a sentence or the answer to a question by finding the word with the highest probability of coming next based on its training. It then repeats this process for each subsequent word.

Let's look at an example. If the model is given the incomplete sentence "Metformin is used to treat ___," it is able to deduce from the data it was fed during training that diabetes is most likely the next word.

So, if the model always picks the word that's most likely to come next, why does it sometimes give different answers to the same question? The reason is that it has various parameters that introduce an element of randomness into its answers, giving it a measure of "creativity." Rather than simply selecting the most probable word every time, it will randomly choose from a list of the most probable words.

What are GPT and ChatGPT?

Generative pre-trained transformer (GPT)

GPT is a family of LLMs developed by OpenAI that are used to power ChatGPT. The AI models in this family can also be used within other tools. For example, they could be used to build virtual assistant or clinical note software.

Each version of the models in this family has a different name and number. They also have different abilities, and some have more up-to-date training datasets than others. There are three main sources for training data:

  1. Publicly accessible websites on the internet
  2. Information obtained under licence from third parties
  3. Information provided by users

As of the publication date of this article, the most recent models are GPT-4o and GPT-4o mini, which have been trained on data dating up to October 2023. That means they don't have access to any data produced past that date. The specifications for OpenAI's AI models are available in the documentation on its platform. This page is particularly useful for checking the date of the training data used by the various models.

ChatGPT, an application that relies on GPT models

ChatGPT is a chatbot that uses GPT as its brain. It can be accessed via a web browser, an iOS or Android mobile app, or a Mac app (a Windows app should be available later in 2024).

Before accessing it, you'll need to create an account and choose a subscription. The free version gives you unlimited access to the GPT-4o mini model and limited access to the GPT-4o model. Paid versions offer access to more powerful models and advanced features. You can visit the ChatGPT website to compare prices and features.

How can ChatGPT support my work as a pharmacist?

ChatGPT offers a number of benefits for pharmacists, including increased productivity, improved communications, and support for professional development. I myself use it on a daily basis, for both professional and personal purposes. It allows me to find information more quickly, helps me write better and summarize texts, and makes complex subjects easier to understand. I see it as a more powerful Google that I can customize to suit my needs. I encourage you to explore it and discover how it can support you in your practice.

BENEFITS

Increased efficiency and productivity

ChatGPT is primarily a time-saver. Because it can perform tasks previously reserved for humans, such as writing notes and reports, it promotes both efficiency and productivity. This means you can devote more time to value-added tasks, such as patient consultations, treatment follow-ups, and care plan development.

⭐ Better communications

ChatGPT is very handy for writing professional letters, clinical notes, and reports. Not only can it help you write faster, but it can also help you write better. The result is communications that are easier to read and understand for your patients and colleagues.

Professional development

Because ChatGPT is capable of extracting and summarizing information from a lot of text very quickly, it can provide quick answers to complex questions. Thus, it can be a highly effective tutor when you want to learn more about a subject.

POSSIBLE APPLICATIONS

🔹 Writing clinical notes or letters to professionals

Delegate your writing tasks to ChatGPT to save time and improve content quality. Just give it a few simple instructions as to how you'd like the final product to read, and it can quickly produce a high-quality text, such as letters to doctors to share information about a patient's treatment, ask for clarification about a prescription, or suggest changes to a treatment plan. You could also ask it to write a note summarizing a patient intervention.

🔹 Finding information

You can ask ChatGPT to help you answer questions from the people you treat or from your colleagues in the health care field. It can help you find relevant information, give answers to specific questions, or direct you to reliable resources that may have the information you're looking for. In this way, it is also particularly useful for keeping your knowledge and training up to date.

🔹 Summarizing documents

ChatGPT excels at summarizing scientific articles, clinical guidelines, and any other type of text in accessible language. As a pharmacist, you can take advantage of this attribute to quickly extract the information you need from a document and concentrate on the essential points. You can even ask questions about the article and get a concise answer so that you don't have to read the whole text.

🔹 Educating patients

Sometimes, it can be hard to give the people under our care clear explanations about medications or complex diseases. Luckily, you can ask ChatGPT to help you distill complex topics into plain language or give you ideas about how to discuss them.

🔹 Translating documents

Language barriers can sometimes make it difficult to communicate with our patients. Don't hesitate to use ChatGPT to translate certain documents into a patient's language, such as dosage instructions or information sheets. You can also use it to translate documents provided by the patient.

Are there any risks associated with using ChatGPT?

Yes. Fortunately, our understanding of how generative AI tools in general, and ChatGPT in particular, work enables us to adequately assess the risks associated with using them and put in place strategies to limit these risks.

Good to know!

ChatGPT models are trained to predict the next word in a text sequence using probability. They don't understand language the way a human being would, taking into account context and meaning. They can only reproduce the textual associations identified in the training data. So, because they don't understand what any given text means, they can't use logic.

Here's an example. If a model is trained on a dataset where the majority of the texts say that 2 + 2 = 5, when asked "What is 2 + 2?", it will answer "5"!

Risks

  • Incorrect information. The biggest risk of using ChatGPT is that it can provide incorrect information. Since it doesn't actually understand language, facts, or logic, it can produce text containing errors. If the tool can't find the right answer in its training sources, it may make one up from scratch! Remember that the free version of ChatGPT uses a model with training data going up to October 2023.

Here's an anecdote:

I asked ChatGPT : "Who sang an Édith Piaf song at the 2024 Paris Olympics?"

It told me that the French singer Angèle paid homage to Edith Piaf by performing "La vie en rose" at the opening ceremony of the 2024 Olympics. 

Of course, it was actually Céline Dion who performed at the ceremony, singing Piaf's "Hymne à l'amour." But since that information wasn't in the model's training data, it made up an answer, rather than saying it didn't know. This is called a hallucination.

  • Obsolete information. As ChatGPT cannot access real-time data, it may provide out-of-date information. That's why it's important to check the date of the model training data used by ChatGPT to ensure you get accurate results.
  •  Bias. Like any type of AI, ChatGPT reproduces the biases and prejudices in its training data. Since it can't exercise reason, it can't identify and eliminate them.
  • Privacy issues. Personal-use versions of ChatGPT may use the conversations you've had with the software to train their models. Because of this, you should never include any confidential or patient-identifying information in your prompts.

So, how do you use ChatGPT effectively?

Now that you understand the limitations and risks of ChatGPT, you need to learn how to use it effectively. To get the most value out of this tool and obtain the most relevant answers, you need to master two key skills.

  • First, you need to ask the right questions to get the best possible results: this is called "prompt engineering."
  • Next, you need to be able to verify the information ChatGPT provides, especially if it's crucial to your practice.

Asking the right questions, the right way

Give specific instructions

The more specific you are about the response you want, the more relevant ChatGPT's results will be. Remember to include the following:

  • The target audience
  • The desired point of view
  • The desired language level
  • The desired response length
  • Any other relevant information

Let's look at an example. You want to start advising your patients on Mounjaro. If you ask a vague question like "What do I need to know about Mounjaro?", ChatGPT might tell you about the drug . . . or about Mount Kilimanjaro! By clarifying your question, you'll get better results. You could try rephrasing your prompt like so: "I'm a pharmacist in Canada and I would like to advise my patient about the drug Mounjaro. I'd like to inform them about the drug's indication, how long it takes to take effect, the dosage, how to administer the drug, the most common side effects, and side effects to watch out for. I need to be able to convey all this information in 5 minutes or less. Write the advice in language accessible to a patient." ChatGPT will provide a much more relevant response.

Give references

To avoid hallucinations and answers containing obsolete or incorrect data, include references in your prompt if you have them. It's important to delimit the reference with separators, such as line breaks, or delimiters surrounding the reference, such as quotation marks.

Here's an example:

For the prompt. You've heard that the National Advisory Committee on Immunization has just released its statement on seasonal influenza vaccine for 2024–2025, and you've seen some information about changes for quadrivalent and trivalent vaccines.

You can paste in the statement summary after the following question: "What are the changes related to trivalent vaccines according to the following NACI statement summary?"

Even though the model can only access information up to October 2023, it can still answer the question. Here is ChatGPT's response:

 

"The NACI statement summary from July 25, 2024, indicates the following changes related to trivalent vaccines:

No Preference Between Quadrivalent and Trivalent Vaccines for Children: Previously, quadrivalent vaccines were preferred for children due to the additional protection they provided. However, since the B/Yamagata strain has not been detected globally since March 2020, the B/Yamagata component is excluded from vaccine formulations for the 2024-2025 season. As a result, NACI no longer has a preference between quadrivalent and trivalent influenza vaccines for children. Both types are considered safe and effective.

Updated WHO Recommendations: The change aligns with the World Health Organization's recommendations, reflecting the global epidemiological data on influenza strains.

In summary, the key change is the removal of the preference for quadrivalent vaccines over trivalent ones for children, due to the absence of the B/Yamagata virus strain."

Give examples

When your desired output is difficult to describe in words, you can simply give ChatGPT an example of what you're looking for. For instance, if you want it to write clinical notes in your personal style, you can include notes you've written in addition to the information it needs to incorporate into the new note.

Refine answers with follow-up questions

If you're not satisfied with the response you get from ChatGPT, you can tell it what information was wrong or what you'd like it to change, and it will refine its answer. The tool takes into account your conversation history and stores some information in its memory. That way, you don't need to start from scratch whenever you want to change something.

Check ChatGPT's work

Ask for references

A simple way to verify the information provided by ChatGPT is to ask it for references. You can also ask it to quote passages from these references.

Check with a reliable source

While ChatGPT can make you more efficient, it's vital to validate the information it provides with your usual reliable reference sources, such as RxVigilance.

Key points to remember

ChatGPT has great potential for saving time and improving your practice. To get the most out of it, you need to master the basics. There's no magic behind ChatGPT. It's just a very powerful predictive technology—one with limitations and risks you need to be aware of if you want to use it properly. Remember that AI is not intended to replace pharmacists, but to assist them in their work. You must always use your professional judgment and ensure that the information provided by the AI is appropriate to each clinical situation. By using these tips and tricks for interacting with ChatGPT and fact-checking its output, you'll be able to get the most out of this advanced technology in your day-to-day practice. Enjoy the discovery!