ChatGPT¶
What is ChatGPT?¶
You might remember the day back in Novemeber 2022 when our data world, as we knew it, changed. News headlines appeared announcing the launch of ChatGPT, a generative artificial intelligence chatbot developed by OpenAI.
ChatGPT Interface¶
How does ChatGPT work?¶
To use CHatGPT, create an account, and let's dive into some conservation examples!
What prompts should I use?¶
As a "Generative Pre-Trained Transformer" (the GPT part of ChatGPT), the more specific your prompt, the better.
For example, the New York Times wrote about an example where ChatGPT outperformed doctors at diagnosing illness because ChatGPT used entire patient histories. https://www.nytimes.com/2024/11/17/health/chatgpt-ai-doctors-diagnosis.html
Like in medicine, what if you want to use ecological data to make an important conservation decision?
This introduces the importance of how you use prompts in large language models.
Some examples¶
-
Poor:
-
Better:
Prompt Guides¶
Check out these guides for promting large language models:
Prompt engineering overview: https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview
Prompt engineering: https://platform.openai.com/docs/guides/prompt-engineering
Environmental Example¶
Extracting Water Rights from 100s of pdfs
Imagine you're a scientist in California who needs to create a data set on water quality rights. You've downloaded pdfs from the eWRIMS Database. But alas, all of the information you need are in the scanned pages of long pdfs. How do you quickly extract this information without it taking all day (or week) to do manually? Let's use ChatGPT to help us.
There are multiple ways to go about this, but let's look at a summary of one pdf. This can help with a general overview of the content:
There are more details ChatGPT spits out too.
Next, let's make an output file of important inofrmation:
Now, let's further refine the output to give more specifics that we want:
Hooray! We have the columns we need. Now, you have a framework to use to extract this information from all your other pdfs.
Eventually, you may run into this error with a free account and uploads, which is a limitation.
Instead of uploading pdfs, you may want to give ChatGPT all of the links to the documents instead.
Note that ChatGPT may be wrong!
For example strawberry actually has 3 letters, not 2!
See how this output compares with DeepSeek on our other example tab.
It's always good to validtate the output. In the example above, you may want to manually check pdf inputs along the way and refine your prompts accordingly. Play around with your prompts, and harness the power of large language models for good. Happy prompting!