Ramsri Goutham presented on generating multiple choice questions (MCQs) from text using natural language processing. He discussed using T5 transformers and sense2vec vectors to generate questions from news articles and generate wrong answer choices using WordNet and Sense2vec. Ramsri also shared an open source question generation library called Questgen and demonstrated generating MCQs from sample text about Elon Musk and cryptocurrencies in a Google Colab notebook.
Unraveling Multimodality with Large Language Models.pdf
Question generation using Natural Language Processing by QuestGen.AI
1. MCQ Generation in edtech using
Natural Language Processing
Thu, May 20th, 2021
10 PM - 11:30 PM (India)
6:30 PM - 8:00 PM (Italy)
Hosted by: Data Science Milan
Talk by
Ramsri Goutham
ramsri.ai
Colab Code and slides:
http://bit.ly/datasciencemilan
2. Who am I ?
Lead Data Scientist with 8+ years of work
experience across Silicon Valley, Singapore,
and India.
Most recently been a Co-founder and CTO
of an AI-assisted assessments startup.
Spent the last 2 years on question
generation using Natural Language
processing in edtech.
Ramsri Goutham Golla
ramsri.ai
4. Instrutor
Assessment creation (Quizzes and Tests) is manual and not
scalable for online transformation due to the pandemic.
The problem
A textbook publisher hired you as a data scientist to create a
tool that automates the assessment creation process .
5. Instrutor
Elon Musk has shown again he can influence
the digital currency market with just his
tweets.
After saying that his electric vehicle-making
company Tesla will not accept payments in
Bitcoin because of environmental concerns,
he tweeted that he was working with
developers of Dogecoin to improve system
transaction efficiency.
Following the two distinct statements from
him, the world's largest cryptocurrency hit
a two-month low, while Dogecoin rallied by
about 20 percent.
The solution
News Article
Elon Musk and Dogecoin
Multiple Choice Questions (MCQs)
Fill in the Blanks
True or False Questions
Match the following
1
3
2
4
7. Instrutor
Talk Outline
Text2MCQ generation using T5 transformers and sense2vec vectors
Use ONNX quantization to create a light-weight model of T5
1
2
We will use Google Colab notebooks as the development environment for our demos
8. Elon Musk has shown again he can influence the digital currency market with just his
tweets. After saying that his electric vehicle-making company Tesla will not accept
payments in Bitcoin because of environmental concerns, he tweeted that he was working
with developers of Dogecoin to improve system transaction efficiency.
Following the two distinct statements from him, the world's largest cryptocurrency hit a
two-month low, while Dogecoin rallied by about 20 percent. The SpaceX CEO has in recent
months often tweeted in support of Dogecoin, but rarely for Bitcoin. In a recent tweet,
Musk put out a statement from Tesla that it was “concerned” about the rapidly increasing
use of fossil fuels for Bitcoin mining and transaction, and hence was suspending vehicle
purchases using the cryptocurrency.
A day later he again tweeted saying, “To be clear, I strongly believe in crypto, but it can't
drive a massive increase in fossil fuel use, especially coal”. It triggered a downward spiral
for Bitcoin value but the cryptocurrency has stabilized since.
Instrutor News Article
Elon Musk and Dogecoin
Step 1 : Identify key Sentences/Concepts
9. Musk tweeted that his electric vehicle-making company tesla will not accept payments in
bitcoin because of environmental concerns. He also said that the company was working
with developers of dogecoin to improve system transaction efficiency.
The world's largest cryptocurrency hit a two-month low, while dogecoin rallied by about
20 percent. Musk has in recent months often tweeted in support of crypto, but rarely for
bitcoin.
Instrutor News Article
Elon Musk and Dogecoin
Step 2 : Identify keywords from sentences
Musk Tesla
Bitcoin Dogecoin
Extract Keywords
10. Musk tweeted that his electric vehicle-making company tesla will not accept payments in
bitcoin because of environmental concerns. He also said that the company was working
with developers of dogecoin to improve system transaction efficiency.
The world's largest cryptocurrency hit a two-month low, while dogecoin rallied by about
20 percent. Musk has in recent months often tweeted in support of crypto, but rarely for
bitcoin.
Instrutor Elon Musk and Dogecoin
Step 3: Form multiple-choice questions (MCQs)
Bitcoin
What cryptocurrency did Musk
rarely tweet about?
What company did Musk say would
not accept bitcoin payments?
Dogecoin
ETH
Litecoin
Tesla
Nissan
Ford
Toyota
11. Instrutor
Elon Musk has shown again he can influence
the digital currency market with just his
tweets.
After saying that his electric vehicle-making
company Tesla will not accept payments in
Bitcoin because of environmental concerns,
he tweeted that he was working with
developers of Dogecoin to improve system
transaction efficiency.
Following the two distinct statements from
him, the world's largest cryptocurrency hit
a two-month low, while Dogecoin rallied by
about 20 percent.
Abstractive/Extractive summarization (T5,
BART, Pegasus Models)
Paraphrasing of sentences (T5, GPT-2 etc)
Keyword/Keyphrase Extraction (YAKE,
TopicRank, KeyBERT etc)
Question generation (T5, GPT-2, GPT-3 etc)
Wrong choices/distractors generation
(Wordnet, Word2vec, Sense2vec etc)
Posing it as an NLP problem
News Article
Elon Musk and Dogecoin
12. Context: Answer:
Question
Generate a question using T5 Transformer model
Musk tweeted that his electric
vehicle-making company Tesla
will not accept payments in
bitcoin because of environmental
concerns.
Tesla
What company did Musk say would not accept
bitcoin payments?
T5
Text to text transfer
transformer
14. Instrutor
Extract Keywords
Extract Keyphrases using
Python Keyword Extraction Library
Bitcoin, Dogecoin, Tesla, Cryptocurrency
https://github.com/boudinfl/pke
MultipartiteRank
Elon Musk has shown again he can influence
the digital currency market with just his
tweets.
After saying that his electric vehicle-making
company Tesla will not accept payments in
Bitcoin because of environmental concerns,
he tweeted that he was working with
developers of Dogecoin to improve system
transaction efficiency.
Following the two distinct statements from
him, the world's largest cryptocurrency hit
a two-month low, while Dogecoin rallied by
about 20 percent.
News Article
Elon Musk and Dogecoin
15. WordNet® captures relations.
A hyponym is in a type-of relationship
with its hypernym.
A hypernym is an umbrella term and
blanket term. Eg: Color is the hypernym
for Purple.
Red, Blue, Green are the hyponyms of
"Color". Since Red is a type of color.
Our goal is to extract Co-Hyponyms as
distractors.
https://wordnet.princeton.edu/
Generate distractors using Wordnet
Source: https://en.wikipedia.org/wiki/Hyponymy_and_hypernymy
16. Contextual information is captured. Trained on
Reddit comments.
The words with the same senses are differentiated
with parts of speech eg: duck|VERB and
duck|NOUN
Noun phrases and named entities are annotated
during training so multiword phrases like "natural
language processing" also have an entry.
Generate distractors using Sense2vec
Source: https://explosion.ai/demos/sense2vec
https://explosion.ai/blog/sense2vec-reloaded
17. Musk tweeted that his
electric vehicle-making
company tesla will not
accept payments in
bitcoin because of
environmental
concerns.
Extract Keywords
Bitcoin
T5 Text to Text
Transformer model
trained on SQUAD
dataset
Dogecoin
Tesla
Overview: Generate MCQs from any content.
Paragraph Keywords
Question
Generation
Transformer Model
What company did Musk say would
not accept bitcoin payments??
Generated Question
Nissan
a
Tesla
b
Toyota
c
Ford
d
Pick a keyword
eg: Tesla
19. Udemy Course: Question generation using
Natural Language Processing (bit.ly/questiongeneration)
Connect with me
on Social Media:
ramsri.ai
Email:
ramsri@questgen.ai
Coupon Code: DSMILAN