trilogy-group / memorization-app

tu2k22-memorization
2 stars 1 forks source link

Content Generation: Text Generation with GPT-3 #44

Open kushal-ti opened 1 year ago

kushal-ti commented 1 year ago

research autogenerating or auto suggesting different kinds of mnemonics, such as acrostics, story points, peg lists, etc using GPT-3

kushal-ti commented 1 year ago

Some existing research has already been carried out in #38 however, that issue will be closed in favour of this one

davidfortuoso-ti commented 1 year ago
Example Remember the 13 original states: Massachusetts New Hampshire New York Connecticut New Jersey Rhode Island Pennsylvania Maryland Delaware Virginia North Carolina South Carolina Georgia We can generate an acronym that helps remember the first letter of each state: ![Image](https://user-images.githubusercontent.com/107245952/192455258-468eeba3-2efa-4266-9b13-1d46352cac10.png) ![Image](https://user-images.githubusercontent.com/107245952/192455512-e9a446e6-363b-48cb-bb8a-bb83e472bd54.png) ![Image](https://user-images.githubusercontent.com/107245952/192455727-1c3e0040-d7a7-4cec-bf1e-c2f7628e6566.png) ![image](https://user-images.githubusercontent.com/107245952/193208138-f572446b-7a95-4989-97c6-f6f76f2e21b8.png)

We will probably need to suggest more than 1 option to the student, as some of them don't make sense or won't be easy to memorize for students.

API Request example:

import os
import openai

openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.Completion.create(
  model="text-davinci-002",
  prompt="Create funny acronym containing 'MNNCNRPMDVNSG':",
  temperature=0.7,
  max_tokens=256,
  top_p=1.0,
  frequency_penalty=0.0,
  presence_penalty=0.0
)
davidfortuoso-ti commented 1 year ago
  • Generate acronyms with GPT-3 (OpenAI):

Example We will probably need to suggest more than 1 option to the student, as some of them don't make sense or won't be easy to memorize for students.

API Request example:

import os
import openai

openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.Completion.create(
  model="text-davinci-002",
  prompt="Create funny acronym containing 'MNNCNRPMDVNSG':",
  temperature=0.7,
  max_tokens=256,
  top_p=1.0,
  frequency_penalty=0.0,
  presence_penalty=0.0
)

One problem I've realized when using GPT-3 is that some times it uses swear words (Example: "DNBNF": Dumbass Numbnuts Bragging Nearly Finishes) can we configure it so this doesn't happen?

davidfortuoso-ti commented 1 year ago

Creating stories using gpt-3:

Example: Creating a Story for the word Blitzkrieg: image

This stories sometimes don't make sense or just explain what the word means, example:

image

API request example:

import os
import openai

openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.Completion.create(
  model="text-davinci-002",
  prompt="Create a story for the word 'Blitzkrieg':",
  temperature=0.7,
  max_tokens=256,
  top_p=1.0,
  frequency_penalty=0.0,
  presence_penalty=0.0
)
davidfortuoso-ti commented 1 year ago

Will we be using OpenAI for this? It has some costs related to it, but it's the most powerful option now. There are some open source alternatives like GPT-Neo or GPT-J but they aren't as powerful as OpenAI DaVinci

davidfortuoso-ti commented 1 year ago

Creating rhymes:

Not sure whether it's useful or not, most of them don't make any sense and don't even rhyme.

Examples ![image](https://user-images.githubusercontent.com/107245952/193225433-ef2151f8-8098-437b-8956-f128a6634832.png) ![image](https://user-images.githubusercontent.com/107245952/193225647-3c0e4536-7b31-422b-a4b7-f998cb4b7d86.png) ![image](https://user-images.githubusercontent.com/107245952/193226297-ace8ddea-3168-4201-9cc1-d7c810d5d621.png)