Use cases#
In this notebook we collect a few use-cases and not so useful use-cases.
from openai import OpenAI
from IPython.core.magic import register_line_cell_magic
from IPython.display import display, Markdown
@register_line_cell_magic
def prompt(line:str, cell:str, model="gpt-3.5-turbo"):
"""A prompt helper function that sends a message to openAI
and prints out the text response.
"""
message = line + "\n" + cell
client = OpenAI()
response = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": message}]
)
text = response.choices[0].message.content
display(Markdown(text))
%%prompt
Translate the following joke to German:
What is every parent's favorite Christmas song? Silent Night!
Was ist das Lieblingsweihnachtslied aller Eltern? Stille Nacht!
%%prompt
Given a story, please restructure the contained data.
Story:
The compute center of the university recently conducted a study to figure
out needs of students for computational resources. After interviewing 100
students they concluded that most of them were happy with 250 GB of cloud
storage.
Restructure the story above to extract these numbers:
* Number of students asked:
* Cloud storage size:
Number of students asked: 100 Cloud storage size: 250 GB
%%prompt
What's Robert Haase's (Uni Leipzig) research field ?
I’m sorry, but I couldn’t find any information specifically about a Robert Haase affiliated with the University of Leipzig. It’s possible that the individual you’re referring to is not a prominent figure in academic research or may have a different affiliation. It’s always best to consult the official website or directory of the University of Leipzig or directly contact the department of interest for accurate information about their faculty members and their research fields.
%%prompt
What's Robert Haase's (TU Dresden) research field ?
Robert Haase’s research field is primarily in the field of computational imaging, specifically focusing on developing new imaging techniques and approaches for biological microscopy. He has worked on projects related to 3D imaging, image segmentation, and analysis, as well as developing algorithms and software tools for image processing and visualization in microscopic imaging.
%%prompt
If there are 100 students who each require 250 GB of cloud storage, how much storage do we need in total ?
To find the total storage needed, we multiply the storage requirement per student by the number of students:
250 GB / student * 100 students = 25,000 GB = 25 terabytes (TB)
%%prompt
I have 5 apples, 6 oranges and 4 potatoes. How many fruits to I have?
You have a total of 5 + 6 = <<5+6=11>>11 fruits.
%%prompt
How many o are in Woolloomooloo ?
There are 6 o’s in the word “Woolloomooloo”.
Exercise#
Come up with two more examples: One where chatGPT works reproducibly, and one where it reproducibly answers wrong information or denies answering.