How I Use LLMs like ChatGPT And Tips For Getting Started

You’ve probably heard about new AI (artificial intelligence) tools like ChatGPT, Bard, Midjourney, DALL-E and others. But, what are they good for?

Last fall I started experimenting with them. I looked at AI art tools and found them to be challenging, at the time, for one of my purposes, which was creating characters and illustrating a storyline with consistent characters for some of my children’s books. I also tested GPT-3 (meaning version 3.0 of GPT). It wasn’t that great, to be honest. But later, GPT-3.5 was released, along with the ChatGPT chat interface to it, which WAS a big improvement for a lot of my use cases. (And now, GPT-4 is out and is an even bigger improvement, although it costs more to use. More on the cost differences below)

So what am I using these AI tools for? And how might YOU use some of these AI tools? And what are the limitations? This is what I’ve learned:

  1. The most frequent way I use these AI tools is for getting started on a project, especially those related to writing.

You know the feeling of staring at a blank page and not knowing where to start? Maybe it’s the blank page of a cold email; the blank page of an essay or paper you need to write; the blank page of the outline for a presentation. Starting is hard!

Even for this blog post, I had a list of bulleted notes of things I wanted to remember to include. But I wasn’t sure how I wanted to start the blog post or incorporate them. I stuck the notes in ChatGPT and asked it to expand the notes.

What did it do? It wrote a few paragraph summary. Which isn’t what I wanted, so I asked it again to use the notes and this time “expand each bullet into a few sentences, rather than summarizing”. With these clear directions, it did, and I was able to look at this content and decide what I wanted to edit, include, or remove.

Sometimes I’m stuck on a particular writing task, and I use ChatGPT to break it down. In addition to kick-starting any type of writing overall, I’ve asked it to:

  • Take an outline of notes and summarize them into an introduction; limitations section; discussion section; conclusion; one paragraph summary; etc.
  • Take a bullet point list of notes and write full, complete sentences.
  • Take a long list of notes I’ve written about data I’ve extracted from a systematic review I was working on, and ask it about recurring themes or outlier concepts. Especially when I had 20 pages (!) of hand-written notes in bullets with some loose organization by section, I could feed in chunks of content and get help getting the big picture from that 20 pages of content I had created. It can highlight themes in the data based on the written narratives around the data.

A lot of times, the best thing it does is it prompts my brain to say “that’s not correct! It should be talking about…” and I’m able to more easily write the content that was in the back of my brain all along. I probably use 5% of what it’s written, and more frequently use it as a springboard for my writing. That might be unique to how I’m using it, though, and other simple use cases such as writing an email to someone or other simplistic content tasks may mean you can keep 90% or more of the content to use.

2. It can also help analyze data (caution alert!) if you understand how the tools work.

Huge learning moment here: these tools are called LLMs (large language models). They are trained on large amounts of language. They’re essentially designed so that, based on all of those words (language) it’s taken in previously, to predict content that “sounds” like what would come after a given prompt. So if you ask it to write a song or a haiku, it “knows” what a song or a haiku “looks” like, and can generate words to match those patterns.

It’s essentially a PATTERN MATCHER on WORDS. Yeah, I’m yelling in all caps here because this is the biggest confusion I see. ChatGPT or most of these LLMs don’t have access to the internet; they’re not looking up in a search engine for an answer. If you ask it a question about a person, it’s going to give you an answer (because it knows what this type of answer “sounds” like), but depending on the amount of information it “remembers”, some may be accurate and some may be 100% made up.

Why am I explaining this? Remember the above section where I highlighted how it can start to sense themes in the data? It’s not answering solely based on the raw data; it’s not doing analysis of the data, but mostly of the words surrounding the data. For example, you can paste in data (from a spreadsheet) and ask it questions. I did that once, pasting in some data from a pivot table and asking it the same question I had asked myself in analyzing the data. It gave me the same sense of the data that I had based on my own analysis, then pointed out it was only qualitative analysis and that I should also do quantitative statistical analysis. So I asked it if it could do quantitative statistical analysis. It said yes, it could, and spit out some numbers and described the methods of quantitative statistical analysis.

But here’s the thing: those numbers were completely made up!

It can’t actually use (in its current design) the methods it was describing verbally, and instead made up numbers that ‘sounded’ right.

So I asked it to describe how to do that statistical method in Google Sheets. It provided the formula and instructions; I did that analysis myself; and confirmed that the numbers it had given me were 100% made up.

The takeaway here is: it outright said it could do a thing (quantitative statistical analysis) that it can’t do. It’s like a human in some regards: some humans will lie or fudge and make stuff up when you talk to them. It’s helpful to be aware and query whether someone has relevant expertise, what their motivations are, etc. in determining whether or not to use their advice/input on something. The same should go for these AI tools! Knowing this is an LLM and it’s going to pattern match on language helps you pinpoint when it’s going to be prone to making stuff up. Humans are especially likely to make something up that sounds plausible in situations where they’re “expected” to know the answer. LLMs are in that situation all the time: sometimes they actually do know an answer, sometimes they have a good guess, and sometimes they’re just pattern matching and coming up with something that sounds plausible.

In short:

  • LLM’s can expand general concepts and write language about what is generally well known based on its training data.
  • Try to ask it a particular fact, though, and it’s probably going to make stuff up, whether that’s about a person or a concept – you need to fact check it elsewhere.
  • It can’t do math!

But what it can do is teach you or show you how to do the math, the coding, or whatever thing you wish it would do for you. And this gets into one of my favorite use cases for it.

3. You can get an LLM to teach you how to use new tools, solve problems, and lower the barrier to entry (and friction) on using new tools, languages, and software.

One of the first things I did was ask ChatGPT to help me write a script. In fact, that’s what I did to expedite the process of finding tweets where I had used an image in order to get a screenshot to embed on my blog, rather than embedding the tweet.

It’s now so easy to generate code for scripts, regardless of which language you have previous experience with. I used to write all of my code as bash scripts, because that’s the format I was most familiar with. But ChatGPT likes to do things as Python scripts, so I asked it simple questions like “how do I call a python script from the command line” after I asked it to write a script and it generated a python script. Sure, you could search in a search engine or Stack Overflow for similar questions and get the same information. But one nice thing is that if you have it generate a script and then ask it step by step how to run a script, it gives you step by step instructions in context of what you were doing. So instead of saying “to run a script, type `python script.py’”, using placeholder names, it’ll say “to run the script, use ‘python actual-name-of-the-script-it-built-you.py’ “ and you can click the button to copy that, paste it in, and hit enter. It saves a lot of time for figuring out how to take placeholder information (which you would get from a traditional search engine result or Stack Overflow, where people are fond of things like saying FOOBAR and you have no idea if that means something or is meant to be a placeholder). Careful observers will notice that the latest scripts I’ve added to my Open Humans Data Tools repository (which is packed with a bunch of scripts to help work with big datasets!) are now in Python rather than bash; such as when I was adding new scripts for fellow researchers looking to check for updates in big datasets (such as the OpenAPS Data Commons). This is because I used GPT to help with those scripts!

It’s really easy now to go from an idea to a script. If you’re able to describe it logically, you can ask it to write a script, tell you how to run it, and help you debug it. Sometimes you can start by asking it a question, such as “Is it possible to do Y?” and it describes a method. You need to test the method or check for it elsewhere, but things like uploading a list of DOIs to Mendeley to save me hundreds of clicks? I didn’t realize Mendeley had an API or that I could write a script that would do that! ChatGPT helped me write the script, figure out how to create a developer account and app access information for Mendeley, and debug along the way so I ended up within an hour and a half of having a tool that easily saved me 3 hours on the very first project that I used it with.

I’m gushing about this because there’s probably a lot of ideas you have that you immediately throw out as being too hard, or you don’t know how to do it. It takes time, but I’m learning to remember to think “I should ask the LLM this” and ask it questions such as:

  • Is it possible to do X?
  • Write a script to do X.
  • I have X data. Pretend I am someone who doesn’t know how to use Y software and explain how I should do Z.

Another thing I’ve done frequently is ask it to help me quickly write a complex formula to use in a spreadsheet. Such as “write a formula that can be used in Google Sheets to take an average of the values in M3:M84 if they are greater than zero”.

It gives me the formula, and also describes it, and in some cases, gives alternative options.

Other things I’ve done with spreadsheets include:

  • Ask it to write a conditional formatting custom formula, then give me instructions for expanding the conditional formatting to apply to a certain cell range.
  • Asking it to check if a cell is filled with a particular value and then repeating the value in the new cell, in order to create new data series to use in particular charts and graphs I wanted to create from my data.
  • Help me transform my data so I could generate a box and whisker plot.
  • Ask it for other visuals that might be effective ways to illustrate and visualize the same dataset.
  • Explain the difference between two similar formulas (e.g. COUNT and COUNTA or when to use IF and IFS).

This has been incredibly helpful especially with some of my self-tracked datasets (particularly around thyroid-related symptom data) where I’m still trying to figure out the relationship between thyroid levels, thyroid antibody levels, and symptom data (and things like menstrual cycle timing). I’ve used it for creating the formulas and solutions I’ve talked about in projects such as the one where I created a “today” line that dynamically updates in a chart.

It’s also helped me get past the friction of setting up new tools. Case in point, Jupyter notebooks. I’ve used them in the web browser version before, but often had issues running the notebooks people gave me. I debugged and did all kinds of troubleshooting, but have not for years been able to get it successfully installed locally on (multiple of) my computers. I had finally given up on effectively using notebooks and definitely given up on running it locally on my machine.

However, I decided to see if I could get ChatGPT to coax me through the install process.

I told it:

“I have this table with data. Pretend I am someone who has never used R before. Tell me, step by step, how to use a Jupyter notebook to generate a box and whisker plot using this data”

(and I pasted my data that I had copied from a spreadsheet, then hit enter).

It outlined exactly what I needed to do, saying to install Jupyter Notebook locally if I hadn’t, gave me code to do that, installing the R kernel, told me how to do that, then how to start a notebook all the way down to what code to put in the notebook, the data transformed that I could copy/paste, and all the code that generated the plot.

However, remember I have never been able to successfully get Jupyter Notebooks running! For years! I was stuck on step 2, installing R. I said:

“Step 2, explain to me how I enter those commands in R? Do I do this in Terminal?”

It said “Oh apologies, no, you run those commands elsewhere, preferably in Rstudio. Here is how to download RStudio and run the commands”.

So, like humans often do, it glossed over a crucial step. But it went back and explained it to me and kept giving more detailed instructions and helping me debug various errors. After 5-6 more troubleshooting steps, it worked! And I was able to open Jupyter Notebooks locally and get it working!

All along, most of the tutorials I had been reading had skipped or glossed over that I needed to do something with R, and where that was. Probably because most people writing the tutorials are already data scientists who have worked with R and RStudio etc, so they didn’t know those dependencies were baked in! Using ChatGPT helped me be able to put in every error message or every place I got stuck, and it coached me through each spot (with no judgment or impatience). It was great!

I was then able to continue with the other steps of getting my data transformed, into the notebook, running the code, and generating my first ever box and whisker plot with R!

A box and whisker plot, illustrated simply to show that I used R and Jupyter finally successfully!

This is where I really saw the power of these tools, reducing the friction of trying something new (a tool, a piece of software, a new method, a new language, etc.) and helping you troubleshoot patiently step by step.

Does it sometimes skip steps or give you solutions that don’t work? Yes. But it’s still a LOT faster than manually debugging, trying to find someone to help, or spending hours in a search engine or Stack Overflow trying to translate generic code/advice/solutions into something that works on your setup. The beauty of these tools is you can simply paste in the error message and it goes “oh, sorry, try this to solve that error”.

Because the barrier to entry is so low (compared to before), I’ve also asked it to help me with other project ideas where I previously didn’t want to spend the time needed to learn new software and languages and all the nuances of getting from start to end of a project.

Such as, building an iOS app by myself.

I have a ton of projects where I want to temporarily track certain types of data for a short period of time. My fall back is usually a spreadsheet on my phone, but it’s not always easy to quickly enter data on a spreadsheet on your phone, even if you set up a template with a drop down menu like I’ve done in the past (for my DIY macronutrient tool, for example). For example, I want to see if there’s a correlation in my blood pressure at different times and patterns of inflammation in my eyelid and heart rate symptoms (which are symptoms, for me, of thyroid antibodies being out of range, due to Graves’ disease). That means I need to track my symptom data, but also now some blood pressure data. I want to be able to put these datasets together easily, which I can, but the hardest part (so to speak) is finding a way that I am willing to record my blood pressure data. I don’t want to use an existing BP tracking app, and I don’t want a connected BP monitor, and I don’t want to use Apple Health. (Yes, I’m picky!)

I decided to ask ChatGPT to help me accomplish this. I told it:

“You’re an AI programming assistant. Help me write a basic iOS app using Swift UI. The goal is a simple blood pressure tracking app. I want the user interface to default to the data entry screen where there should be three boxes to take the systolic, diastolic blood pressure numbers and also the pulse. There should also be selection boxes to indicate whether the BP was taken sitting up or laying down. Also, enable the selection of a section of symptom check boxes that include “HR feeling” and “Eyes”. Once entered on this screen, the data should save to a google spreadsheet.” 

This is a completely custom, DIY, n of 1 app. I don’t care about it working for anyone else, I simply want to be able to enter my blood pressure, pulse, whether I’m sitting or laying down, and the two specific, unique to me symptoms I’m trying to analyze alongside the BP data.

And it helped me build this! It taught me how to set up a new SwiftUI project in XCode, gave me code for the user interface, how to set up an API with Google Sheets, write code to save the data to Sheets, and get the app to run.

(I am still debugging the connection to Google Sheets, so in the interim I changed my mind and had it create another screen to display the stored data then enable it to email me a CSV file, because it’s so easy to write scripts or formulas to take data from two sources and append it together!)

Is it fancy? No. Am I going to try to distribute it? No. It’s meeting a custom need to enable me to collect specific data super easily over a short period of time in a way that my previous tools did not enable.

Here’s a preview of my custom app running in a simulator phone:

Simulator iphone with a basic iOS app that intakes BP, pulse, buttons for indicating whether BP was taken sitting or laying down; and toggles for key symptoms (in my case HR feeling or eyes), and a purple save button.

I did this in a few hours, rather than taking days or weeks. And now, the barrier to entry to creating more custom iOS is reduced, because now I’m more comfortable working with XCode and the file structures and what it takes to build and deploy an app! Sure, again, I could have learned to do this in other ways, but the learning curve is drastically shortened and it takes away most of the ‘getting started’ friction.

That’s the theme across all of these projects:

  • Barriers to entry are lower and it’s easier to get started
  • It’s easier to try things, even if they flop
  • There’s a quicker learning curve on new tools, technologies and languages
  • You get customized support and troubleshooting without having to translate through as many generic placeholders

PS – speaking of iOS apps, based on building this one simple app I had the confidence to try building a really complex, novel app that has never existed in the world before! It’s for people with exocrine pancreatic insufficiency like me who want to log pancreatic enzyme replacement therapy (PERT) dosing and improve their outcomes – check out PERT Pilot and how I built it here.

4. Notes about what these tools cost

I found ChatGPT useful for writing projects in terms of getting started, even though the content wasn’t that great (on GPT-3.5, too). Then they came out with GPT-4 and made a ChatGPT Pro option for $20/month. I didn’t think it was worth it and resisted it. Then I finally decided to try it, because some of the more sophisticated use cases I wanted to use it for required a longer context window, and in addition to a better model it also gave you a longer context window. I paid the first $20 assuming I’d want to cancel it by the end of the month.

Nope.

The $20 has been worth it on every single project that I’ve used it for. I’ve easily saved 5x that on most projects in terms of reducing the energy needed to start a project, whether it was writing or developing code. It has saved 10x that in time cost recouped from debugging new code and tools.

GPT-4 does have caps, though, so even with the $20/month, you can only do 25 messages every 3 hours. I try to be cognizant of which projects I default to using GPT-3.5 on (unlimited) versus saving the more sophisticated projects for my GPT-4 quota.

For example, I saw a new tool someone had built called “AutoResearcher”, downloaded it, and tried to use it. I ran into a bug and pasted the error into GPT-3.5 and got help figuring out where the problem was. Then I decided I wanted to add a feature to output to a text file, and it helped me quickly edit the code to do that, and I PR’ed it back in and it was accepted (woohoo) and now everyone using that tool can use that feature. That was pretty simple and I was able to use GPT-3.5 for that. But sometimes, when I need a larger context window for a more sophisticated or content-heavy project, I start with GPT-4. When I run into the cap, it tells me when my next window opens up (3 hours after I started using it), and I usually have an hour or two until then. I can open a new chat on GPT-3.5 (without the same context) and try to do things there; switch to another project; or come back at the time it says to continue using GPT-4 on that context/setup.

Why the limit? Because it’s a more expensive model. So you have a tradeoff between paying more and having a limit on how much you can use it, because of the cost to the company.

—–

TLDR:

Most important note: LLMs don’t “think” or “know” things the way humans do. They output language they predict you want to see, based on its training and the inputs you give it. It’s like the autocomplete of a sentence in your email, but more words on a wider range of topics!

Also, the LLM can’t do math. But they can write code. Including code to do math.

(Some, but not all, LLMs have access to the internet to look up or incorporate facts; make sure you know which LLM you are using and whether it has this feature or not.)

Ways to get started:

    1. The most frequent way I use these AI tools is for getting started on a project, especially those related to writing.
      • Ask it to help you expand on notes; write summaries of existing content; or write sections of content based on instructions you give it
    2.  It can also help analyze data (caution alert!) if you understand the limitations of the LLM.
      • The most effective way to work with data is to have it tell you how to run things in analytical software, whether that’s how to use R or a spreadsheet or other software for data analysis. Remember the LLM can’t do math, but it can write code so you can then do the math!
    3.  You can get an LLM to teach you how to use new tools, solve problems, and lower the barrier to entry (and friction) on using new tools, languages, and software.
      • Build a new habit of asking it “Can I do X” or “Is it possible to do Y” and when it says it’s possible, give it a try! Tell it to give you step-by-step instructions. Tell it where you get stuck. Give it your error messages or where you get lost and have it coach you through the process. 

What’s been your favorite way to use an LLM? I’d love to know other ways I should be using them, so please drop a comment with your favorite projects/ways of using them!

Personally, the latest project that I built with an LLM has been PERT Pilot!

How I use LLMs (like ChatGPT) and tips for getting started

How To Dose Pancreatic Enzyme Replacement Therapy (PERT) By What You Are Eating – And A Free Web Calculator To Calculate Enzyme Dosing

PS – check out PERT Pilot, the first iOS app for Exocrine Pancreatic Insufficiency! It’s an iOS app that allows you to record as many meals as you want, the PERT dosing and outcomes, to help you visualize and review more of your PERT dosing data!

I’ve had exocrine pancreatic insufficiency (known as EPI or PEI) for a year now. I have had type 1 diabetes for 20+ years and am experienced in adjusting my medication (previously insulin) in response to everything that I eat or drink.

With EPI, though, most people are given a static prescription, such as one saying “take 3 pills with each meal”.

Well, what if every meal is not the same size?

Let’s think about a couple of hypothetical meals.

Meal A: Baked chicken, sweet potato, and broccoli. This meal likely results in ~31 grams of carbohydrates; 7 grams of fat; and ~30 grams of protein.

How would you dose for this meal? Most people do what they are told and dose based on the fat content of the meal. If they typically take 3 pills, they may take all 3 pills or take fewer pills if this is less fat than their typical meal.

Many people post in EPI social media groups post about restaurant dinners that sound like this complaining about side effects they experience with this type of meal. The commonly mentioned theory is that maybe the chicken is cooked in oil. However, the entire meal is so low in fat compared to other meals that it is unlikely to be the fat content causing symptoms if the typical meal dose of PERT is used, even if the chicken is cooked in oil.

Let’s discuss another meal.

Meal B: A bowl of chili topped with cheddar cheese and a piece of cornbread.

This meal results in ~45 grams of carbs; ~30 grams of fat; and ~42 grams of protein.

The fat content between these two meals is quite a bit different (7 grams of fat versus 30 grams of fat). Yet, again, most people are told simply to dose by the amount of fat, so someone might take a lower dose for the chicken meal because it has so little fat relative to other meals.

This could result in symptoms, though. The pancreas actually produces THREE kinds of enzymes. That’s why pancreatic enzyme replacement therapy medicine, called pancrelipase as a common name, has THREE types of enzymes: lipase, to help digest fat; protease, to help digest protein; and amylase, to help digest carbohydrates. A typical PERT pill has different amounts of these three enzymes, although it is usually described by the size/quantity of lipase it has – yet the other enzymes still play an important role in digestion.

I’ve observed that it’s pretty common for people to completely ignore the protein in what they’re eating. But as I mentioned, that seems to be the most obvious thing to try dosing for if “low fat” meals are causing issues. (It could also be sensitivity to carbohydrates, but the above example meal is fairly low carbohydrate.) My personal experience has also been that I am sensitive to fat and protein, and dose my meals based on these macronutrients, but other than eating fruit on an empty stomach (when I would add PERT/enzyme, despite the zero fat and protein in it), I don’t need to dose based on carbohydrates.

But I do need to dose for BOTH fat AND protein in what I’m eating. And I have a theory that a lot of other people with EPI do, too.

So how do you do this?

How do you dose for meals of different sizes, and take into account both fat and protein for these varying meals?

First, you need to figure out what dosing “works” for you and begin to estimate some “ratios” that you can use.

Most people begin experimenting and find a quantity of food that they can eat with the dose that they typically take. This meal size is going to vary person to person; it’ll also vary based on what it is in the meal they’re eating (such as chicken vs chili, from the above examples).

Once you find a dose that “works” and try it out a few times on the same meal, you can use this to determine what your ratios/dosing should be.

How?

Let’s use two examples with different dose sizes and types of PERT.

(PS – did you know there are 6 FDA-approved PERT brands in the US? Sometimes one works for someone where a different brand does not. If you’re struggling with the first type of PERT you’ve been prescribed, and you’ve already ruled out that you’re dosing correctly (see below), make sure to talk to your doctor and ask about trying a different brand.)

First, let’s calculate the ratios of lipase needed per gram of fat.

Let’s say the meal that “works” with your typical dose is 30 grams of fat. If 30 grams of fat is fine on your current dose, I would eat another meal with a slightly higher amount of fat (such as 35 or 40 grams of fat). When you get to an amount that “doesn’t work” – meaning you get symptoms – then you go back to the dose that does “work” to use in the math.

If the meal that “worked” was 30 grams of fat I would do the following math for each of these two examples:

Example A: You need 1 pill of Zenpep 25,000 to cover this meal

Example B: You need 3 pills of Creon 36,000 to cover this meal

Example A: 1 pill of Zenpep 25,000 is 1 multiplied by 25,000, or 25,000 units of lipase. Take that (25,000) and divide it by the grams of fat in the meal that works (30 grams). This would be 25,000/30 = 833. This means you need 833 units of lipase to “cover” 1 gram of fat. You can round up to ~1000 units of lipase to make it easier; your ratio would be 1000 units of lipase for every 1 gram of fat.

Example B: 3 pills of Creon 36,000 is 3 multiplied by 36,000, which is 108,000 units of lipase. Take that number (108,000) and divide it by the grams of fat in the meal that works (30 grams). This would be 108,000/30 = 3,600. This means you need 3,600 units of lipase to “cover” 1 gram of fat.

The next time you wanted to eat a meal, you would look at the grams of fat in a meal.

Let’s say you’re going to eat two bowls of chili and two pieces of cornbread. Let’s assume that is about 64 grams of fat. (Two bowls of chili and two cornbread is 30×2=60, plus a bit of butter for the cornbread so we’re calling it 64 grams of fat).

Example A: Take the meal and multiply it by your ratio. 64 (grams of fat) x 1,000 (how many units of lipase you need to cover 1 grant of fat) = 64,000. A Zenpep 25,000 has 25,000 lipase. Since you need 64,000 (units of lipase needed to cover the meal), you would divide it by your pill/dose size of 25,000. 64,000 divided by 25,000 is 2.56. That means for these ratios and a prescription of Zenpep 25,000 pill size, you need *3* Zenpep 25,000 to cover a meal of 64g of fat. (Remember, you can’t cut a PERT, so you have to round up to the next pill size.)

Example B: Take the meal and multiply it by your ratio. 64 (grams of fat) times 3,600 (how many units of lipase you need to cover 1 grant of fat) = 230,400. A Creon 36,000 has 36,000 lipase. Since you need 230,400 units of lipase to cover the meal, you would divide it by your pill/dose size of 36,000. 230,400 divided by 36,000 is 6.4. This means you need *7* Creon 36,000 to cover a meal of 64g of fat. (Again, you can’t cut a PERT, so you have to round up to 7 from 6.4.)

Another way to think about this and make it easier in the future is to determine how much one pill “covers”.

Example A: A Zenpep 25,000 “covers” 25 grams of fat if my ratio is 1000 units of lipase for every gram of fat (25,000/1000=25).

So if a meal is under 25g of fat? 1 pill. A meal under 50g (25×2)? 2 pills. 75g (25×3)? 3 pills. And so on. Once you know what a pill “covers”, it’s a little easier; you can simply assess whether a meal is above/below your pill size of 1 (25g), 2 (50g), 3 (75g) etc.

Example B: A Creon 36,000 “covers” 10 grams of fat if my ratio is 3,600 units of lipase for every gram of fat (36,000/3600=10).

So if a meal is under 10 grams of fat? 1 pill. 20 grams of fat is 2 pills (10×2); 30 grams of fat is 3 pills (10×3); etc.

When people with EPI share experiences online, they often describe their dose size (such as 1 x 25,000 or 3 x 36,000 like examples A and B above) for most meals, but the meal size and composition is rarely discussed.

Personally, I can eat pretty widely varying amounts of fat in each meal on a day to day basis.

That’s why, instead of a flat dosing that works for everything (because I would be taking a LOT of pills at every meal if I was trying to take enough to cover my highest fat meals every time), I have found it to be more effective to estimate each meal to determine my meal dosing.

Remember that meal estimates aren’t very precise. If you use a nutrition panel on a box serving, the serving size can vary a bit. Restaurants (especially chains) have nutrition information, but the serving size can vary. So recognize that if you are calculating or estimating 59 grams of fat and that means either 2 vs 3 pills or 6 vs 7 pills, that you should use your judgment on whether you want to round up to the next pill number – or not.

Let’s put the hypothetical meals side by side and compare dosing with examples A and B from above:

Example of how much PERT is needed for two different meals based on dose ratios from Examples A and B

Using the previous meal examples with either 7 or 30 grams of fat:

  • With Example A (ratio of 25g of fat for every 1 pill, or 1000 units of lipase to cover 1 gram of fat), we would need 1 pill for the chicken meal and 2 for the chili meal. Why? The chili is >25 grams of fat which means we need to round up to 2 pills.
  • With Example B (ratio of 10 grams of fat for every 1 pill or 3600 units of lipase to cover 1 gram of fat), we would need 1 pill to cover the chicken (because it’s less than 10 grams of fat) and 3 – or more – pills for the chili. Why “or more”? Well, something like chili is likely to be imprecisely counted – and if you’re like me, you’d want a bit of extra cheese, so chances are I would round up to a 4th pill here to take in the imprecision of the measurements of the ingredients.

PERT Dosing for Protein

Wait, didn’t you say something about protein?

Yes, I did. Fat isn’t the only determinant in this math!

I do the same type of math with grams of protein and units of protease. (Remember, PERT has all 3 types of enzymes, even though it is labeled by the amount of lipase. You can look online or on the bottle label to see how much protease is in your PERT.)

For our examples, Zenpep 25,000 contains 85,000 units of protease. Creon 36,000 contains 114,000 units of protease.

For the meal that ‘worked’ of 30 grams of fat, we also want to know the protein that worked. For easy math, let’s also say 30 grams of protein is in this meal.

Following the same math as before:

Example A (Zenpep 25,000): 30 grams of protein divided by 1×85,000 units of protease is ~2,833 units of protease to every 1 gram of protein. Again, I like to think about how much 1 pill “covers” protein-wise. In this case, 1 Zenpep 25,000 “covers” 30 grams of protein.

Example B (Creon 36,000): 30 grams of protein divided into 3 x 114,000 units of protease is 11,400 units of protease per gram of protein. Again, I like to think about how much 1 pill “covers” protein-wise as well. In this case, 1 Creon 36,000 “covers” 10 grams of protein.

Here’s how many pills are needed for protein:

Example of how much PERT is needed for two different meals based on dose ratios from Examples A and B, showing both protein and fat quantities

  • With Example A (ratio of 30g of protein for every 1 pill), we would need 1 pill for the chicken meal and 2 for the chili meal. Why? The chili is 42, which is greater than (30×1) grams of protein which means we need to round up to 2 pills.
  • With Example B (ratio of 10 grams of protein for every 1 pill), we would need 3 or more pills to cover the chicken. Why 3 or more? Again, it’s on the top edge of what 3 pills would cover, so I’d be likely to round up to 4 pills here. For the chili, 5 pills are needed (42 is more than 4 x 10 and is less than 5 x 10).

So how do you decide the number of pills to take for these meals? Let’s go back to our two example meals and compare the amount needed, pill-wise, for both fat and protein for each meal and each example.

Example of how much PERT is needed for two different meals based on dose ratios from Examples A and B and comparing the number of pills for fat and protein

When the pill numbers MATCH (e.g. the same number needed for fat and protein), which is the case for both examples with Zenpep 25,000, it’s easy: take that number of pills total! For Zenpep 25,000, I would take 1 pill for the Chicken (1 fat | 1 protein); and I would take 2 pills for the Chili (2 fat | 2 protein). Remember that PERT pills contain all three enzymes, so the fat and protein are sufficiently *each* covered by the quantities of lipase and protease in this pill type.

When the pill numbers are DIFFERENT between your fat and protein estimates, you use the LARGER number of pills. For Creon 36,000, with the chicken meal the protein quantity is much larger than the fat quantity; I would in this case dose 4 total pills (1 fat | 4 protein), which would then cover the protein in this meal and would also sufficiently cover the amount of fat in this meal. For the chili meal, it is closer: I estimated needing 4 pills for fat and 5 for protein; in this case, I would take 5 total pills which would then successfully cover the protein and the fat in the meal.

If you find the math challenging to do, don’t worry: once you determine your ratios and figure out how much one pill “covers”, it gets a lot easier.

And I made a few tools to help you!

Check out this free enzyme calculator which does the math to determine the ratios on exactly how much one pill “covers” for your successful meal.

(The calculator is for entering one meal at a time, and doesn’t save them, but if you’d like AI to estimate what is in your meal and help you log and save multiple meals, check out PERT Pilot if you have an iPhone.)

Here’s what it looks like using the two examples above:

Example of Part 1 of the EPI Enzyme Calculator using Zenpep 25,000, where 1 pill covers 30 grams of fat and 30 grams of protein. Example of Part 1 of the EPI Enzyme Calculator using Creon 36,000, where 3 pills covers 30 grams of fat and 30 grams of protein.

You can input your meal that “works”, what your dose is that “works” (the number of pills and pill type), and it will share what your ratios are and what one pill “covers”.

You can also use the second part of the calculator to estimate the amount you need for a future meal! Say it’s coming up on a holiday and you’re going to eat a much larger meal than you normally do.

You can input into the calculator that you’ll be eating 90 grams of fat and 75 grams of protein.

Here’s the example with our dose from Example A (Zenpep 25,000):

Example of Part 2 of the EPI Enzyme Calculator using Zenpep 25,000, with a future larger meal of 90 grams of fat and 75 grams of protein.

Here’s the example large meal with our dose from Example B (Creon 36,000):

Example of Part 2 of the EPI Enzyme Calculator using Creon 36,000, with a future larger meal of 90 grams of fat and 75 grams of protein.

You can also hit the button to expand the calculations to see the math it is doing, and how it compares between the fat and protein pill estimates to see what “drives” the total number of pills needed.

You can also hit the button to expand the calculations to see the math it is doing, and how it compares between the fat and protein pill estimates to see what “drives” the total number of pills needed, with the calculation view expanded to show all the details

You can even download a PDF with this math to have on hand. Here’s what the PDF download looks like for Example B (Creon 36,000):

Example of a PDF print view of the same data from previous screenshots with a Creon 36000 example

Switching dose sizes or PERT brand types

This calculator can also be useful if you were originally prescribed a smaller quantity of PERT (e.g. Creon 3000 or Zenpep 3000) and you find yourself taking many numbers of these pills (6 or more) to cover a small meal for you, let alone more pills for a larger meal.

You can input this into the calculator and get your ratios; then in the second part, identify a different pill size, to see how many numbers of pills you’d take on a different dose.

Example switching from one size of PERT pill to another size

You can also use it to help you understand how much you might need if you are switching between brands. Let’s say you were prescribed Zenpep 25,000 and you need to try Creon, either because you don’t think Zenpep works well for you or your insurance is more willing to cover the Creon brand.

You would use the top part of the calculator with your current brand and size (e.g. Zenpep 25,000 of which you take 6 for a standard meal of 30 grams of fat and 30 grams of protein) and then input the new brand and size and the same size meal (e.g. Creon 36,000 and another 30 grams of fat and 30 grams of protein meal) to see that you’d likely need 5 Creon 36,000 to match the 6 Zenpep 25,000 you were taking for a standard size (30 gram of fat and 30 gram of protein) meal.

Example of using the calculator to estimate the different number of pills for a different brand and size of PERT pill

Note: I’m not suggesting 30 grams of fat and protein at each meal is “standard” or the “right” size of the meal – I picked arbitrary numbers here to illustrate these examples, so make sure to include the meal that your PERT dosing successfully covers for YOU!

As a reminder, I’m not a doctor – I’m a person living with EPI. None of this is medical advice. I use this math and this calculator for my own personal use and share it in case it’s helpful to others. If you have questions, please do talk to your doctor. If you’re still experiencing symptoms with your enzyme dosing, you definitely should talk with your doctor. Your prescription size might need updating compared to what you were originally prescribed.

Also, please note that the calculator is open source; you can find the code here, and I welcome contributions (pull requests) and suggestions! You can leave feedback on Github or share feedback in this form. For example, if you’re using a different type of enzyme not listed in the calculator (currently 2/6 of the US FDA-approved versions are listed), please let me know and I can work to add the relevant list.

PS – You can find my other posts about EPI at DIYPS.org/EPI, and you can also check out PERT Pilot, the first iOS app for Exocrine Pancreatic Insufficiency! It’s an iOS app that allows you to record as many meals as you want, the PERT dosing and outcomes, to help you visualize and review more of your PERT dosing data!


You can also contribute to a research study and help us learn more about EPI/PEI – take this anonymous survey to share your experiences with EPI-related symptoms!