Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 1.71 KB

README.md

File metadata and controls

40 lines (35 loc) · 1.71 KB

WikiNovelPlots Quiz

This repo takes ~200 stories from WikiNovelPlots, alters them using GPT-3, and then presents them as a quiz in a Hugo site using quizdown.

Repro steps inside /scripts

input step output
WikiNovelPlots N/A, the novel summaries were already copied to this repo summaries_clean.pkl
summaries_clean.pkl get_gpt_summaries.py summaries_clean_700_to_710_with_gpt.pkl
summaries_clean_700_to_710_with_gpt.pkl clean_gpt_summaries.py summaries_clean_700_to_710_with_gpt_clean.pkl
summaries_clean_700_to_710_with_gpt_clean.pkl generate_quiz.py quizdown.md

GPT-3 details

The code (see /scripts/get_gpt_summaries.py) below was used to alter each summary. I made 233 requests and it cost me $4.29.

PROMPT = 'Summarize and expand the following story to make it original, surreal, and magical:\n\n'

def get_gpt_summary(summary_clean):
    response = openai.Completion.create(
        engine="text-davinci-001",
        prompt=f"{PROMPT}{summary_clean}",
        temperature=1,
        max_tokens=300,
        top_p=0.5,
        frequency_penalty=1,
        presence_penalty=1
    )
    return response.get('choices')[0]['text']

Known issues

  • some before & after plots are identical
  • plots are too long
  • some altered plots are obvious, e.g. missing parentheses, much shorter

Future work

  • choose shorter plots, around ~300 characters
  • skip plots with parentheses
  • make before & after the same number of sentences
  • prompt with just first two(?) sentences and generate the rest instead of feeding the entire plot
  • add text-to-image pictures