Asking AI About Lowering Healthcare Costs in the US

How AI can help with Strategic Planning

Dan McCreary
6 min readOct 19, 2023
The result of asking ChatGPT Advanced Data Analytics to compare World Bank life expectancy and annual per capita cost data for various countries worldwide. Image by ChatGPT with my annotation.

One of my favorite demos is to show people how generative AI can help analyze data, find anomalies in data, explain why these anomalies exist, look for root causes, and then suggest a strategy. Here is a transcript of a session I did with ChatGPT in August when their “Code Interpreter” (now called Advanced Data Analytics) first came out. All these chats use the GPT-4 model.

In this blog, I will summarize the chat, explain how ChatGPT might be working, and suggest ways that users can try these activities themselves to learn more about how generative AI works and how good prompt design can help you get more value out of these systems.

Note that I never actually opened the data files or wrote a single line of Python code during the 12-minute demo! I just simulated a person curious about how integrated knowledge graphs could lower our cost of healthcare in the US. You will agree that ChatGPT supports our arguments that siloed data prevents us from implementing lower-cost, Value-Based Care.

You can find the full text of the transcript here, but note that I had to do a bit of prompt engineering to get the correct answers out of ChatGPT. Unfortunately, the transcript does not include any images generated by the session. This is a deficiency in the current implementation of ChatGPT shared transcripts, and I hope they will fix it soon. I have copied the images in this blog.

Getting World Bank Data

I started just grabbing two files from the World Bank’s website. One file contained life expectancy data for all the countries of the world. The other file contains per capita healthcare costs. I then uploaded them to ChatGPT and asked it to build a data dictionary for me for each of the files.

Back in August, ChatGPT allowed us to upload data files. My prompt was “Create a data dictionary” for this file. The image was a screenshot of ChatGPT.

I did the same for the World Bank's annual per capita cost data. For each of the data sets, ChatGPT created a small Python program to create a data profile. When it didn’t see the metadata in the first row, it had to retry to find out that the column descriptions were in another row further down the file:

ChatGPT is starting to analyze the World Bank data on life expectancy. It takes it a few tries before it finds the metadata on the fifth line. The image was a screen image from ChatGPT.

You can see that ChatGPT was generating the data profiling code and analyzing the result of the data profile before it took the next action. Although I can’t prove it, I suspect that it is creating embeddings for each response and then looking for a nearby Python script based on the location in the embedding space.

Plotting Life Expectancy vs. Annual Per Capita Costs

Next, I asked ChatGPT to create a two-dimensional plot comparing each country's life expectancy and costs. If you read the full transcript, I also had to ensure ChatGPT went back to 2020 for some countries to get a complete dataset since many countries didn’t have data for 2021 and 2022 yet.

Please create a 2D scatter plot. Place the life expectancy on the vertical axis. Place the healthcare cost on the horizontal axis. For each country place a point on the plot and label the name of the country. Exclude any data for continents.

Now, we compare the data sets for life expectancy and costs. The image is a screen image from ChatGPT.

The results of this query are in the image at the top of the blog. I had to add a big red arrow so you didn’t miss the United States in the lower-right-hand corner. Here is a version of this chart that has been modified to move the labels around so they are more legible.

This chart uses some hand placement of country labels to make it easier to read. It is also updated to use 2022 or the latest data. Note that the “USA” is on the far right. This chart used WDI and OECD data—an image from the Forensiceconomics post on Reddit.

Looking for Anomalies

Now that we can view the dataset in a 2D scatterplot, we can start to ask ChatGPT to analyze the data. One obvious question is to ask it to find anomalies in the data set.

Asking ChatGPT to find anomalies in a dataset. Image from ChatGPT

The summary is that the United States stands out as an anomaly:

In conclusion, based on the visual inspection, the United States is the country that stands out from the rest in terms of healthcare costs relative to its life expectancy.

Root Cause Analysis

Now let’s ask ChatGPT to explain this anomaly. I phrase the question specifically to ask for the underlying causes:

Can you suggest any underlying causes why the cost of healthcare is so high in the United States?

A root cause analysis question about the data anomalies. Image from ChatGPT.

We can see that ChatGPT has given us 11 ideas about why the US had higher cost of healthcare. But how do we fix these things? Let’s keep asking questions.

Using ChatGPT to look for Solutions

Here is the prompt that I used:

What are some ways that the United States could lower healthcare costs?

The first 13 ways that ChatGPT thinks we can lower healthcare costs in the US. See the transcript link for all 16 suggestions—image from ChatGPT.

So many ideas! Let’s focus on just item 7: Value-Based Care (VBC).

Focus on Value-Based Care

Value-Based Care (VBC) is the process of reimbursing healthcare providers based on cost-effective outcomes, not based on how many expensive tests they request or expensive procedures done. Here is my next prompt:

I like the idea of moving towards a Value-Based Care system. What are some of the key challenges to moving from a fee-for-services model to a value-based care model?

ChatGPT has a detailed understanding of the barriers to implementing value-based care systems in healthcare—image from ChatGPT.

How Can Integrated Knowledge Graph Technology Help Lower the Cost of Healthcare?

There are many technologies available to us today. But front and center is the lack of our new AI-powered agents to access high-quality connected data. Can ChatGPT suggest how we can proceed?

Right now healthcare data is highly fragmented and siloed. How could a value-based care system be implemented if all healthcare data were stored in a single high-quality knowledge graph?


From this transcript, we can see there would be many benefits to healthcare if we could leverage the power of knowledge graphs to power our AI agents. ChatGPT did a great job of moving from one question to the next and kept in mind that many of our costs of healthcare are related to the lack of data flowing into our analytical system. This is a reflection that ChatGPT can use the entire context of the chat to predict the next word.

The United States is in a difficult position today. Other countries have managed to keep their healthcare costs low. Costa Rica has an annual per capita cost of about $1,800. And their life expectancy is six years longer than in the US. In the US, the annual per capita cost year is over $12,000.

International companies often say they can’t afford to hire employees in the US because their healthcare costs are too high. These inefficiencies start to become like sand in the gears of our systems. They erode our international competitiveness and suppress our innovation and growth.

Don’t take everything ChatGPT says too seriously. This is a fun exercise to help you see how we can combine data analysis with ChatGPT's concept knowledge to get another viewpoint for strategic planning sessions.

Do you think that AI and knowledge graphs will play a key role in lowering the cost of healthcare in the US and around the world? Contact me on my LinkedIn profile to continue this discussion.



Dan McCreary

Distinguished Engineer that loves knowledge graphs, AI, and Systems Thinking. Fan of STEM, microcontrollers, robotics, PKGs, and the AI Racing League.