Inspiration

We are motivated by the goal to increase access to high-quality education. Currently, one of the barriers in education is practice questions: they require extensive manual effort from expert teachers, are expensive to to produce, and are not adapted to each student's interests and background or teacher's usage scenario. To this end, we aim to develop a method that can automatically produce high quality educational practice questions that are cheap to produce and are easily customized to individual student's and teacher's needs.

What it does

Our demo webapp, called AutoQG, takes a piece of context, such as a paragraph from a textbook, and a keyword or keyphrase therein as input, to generates a pair of natural language question and answer based on the given context and keyword.

How we built it

We built it with gradio (gradio.app) and OpenAI GPT-3 language model API. All codes are written in python. However, we have found that simply putting these two components together produces poor quality questions. Therefore, we leveraged our 3 months of summer research, led by Jakob Valdez (the rockstar!) who discovered a novel method to trigger the GPT-3 language model to produce fluent, relevant, and overall high-quality questions. We implemented our triggering method into our app, resulting in the final demo. Note that all code for this demo is written within the span of the hackathon; the results of our prior research are empirical observations from the OpenAI API output and does not involve any python code.

Challenges we ran into

We found it challenging to find the appropriate application to host our app. We also ran into problems formatting and implementing the input (which is the core of our triggering method).

Accomplishments that we're proud of

We are super proud of the outcome: the method can generate really good questions most of the time. Also, our method is cheap: generating a single question only costs $0.06, significantly lowering the cost for producing questions.

What we learned

We learnt how to build a simple demo webapp which is really useful in research to showcase our work.

What's next for AutoQG: automatic question generator for education

We have at least three items on our TODO list:

  • OpenAI API is still not cheap. We will find a replacement or train our own large language model as the backend.
  • Our method does not guarantee the generation of good questions 100% of the time. We will research on methods to automatically filter out not-so-good questions.
  • We will eventually integrate our method into the OpenStax textbook webapp, which will have the potential to improve the learning and reading experience for more than 14 million of students currenly using OpenStax textbooks.

Built With

  • gradio
  • openai-api
  • openstax-textbooks
  • python
Share this project:

Updates