I’ve been fiddling around with ChatGPT off and on the past week trying to find ways to make it useful for pharmacy practice. This post (and maybe later ones that follow) will be a collection of thoughts and a recounting of what I’ve been trying so far. This one specifically is mostly going to be a retelling of what I’ve already posted on Twitter with a bit of a preface:
I’m fairly good with computers, probably considerably more than the average pharmacist, but I’m no programmer and I’m not really plugged that far into the tech world, so I’m going into this with only a basic understanding of LLMs. Much of this will look like exploring ChatGPT’s functionality, (which it is, and) which will maybe be helpful to any pharmacy folks peeking in on LLM stuff for the first time.
I would happily be corrected if this metaphor is super off, but LLMs in a nutshell for the uninitiated: think of your phone’s auto-complete on extreme steroids. Basically, they work by predicting the next token (for most intents and purposes: word) in stringing together a coherent text useful for its prompt. It’s tempting to be like “oh so it’s not actually thinking it’s just a next-word-predictor” but one must bear in mind that, unlike your phone which gives you 3 options for what it thinks (hah) the next word you want to type is, the possibility space of next words is…every word in the English language, and several words not strictly in English, and several things that aren’t even words—and so the idea that it’s not modeling something on some level (“thinking”) is missing out on the thing that makes this all rather wondrous.
So, moving on.
The first few queries I ran were on the public chatgpt.org site before switching to OpenAI’s ChatGPT proper, but I repeated the original chat with pretty similar results.
Here’s the first part of the first attempt:
And corresponding first part of the conversation recreated on the OpenAI ChatGPT:
My first impression, especially having read up on a lot of people doing some interesting stuff with ChatGPT, was that I was surprised how “meh” it was for pharmacy practice. I tried to get it to do a few other things like use it to identify pills or to answer law questions (the results of both I’ll get to further on) and found initially that it was not very useful; in the former case it was wildly inaccurate and in the latter it gave some really curious results.
I started with “what should I use you for” just out of a lack of personal creativity for its applications and you can see that it gave me some pretty boilerplate answers.
Points 1-1, 1-6, 2-1, & 2-2, broadly: using it as a drug information resource, is a case of limited usefulness vis a vis that on the job we generally already have access to well-curated drug information resources that aren’t subject to hallucinations (ie LLMs spitting out plausible but inaccurate information).
Point 1-2, pill identification, has severe problems that will be outlined later.
1-3, 2-8, & 2-10, using it for prescription/order verification, is basically impossible with ChatGPT out of the box without some way of communicating what you’ve got to verify.
1-4, 2-4, & 2-6, dealing with ancillary information around pharmacy practice has potential, heavily reliant on the quality of its training data and/or extensive tuning. ChatGPT already has known usefulness for compressing and decompressing complex information and so might absolutely be useful, say, for patients as a substitute for asking a pharmacist.
1-5, 2-3, & 2-7 run into information access problems wrt fresh info; anything that requires up to date information is first going to have to overcome GPT-4’s September 2021 information cutoff date and/or have some mechanism for continual updating for new information.
1-7 & 2-9, similar to the points above on ancillary information, ChatGPT might be useful for clean documentation. 2-9 also requires ongoing up-to-date ability to know and interpret evolving regulation.
2-5 is interesting. There’s already been some limited known usefulness for using ChatGPT as a diagnostic tool, but there’s clear potential for high risk and there’s already been additional guardrails applied. I think one could reasonably describe ChatGPT as “better than WebMD”.
Bringing it all together, there doesn’t seem to be much on the surface that I can use ChatGPT for above and beyond what I have access to at present, right now, but there’s lots of imaginable future potential.
Moving on, the next thought I had was to quiz on the basics of my job:
I asked this to the chatgpt.org one originally as well, but that one had no clue what I was talking about. ChatGPT here either absorbed some of that or has better training data (I guess I don’t even know if those are the same GPT-4?). ChatGPT’s take on KOP and DOT are essentially correct, but it flubs NA pretty badly, so I gave it the same correction I gave originally:
Here’s where I’ll note that ChatGPT gave me back some additional (correct!) detail on KOP that I had not provided: that inhalers and nitroglycerin are the foremost examples of medication that is supposed to be ordered KOP, however they’re not as “closely monitored” as other orders. It misses the mark on making the same sort of would-be-surprising-for-correctly-guessing for DOT orders; the flagship example here is psych meds. It also appears not to understand that the distinguishing feature of DOT is that the patient must be observed successfully taking the dispensed medication (think traditional hollywood psych ward medication administration where they have to show they haven’t cheeked something or spit out their medication).
Next:
It gets the basic understanding right. Examples 1, 2, and 3 are all spot on. 4 and 5 are situationally correct but in both those cases orders may still be dispensed KOP. It misses several important examples but this is a pretty good start.
Next was when I started trying to use it as a pill identifier, to begin with I prompted it the same way I might dump it into Google, then started asking it how best to prompt instead:
I’ve heard there’s theories that you can get ChatGPT to give you better answers by phrasing your prompts very politely, so it’s interesting to me that it specifically suggests using please and thank you here.
It gets the first example right but tamsulosin is a pretty big softball, just about every practicing pharmacist probably knows it by sight.
After sanity checking to make sure, I confirmed there are no form of metformin that matches this description.
Starting to lose hope.
At this point I shifted to trying to figure out what was going wrong and if things could be improved.
Suspecting we’re at Google-level access to this kind of drug info…
Not much to work with here.
Shifted to trying out some other topics to get a feel for where ChatGPT is at re: pharmacy.
Trying some topics from my explainer just to see if it might have grabbed data from there…
Pretty milquetoast but essentially correct.
Took an aside here to do a quick politeness test.
I wouldn’t say the polite version is a better answer but a big ol’ HOO BOY @ “create a more positive and respectful interaction between humans and machines”.
Here’s something that actually came up on the job: we came across an acronym that nobody recognized. Google failed us but ChatGPT gave us a fairly plausible possible answer.
Lastly, we had an incident where we may have had a controlled substance loss to report so I went and looked up all the reporting requirements I could find for my colleague as a refresher, then I ran it by ChatGPT to see what would happen and it actually managed to find something close to the correct answer for the specific law mandating one of the requirements I’d already confirmed elsewhere (but had not found myself). This went off on a whole thing that’s interesting to explore, starting:
“Section 1715 of the California Code of Regulations” is close, but not quite there. Section 1715 deals with pharmacy self-assessments, it’s actually section 1715.6 that covers reporting controlled substance loss. At first I didn’t notice, but I eventually went back to check its work and continued:
First, trying to narrow down where in 1715 it (erroneously) thinks the controlled substance reporting requirements are. Then I tried to see if it’s aware of 1715.6 and whether it might notice what’s going wrong.
I tried to get it to pay closer attention to what it was saying by asking it to validate based on what it knows. At some point I do a little digging to see if perhaps it’s recalling an older version of the law (perhaps pre-knowledge cutoff) but this doesn’t appear to be the case based on what’s cited as revisions to the law on Westlaw. From there I move on to exploring whether correcting ChatGPT’s misunderstanding is a viable option.
So obviously I’m a little confused here, I gave it the same link as above for 1715 but it clearly is still hallucinating.
It continues to give me the wrong text for 1715.a and when I ask where it’s getting it from it gives me back the exact same link I just gave it for 1715. I’m omitting one more back and forth where I ask it to cite section (a) from the link it just gave back to me and it again gives me back the same wrong answer shown above.
So now it finally gets it correct. I’m kind of curious what changed or what caused this to happen.
Alright, so now it gets the gist of 1715 but now it thinks 1715.6 doesn’t exist. Certainly, this could be that it expects 1715.6 to be a part of 1715 (it is indeed weird that 1715.6 isn’t listed exhaustively on Westlaw but I don’t know much about law documentation/presentation), but we’re on to a new problem now.
I link it to 1715.6 and it picks up on it right away. Curiously, it gets the temporal requirement wrong; 1715.6 says within 30 days (not 14), but there is a 14-day requirement in the case of theft by an employee—except that this specific requirement comes from BPC 4104 and not 1715.6, and now I don’t know if it’s doing some more hallucinating or if it’s going quasi-galaxy brain on me.
Here’s where I stopped on this to go on to other things, and also so ends the notable stuff I’ve been fiddling with the past week or so.
(Article image courtesy of Stable Diffusion.)