Getting Started with Generative AI
About this guide
This guide is intended to help get you started using generative AI at UVA. It is intended to be a brief introduction for the curious. If you're looking for a comprehensive introduction to Generative AI, the UVA Library has prepared an excellent LibGuide on the topic. (Read the "What is Generative AI?" LibGuide.)
In this guide we primarily explore UVA's officially supported GenAI, Microsoft Copilot. We will also look at OpenAI's ChatGPT-4o, which is freely available. (Both AIs are using the same system "under the hood".)
For additional information about AI at UVA, we encourage you to visit the following sites:
- Guidance for faculty and students about the appropriate uses of this technology in teaching and learning (Provost's Office)
- CTE resources for teaching with AI
- ITS Generative AI Tools.
Information Security
Please note: the only officially supported GenAI at UVA is Microsoft Copilot. When using this AI, your data will be protected from Microsoft; they will not use it to train their Large Language Model. Even with this protection, we encourage you to be careful with sensitive data.
If you use a different GenAI tool, such as ChatGPT, Claude, or Gemini, any information you give the AI could potentially be used to train its model. Therefore any copyrighted material or sensitive data would not be protected. Use appropriate caution with outside, unofficial tools, and please relay the same information to your students.
Foundational Ideas
While this is mostly a "nuts and bolts" guide to getting started, we are building upon these foundational ideas of how to use generative AI:
- There always needs to be a "human in the loop"
-
AIs are not replacements for humans. They are trustworthy on some topics, but much less trustworthy on others. We need to verify the information they give.
- Generative AI is not a web search
-
While the AIs can search the web and include results, they are mostly drawing on information they have "read" (billions and billions of words, e.g. all of wikipedia) They generate a new response every time instead of giving a list of relevant links.
- You are conversing with the AI, not just asking it questions
-
You may have heard of "prompt engineering" or "prompt writing" -- these are tips and tricks to getting good responses, but there is no "magic prompt" Instead you need to imagine your interaction as a conversation, and do as you would when conversing:
- Ask for clarification
- Ask to explain at different levels of expertise and technicality
- Ask for different metaphors
- We are all participating in the discovery of AIs
-
- There is no instruction manual, and "experts" are only a few steps ahead of the rest of us
- The people who built the AIs understand how they were trained, but can't anticipate what the AIs will say
- By experimenting with AIs, you are helping to discover and understand them
Data privacy and copyright concerns
Please be aware that, by default, these platforms collect any information you give them to help them improve their language model. UVA is considering options to provide access to Gen AI tools with attention to data privacy concerns. (Read more from the Provost's Office here: Guidance for faculty and students about the appropriate uses of this technology in teaching and learning)
You can individually opt out of giving ChatGPT your data by following these directions: How do I turn off chat history and model training?
You should not give the AIs any student data, your personal data, nor copyrighted material.
Other ethical concerns
- AI and job threat
-
The time of the Ford Model T was not a great time for those in the horse and buggy industry. This is not a perfect analogy for GenAI, since AIs potentially affect every profession in some way. We all need to be mindful and attentive of ways to use GenAI to improve living conditions, not just improve shareholder value for GenAI companies.
- AI and resource use
-
GenAIs use significant amounts of electricity and water. A good approximation is that asking a GenAI for a solution is about five times as "expensive" as a web search. It takes some practice and intuition to know when a GenAI will be "worth" five web searches to get better information.
- AI and personal trust
-
As we all start to use GenAI, there is a possibility that personal trust will erode if we suspect we are not talking to another person, but to a bot that person has set up (or used to write an email, for example). It will be important to use GenAI mindfully and err on the side of disclosure.
- AI and creative theft
-
GenAIs have been trained by gobbling up information on the internet indiscriminately. This means they are able to copy the style of any human whose work is publicly available in any form on the internet. It is an open debate (with many active lawsuits) whether the GenAI companies had the right to do this. As users we must endeavor not to use AIs to create forgeries.
- AI and the AI apocalypse
-
GenAIs are startling in how much they seem like science fiction. In a large percentage of science fiction, human reliance on AIs doesn't end well. We must endeavor to collectively put guard rails on the use of AI so as to not leave important ethical decisions up to algorithms.
- AI and bias
-
AIs are trained on human creations. Humans have biases. AIs therefore also have biases. We must be aware of these biases and not trust AIs as impartial or objective.
AIs at a glance + using AI at UVA
While there are hundreds of different AIs, we have limited the scope of this document to two AIs: UVA's official AI partnership with Microsoft via Copilot, and ChatGPT-4o, which uses a similar system
Cost: these are all free.
NOTE: This information is accurate as of 5-21-2024. We encourage you to seek out news regarding new and improving AIs, as the technology is changing rapidly.
- Text / Code Generators at a Glance
-
Model Description Account Information OpenAI ChatGPT 3.5 The original ChatGPT-- now obsolete OpenAI ChatGPT 4o The newest ChatGPT-- free to use Create an account on OpenAI.com (NOTE: you will need a unique cell phone number to register an account) Microsoft Copilot Copilot uses a Microsoft "flavored" version of ChatGPT You can also log in directly via https://copilot.microsoft.com
- Image Generators at a Glance
-
Model Description Account Information OpenAI Dall-E 3 The image generator used by ChatGPT Connected to your ChatGPT account Microsoft Copilot Image Generation Same as Dall-E 3, but Microsoft "flavored" You get 15 image generations a day with your UVA Microsoft account Google Imagen Google's answer to Dall-E Sign up using an existing gmail account or create a new one Midjourney A image generation AI available only through Discord, requiring a subscription. We only recommend Midjourney to the very curious, as it is a bit more complicated to use. Those who would like to try should follow the guide on this page: https://docs.midjourney.com/
Prompts for Interacting with Text Generation AIs
A prompt consists of the information you provide to an AI to guide its response. Think of it as an entry point to a conversation with AI. There is no wrong way to interact with a generative text AI; we encourage you to experiment and see what it does.
NOTE: we are using ChatGPT 4 for these prompts, but we encourage you to try these out with each tool to see how they compare.
- Giving the AI a role
-
Here we tell the AI what role it will have, what language to use, and the style we would like. In this case we are asking it to be a tutor, which might be a way students might use the tool.
- Continuing the conversation...
-
Digging Deeper
Here we ask ChatGPT to explain further. As noted in the Foundational Idea at the start of this document (You are conversing with the AI, not just asking it questions), we are not looking for a "magic prompt", but instead conversing naturally as we might with a human tutor.
... and deeper
Too deep!
You can see that the AI keeps track of its responses, and can adjust based on your requests. While this example uses math concepts, we encourage you to try with concepts specific to your discipline.
- Generating ideas
-
Here we ask for paper topics that could help guide the design of an assignment for a philosophy class. AIs can be useful brainstorming tools to quickly generate lists of ideas and topics, which might be useful in-and-of themselves, or might spark a different idea.
- Reformatting text
-
Generative text AIs can help with common reformatting tasks. For instance, here we asked it to give us Billy Joel's "We Didn't Start the Fire" as a bulleted list.
Interestingly, it realized about halfway through that it was dealing with copyrighted material, and stopped. One could argue whether or not reformatting the lyrics into a bulleted list qualifies as a copyright violation, but ChatGPT wants to operate cautiously.
- Creative prompts: writing a sonnet about math
-
AIs can mimic various creative forms. While not immediately practical, the AIs can help give a fresh perspective on a concept via experimental prompts.
- Where AIs fail
-
AIs will confidently answer questions wrong. Note how ChatGPT 3.5 answers this question:
However, often these "hallucinations" will often be fixed in the next version (ChatGPT 4.0):
- FAQs on text generation AI
-
Is Generative AI the same as a web search?
A web search returns existing pages and text related to the search. Generative AI is trained on many of these existing texts (such as all of Wikipedia), but it generates its answers "fresh" every time.
Will Generative AI always give the same answer to a prompt?
"Under the hood" AI tools have a randomness parameter. Right now users are only able to access it via the tool's API (for programmers). In common usage, the randomness is always set to the max value so that each response seems original.
Prompts for Interacting with Image Generation AIs
AI image generators can generate an image of just about anything you can imagine. In the same way that one must have a "conversation" with the text generator AIs, one needs to refine and tweak the images to get precisely what you want. It can definitely take some practice.
Each AI has a slightly different way of accessing its image generator features, which we have listed in the "How To" sections below as well.
NOTE: we are using Dall-E 3 for these images. We encourage you to try the prompts out on various tools.
- Prompt example: a photo chair shaped like an avacado
-
This is considered one of the "classic" tasks given to early AI image generators. The AIs are trained on millions of images of chairs and millions of images of avacados; they attempt to blend both ideas in the generated image.
- Refining the prompt: remove the pit and add a cat
-
We can continue to refine the prompt thusly:
You'll notice that it "thinks" it removed the seed, but did not. Therefore we need to prompt it again. My hunch is that it didn't "know" how to position the cat inside the chair, so it kept the seed by default. We'll try to fix this problem by giving it an alternative.
Of course now it got rid of the cat, so we must add it back in...
- Prompt example: Thomas Jefferson and Tony Bennett
-
Image generator AIs can do more than photos. Here is an image created by student Sean McGanahan (Class of '24), including how he wrote the prompts.
I wanted to make an anime-inspired image of Thomas Jefferson and Tony Bennett smiling together in front of the rotunda.
Initially, I was getting very boring looking images
I added the “chibi” keyword and many adjectives to further push that. “Cute”, “Adorable” “Sweet”
I asked it to add bright and vibrant colors
I told it to have Tony Bennet and Thomas Jefferson hugging
It knew he was the basketball coach but honestly it doesn’t look anything like him(oh well close enough)
- How to: Dall-E 2
-
- Login or create an account at https://labs.openai.com
- Type in the image you'd like to create (e.g. "a photo of a chair shaped like an avacado")
- You have 15 free credits, and must purchase more.
- How to: Dall-E 3
-
- Login or create an account at https://labs.openai.com
- Subscribe to ChatGPT 4 ($20 / month)
- Start a New Chat with ChatGPT, and select Dall-E from the dropdown menu thusly:
- Type in the image you'd like to create (e.g. "a photo of a chair shaped like an avacado")
- How to: Bing with Image Creator
-
- Login or create a personal Microsoft account (NOTE: your UVA Microsoft account will not work)
- Open https://bing.com and click on the blue "Chat" icon at the top of the page
- Ask Bing to create an image for you (e.g. "generate a photo of a chair shaped like an avacado")
- How to: Google Imagen
-
- Login or create a Google account
- Open https://google.com and click on the flask in the top right of the page.
- Enable the option for "SGE: Show Generative AI in Search"
- Ask Google to create an image for you (e.g. "generate a photo of a chair shaped like an avacado")
- How to: Midjourney
-
We only recommend Midjourney to the very curious, as it is a bit more complicated to use. Those who would like to try should follow the guide on this page: https://docs.midjourney.com/
- Comparing the image generation AIs
-
-
DALL-E 2 via OpenAI.com
-
Generates images with a resolution of 256x256 pixels
-
Images are less accurate, detailed, and realistic compared with DALL-E 3
-
Available through OpenAI’s website with an OpenAI account
-
-
DALL-E 3 via OpenAI.com
-
More accurate and realistic than DALL-E 2 and is integrated with ChatGPT
-
Generates images with a resolution of 1024x1024 pixels
-
Can use the ChatGPT integration to brainstorm and refine your prompts and images
-
Available through OpenAI’s website via an OpenAI account and a paid subscription to ChatGPT Plus ($20/month)
-
-
DALL-E 3 via Bing Image Creator
-
Generates images through integration of DALL-E 3 with Bing’s search engine
-
Generates images with a resolution of 512x512 pixels
-
Maximum of 10 generations per day and a watermark on the images.
-
Available via Bing Image Creator which can be used with a Microsoft account
-
-
Google Imagen
-
Generates images with a resolution of 512x512 pixels
-
Avoids creating images of people (e.g. man, woman, human, etc.)
-
Generates more photorealistic images
-
-
Midjourney
-
Generates images from text descriptions, focusing on keywords rather than complete sentences. Can also generate images based on uploaded images and blend two or more images together to create a new image.
-
Images are highly detailed and realistic, with less content restrictions than other tools
-
Requires a paid account and is accessed through Discord
-
-
- FAQs on image generation
-
New accordion content
Prompts for Interacting with Code, Data, and Document Analyzing AIs
AIs can also be used to analyze data using natural language prompts. We will be working with publicly available UVA enrollment data exported from this page: https://ira.virginia.edu/university-data-home/enrollment
NOTE: we are working with ChatGPT 4, but Claude can also work with certain kinds of data and documents
- Working with data
-
First, start a new chat.
Click the "plus" sign to upload a file.
Ask ChatGPT to do anything with the data using a natural language prompt.
This is a trivial use, but shows how it can work. When working with much larger data sets this can become a more natural way to navigate the data. The prompt can be refined in the same way as we did with the text generation and image generation.
You will notice that ChatGPT gives you a "play by play" of what it is doing. You may click on "Show work" to see the Python code it is generating.
- Writing code
-
ChatGPT can also help us write code. This can be useful to create code, and also to learn code.
- Summarizing a document
-
Using the same process as above, you can upload and work with text documents as well.
NOTE: you should not upload any sensitive data
- Creating HTML from text
-
Generative AIs can also help reformat text. It was used for this webpage, in fact, to transform a bulleted list into an HTML table. There were a few more iterations, but it was much quicker than doing the same work by hand.
- FAQs on working with code, data, and documents
-
New accordion content