Skip to main content
A crash course in Generative AI for researchers
Steven Van Vaerenbergh @steven2358
April 21, 2023
Las mañanas del IFCA & ML journal club
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 2
January 2023
First world championship of giant tortoise racing
3
March 2023
The pope goes Balenciaga
4
April 2023
Hiking bears spotted
5
Images generated by Midjourney v5
• https://www.reddit.com/r/midjourney/comments/12ewexx/the_high_octane_world_of_giant_tortoise_racing/
• https://www.reddit.com/r/midjourney/comments/120vhdc/the_pope_drip/
• https://www.reddit.com/r/midjourney/comments/1275ndl/if_bears_were_your_hiking_buddies_and_didnt_eat/
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 6
A brief history of Generative AI
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 7
https://pdos.csail.mit.edu/archive/scigen/
Accepted as a “non-reviewed” paper at the 2005 World Multi-conference
on Systemics, Cybernetics and Informatics conference.
A brief history of Generative AI
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 8
2005: SCIgen
An Automatic CS
Paper Generator
A brief history of Generative AI
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 9
2005: SCIgen
An Automatic CS
Paper Generator
https://proceedings.neurips.cc/paper_files/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf
2012: Deep learning revolution
"ImageNet Classification with Deep
Convolutional Neural Networks” paper
A brief history of Generative AI
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 10
2005: SCIgen
An Automatic CS
Paper Generator
2012: Deep learning revolution
"ImageNet Classification with Deep
Convolutional Neural Networks” paper
2014: GAN revolution
"Generative Adversarial
Networks" paper
https://proceedings.neurips.cc/paper_files/paper/2014/file/5ca3e9b122f61f8f06494c97b1afccf3-Paper.pdf
https://towardsdatascience.com/generative-adversarial-networks-explained-34472718707a
A brief history of Generative AI
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 11
2005: SCIgen
An Automatic CS
Paper Generator
2012: Deep learning revolution
"ImageNet Classification with Deep
Convolutional Neural Networks” paper
2014: GAN revolution
"Generative Adversarial
Networks" paper
2017: Transformers
"Attention Is All You
Need" paper
https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf
2020s
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 12
2020: GPT-3
175 B parameter Large
Language Model
2018: Foundation
models. GPT (2018),
BERT (2019), etc.
2019: GPT-2
Restricted release
2021: GitHub Copilot
Code assistant
2022/03: Dall·e 2
Realistic image
generation
2022/08: Stable Diffusion
Open source image generation
2022/11: ChatGPT
AI chatbot based on
GPT 3.5
2023/02: Bing Chat
AI Chatbot based on GPT-4
2023/02: LLaMa
16 B parameter LLM,
access to researchers
March 2023
• 3/1: OpenAI: ChatGPT and Whisper API
• 3/6: Google: Universal Speech Model
• 3/8: Microsoft: VALL-E X
• 3/10: Google: PaLM-E
• 3/13: Stanford: Alpaca 7B
• 3/14: Anthropic: Claude
• 3/14: Google: PaLM API & Workspace
• 3/14: OpenAI: GPT-4
• 3/15: Baidu: ERNIE Bot
• 3/15: Midjourney: Midjourney V5
• 3/16: Microsoft: Microsoft 365 Copilot
• 3/20: Runway: Gen-2
• 3/20: Nuance and Microsoft: DAX Express
• 3/21: Google: Bard
• 3/21: Adobe: Firefly
• 3/21: Microsoft: Bing Image Creator
• 3/22: GitHub: Copilot X
• 3/23: OpenAI: ChatGPT Plugins
• 3/28: Nomic AI: GPT4All
• 3/30: Bloomberg: BloombergGPT
• 3/31: HuggingFace: HuggingGPT
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 13
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 14
A definition
Generative AI is a type of AI technology that can create
unique, original content automatically, including text,
code, images, audio, and video.
• Modern generative AI uses ML algorithms that are
trained on large amounts of data, usually Large
Language Models (LLM)
• Includes a random component: The same input leads
to different variations of the output.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 15
A 3 minute presentation
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 16
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 17
https://youtu.be/a8Xhi77d_cE
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 18
How can ChatGPT help researchers?
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 19
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 20
a) Translation
• Simple prompt:
“Translate the following text to English: …”
• Better prompt:
“I want you to act as an academic researcher. I will
pass you texts in Spanish, which you will translate to
English. You may change phrases and their order to
improve the readability, without altering the meaning
of the text. The result should be formal and academic
English. The first text to translate is this one: …”
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 21
GPT-4 translation result
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 22
We have made use of “personas”
• Personas are specific personalities or roles we ask
ChatGPT to take on. Examples: https://prompts.chat/
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 23
b) Proofreading
• By using the Chrome extension “editGPT” we can
convert ChatGPT into a proofreading app similar to
Grammarly. https://www.editgpt.app/
• Prompts:
• Proofread this:
• Proofread this but only fix grammar:
• Proofread this, lightly improving clarity and flow:
• Etc.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 24
Proofreading result
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 25
c) Structuring text
• Some ChatGPT prompts to help you polish and
structure your academic writing from this thread:
https://twitter.com/MushtaqBilalPhD/status/16424045
40413620224
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 26
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 27
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 28
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 29
General prompting guidelines
• Conversation from general to specific
• Provide style, examples, formatting tips, context, …
• Prompt engineering is now a recognized skill in computer science
• Books, online courses on how to write prompts.
• https://prompts.chat/
• https://learnprompting.org/
“ChatGPT is like a consultant that understands a lot about the world, but needs more
context on your specific situation.”
— @I_say_aye
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 30
Is generative AI allowed in academic writing?
• January 2023: ICML prohibits all use of LLM, then rectifies.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 31
https://icml.cc/Conferences/2023/llm-policy
Is generative AI allowed in academic writing?
• March 2023: Elsevier journals add “Declaration of generative
AI in scientific writing” in author guidelines.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 32
Declaration of generative AI in scientific writing
The below guidance only refers to the writing process, and not
to the use of AI tools to analyse and draw insights from data as
part of the research process.
Where authors use generative artificial intelligence (AI) and AI-
assisted technologies in the writing process, authors should
only use these technologies to improve readability and
language. Applying the technology should be done with human
oversight and control, and authors should carefully review and
edit the result, as AI can generate authoritative-sounding output
that can be incorrect, incomplete or biased. AI and AI-assisted
technologies should not be listed as an author or co-author, or
be cited as an author. Authorship implies responsibilities and
tasks that can only be attributed to and performed by humans,
as outlined in Elsevier’s AI policy for authors.
Authors should disclose in their manuscript the use of AI and AI-
assisted technologies in the writing process by following the
instructions below. A statement will appear in the published work.
Please note that authors are ultimately responsible and accountable for
the contents of the work.
Disclosure instructions
Authors must disclose the use of generative AI and AI-assisted
technologies in the writing process by adding a statement at the end of
their manuscript in the core manuscript file, before the References list.
The statement should be placed in a new section entitled ‘Declaration of
Generative AI and AI-assisted technologies in the writing process’.
Statement: During the preparation of this work the author(s) used [NAME
TOOL / SERVICE] in order to [REASON]. After using this tool/service, the
author(s) reviewed and edited the content as needed and take(s) full
responsibility for the content of the publication.
This declaration does not apply to the use of basic tools for checking
grammar, spelling, references etc. If there is nothing to disclose, there
is no need to add a statement.
https://www.ejcancer.com/content/authorinfo
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 33
a) Creating a script
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 34
Write a Python script to generate 3 clusters of 2D Gaussian
noise that overlap slightly. Include a plot. Export the data as
CSV, including a column for the label of the cluster.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 35
Bing Chat output (1)
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 36
Bing Chat output (2)
https://sl.bing.net/jNhIF04uQ2K
b) AI-based code assistants
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 37
GitHub Copilot: “an AI pair programmer that helps you
write better code”
Let’s see an example…
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 38
https://youtu.be/FXf_eMonqVY
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 39
https://twitter.com/karpathy/status/1608895189078380544
How much does it cost?
10 EUR per month
But for academic users it’s free:
• Step 1: Sign up to GitHub Global Campus
• https://education.github.com/globalcampus/teacher
• Step 2: In Visual Studio Code, install GitHub Copilot plugin
• https://docs.github.com/en/copilot/getting-started-with-github-
copilot
• Privacy: https://github.com/features/copilot/#faq-
privacy-copilot-for-individuals
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 40
c) Structuring code
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 41
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 42
43
https://sl.bing.net/jrSJOHeBOcC
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358
https://twitter.com/shl/status/1645233436372905985
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 44
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 45
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 46
a) Obtaining data
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 47
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 48
Convert the data from Sightings into a
CSV sheet delimited by ;
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 49
b) Reformatting data
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 50
Convert it into a markdown bullet list. Output
the raw markdown so I can copy it. Each item
should be formatted as this example for the first
item:
- *19 Apr 2023*: Mute Swan (1)
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 51
c) Summarizing data
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 52
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 53
Some literature review services
• Elicit uses language models to help you automate
research workflows, like parts of a literature review.
https://elicit.org/
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 54
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 55
Some literature review services
• ChatPDF lets you chat with PDFs
https://www.chatpdf.com/
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 56
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 57
https://youtu.be/RkYn8D-Qa88
https://twitter.com/emollick/status/1648079617956118530
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 58
Custom ChatGPT scripting on a PDF
# import libraries
import PyPDF2
import openai
# initialize summary
pdf_summary_text = "“
# read the pdf
pdf_file = open("my_pdf.pdf", 'rb’)
pdf_reader = PyPDF2.PdfReader(pdf_file)
# loop over pages
for page_num in range(len(pdf_reader.pages)):
page_text = pdf_reader.pages[page_num].extract_text().lower()
# request the summary of one page
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "user", "content": f"Summarize this: {page_text}"},
],
)
# append the page summary
pdf_summary_text += response["choices"][0]["message"]["content"] + "n“
# write the results to file
with open("output_summary.txt", "w+") as file:
file.write(pdf_summary_text)
pdf_file.close()
59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 60
SWOT analysis of ChatGPT in
academic research
Let’s ask GPT-4
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 61
ChatGPT in research: Strengths
• Time-Efficient:
• ChatGPT expedites literature search, data synthesis, and
drafting of academic papers.
• Wide Knowledge Base:
• Provides access to a vast range of information, which facilitates
interdisciplinary research.
• Language Support:
• Assists academic researchers in generating and checking
grammar for different languages.
• Collaboration Tool:
• Enables collaboration between researchers through remote
access and streamlined communication.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 62
ChatGPT in research: Weaknesses
• Limited Deep Expertise:
• ChatGPT may not possess in-depth knowledge in every niche
area or specialized field.
• Reliability of Information:
• Data provided by the model can at times be inaccurate or
outdated, necessitating fact-checking.
• Lack of Creativity:
• May lack the ability to think creatively and generate truly
innovative ideas or hypotheses.
• Over-dependence:
• Can lead to over-reliance on ChatGPT, stifling critical thinking
and analytical skills.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 63
ChatGPT in research: Opportunities
• Interdisciplinary Research:
• Potential to bridge the gap between different fields and promote
interdisciplinary research.
• Enhanced Academic Exchange:
• Facilitate more efficient academic discussions and
collaborations.
• Inclusion of Emerging Fields:
• Continuous model updates can include the latest research fields
and findings.
• Publication Assistance:
• Assistance in formatting, proofreading, and editing to ensure
clearer communication of ideas.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 64
ChatGPT in research: Threats
• Plagiarism Concerns:
• May inadvertently produce content similar to existing works,
raising plagiarism concerns.
• Misinterpretation of Data:
• Misrepresentation of information could lead to misinterpretation
and misconceptions.
• Job Security:
• It could potentially threaten job prospects for research
assistants and other academic support staff.
• Bias and Ethics:
• Model's output may contain unintended biases, raising ethical
concerns in academic research.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 65
Conclusions
Generative AI can:
• Revolutionize content creation in research: academic
writing, coding, literature review, …
• Automate repetitive tasks in research: summarizing
articles, generating code, …
• Generate inspiration, ideas and insights.
However, generative AI is still in its early stages of
development, and many challenges remain.
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 66
More resources: “Awesome Generative AI” list
https://github.com/steven2358/awesome-generative-ai
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 67
Course for teachers at UC
• “La Revolución de la Inteligencia Artificial Generativa
en Investigación y Docencia”
• Starting fall 2023
• Taught in Spanish
• Teachers:
Steven Van Vaerenbergh, Marcos Cruz, Lara Lloret
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 68
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 69
The future of email with ChatGPT
https://twitter.com/multikev/status/1616784555788075009
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 70
https://xkcd.com/1289/
ChatGPT
ChatGPT
ChatGPT
ChatGPT
ChatGPT
ChatGPT
ChatGPT
ChatGPT
ChatGPT
ChatGPT
Let's talk about GPT: A crash course in Generative AI for researchers - @steven2358 71