Make a user with OpenAI and make sure you can log in: https://openai.com/api/
All assignments below should be done in the Playground (https://beta.openai.com/playground) with default settings.
<aside> đ Assignment 1 - âOrder a textâ
Go to https://beta.openai.com/playground
Describe in a single sentence, what kind of text you would like and let GPT-3 write it for you. Make sure there are no line breaks or concluding spaces in your prompt, it often confuses GPT-3. Try with different genres of text (article, story, recipe, poem etc)
Examples:
Write a poem about #FF00FF.
Write list of things to do when you are sad.
Create an outline for an essay about the role of computers in poetry.
**Write a fairytale about a jar of honey and a Nintendo Wii controller.
**
Write 10 tagline suggestions for a shop that sells smoked salmon and leather boots.
Save your best text here: https://docs.google.com/document/d/13GUMs0eVjVFk1AT2uZvywjqtHwHQIR3kTH6gQspKX5I/edit?usp=sharing
</aside>
<aside> đ **Assignment 2 - Letâs make some better poems about things!
1)** Find 2-3 different images on your computer or online
2) Go to https://huggingface.co/spaces/Salesforce/BLIP, upload your images and get a descriptive image caption for each image.
3) Go to https://beta.openai.com/playground and use the image captions from step 2 to generate a poem based on the image.
Your prompt instruction could be as simple as
Write a poem about [insert image caption].
Or perhaps try to âsteerâ the poem in a certain direction, by exploring different adjectives that describe the poem, or by adding in the style of Sylvia Plath
, horror poem
or similar to your instructions.
Save your best poem + image here: https://docs.google.com/document/d/1zkkl7AZb8kC7rw-rsl1GT-ZB1p3QMZcduX5ne3wihM8/edit
</aside>
<aside> đ Assignment 3 - providing examples
Sometimes just asking for a text does not really give you the results you want. It often helps if you add examples of the kind of inputs (prompts) and outputs (generated texts) you want.
Example: Letâs say we want to generate a chatbot that has a certain tone of voice, and for instance want it to be really sarcastic. Instead of only writing an instruction, we can provide a few examples of questions and answers showing the API how to reply. It will not be perfect, but generally a few examples improves the outputs quite a lot.
Try it out here: https://beta.openai.com/playground/p/default-marv-sarcastic-chat
âłIf we have time: Try to change both the instructions and the examples for the chatbot, to give it a different tone of voice. Lets say you want to make it very sweetđ, secretiveđ„ž or perhaps very melancholicđ„ș, how would you design the instruction and the examples?
If you have a lot of data with input-output pairs, you can also fine-tune GPT-3, which improves quality, lowers latency and is cheaper once trained. See this guide https://beta.openai.com/docs/guides/fine-tuning
</aside>
Simple template for communicating between a website (vanilla javascript + html) & GPT-3: https://editor.p5js.org/AndreasRef/sketches/86BHY6vf4 (but donât leave your API key public on the web! For projects that use APIâs it might be a good idea to run p5js in a local editor, see this guide for one way of doing so)
Janelle Shanes blog on weird AI stuff: https://www.aiweirdness.com/tag/gpt-3/
OpenAI forum: https://community.openai.com/
GPT-3 book from O'Reilly: https://www.oreilly.com/library/view/gpt-3/9781098113612/
GPT Tools: Guides + tutorials: https://gpttools.com/
Video on the technical details of how GPT-3 works: https://www.youtube.com/watch?v=SY5PvZrJhLE&ab_channel=YannicKilcher
Blogpost with animations explaining how GPT-3 works: https://jalammar.github.io/how-gpt3-works-visualizations-animations/
AI-Dungeon GPT-3 game: https://play.aidungeon.io/
GPT-3 demo - website with a lot of demos build with GPT-3: https://gpt3demo.com/
Tired of books written by authors? Try books written by AI - Booksby.ai