AI Generated Blogs

Found myself with a bit of extra time on my hands lately, so I decided to take the opportunity to explore some AI generated content in the form of micro blogs.

My goal was to write some python that interfaces with OpenAI’s api (gpt3.5 turbo model), writes focused content on randomized topics, and then warps that up in a Hugo static site, aka micro blog.

I started with an expandable YaML configuration. With this, I could define multiple terms which get randomized into search queries, this ultimately makes as many posts as I ask for:

config.yaml

topics:

  #####################
  # lovecraft
  #####################
  - topic_name: lovecraft
    description: H. P. Lovecraft fan fiction website

    color: '#6B5B95'

    pages:
      - name: about
        search_text: write an about page for the H. P. Lovecraft fan fiction website
      - name: mission
        search_text: write a mission statement for the H. P. Lovecraft fan fiction website

    post_count: 20
    post_prefix: write a short story in lovecraft style about

    search_text_template: 'the {subjects} {actions} at the {locations} {places}'

    inputs:
      subjects:
        - Cthulhu
        - Nyarlathotep
        - Shub-Niggurath
        - Yog-Sothoth
        - Dagon
        - Mi-Go
        - Deep Ones
        - Nightgaunts
        - The Colour Out of Space
        - Hounds of Tindalos

      actions:
        - Lurking
        - Hunting
        - Scaring
        - Attacking
        - Roaring
        - Growling
        - Ambushing
        - Feeding
        - Chasing

      places:
        - Decaying Towns
        - Isolated Countryside
        - Ancient Ruins
        - University
        - Libraries
        - Underground Tunnels
        - Caverns
        - Madhouses
        - Asylums

      locations:
        - Arkham
        - Innsmouth
        - Kingsport
        - Dunwich
        - Celephais
        - R'lyeh
        - Yuggoth
        - The Dreamlands
        - Mountains of Madness
        - Dunwich

To avoid overuse of the OpenAI’s api, I decided to store all content related to the query in local MongoDB collections. This stores each of those randomized inputs as tags, I can later use these in the Hugo’s markdown creation:

mongo

I think the results are fairly impressive. All that is needed to create more micro blogs is to expand on the YaML configuration.

blog

Go ahead and look at the catalog of some of my programmatically generated microblogs.

Shortly after this experimenting, I decided to see how much human curation can improve the look at feel of the blogs. I set out on a journey to do just that with a Cat Wellness Hub blog:

cat

Do you think small amount of human effort makes that big of difference?