SeanDaBlack / AbBOT

310 stars 57 forks source link

Generating more varied prompts #73

Closed TheLandfill closed 2 years ago

TheLandfill commented 2 years ago

I wrote some code to generate a random prompt from a Markov process. It's kind of like Mad Libs, except I wrote it specifically so that almost all sentences make sense (e.g. it doesn't account for gender) and that sentences are quite realistic in the sense that a live-in maid is less likely to be the accused than your son's teacher. For example, here are some sample prompts this algorithm generated:

Right now, it's only using two patterns:

where (think) refers to a mandatory verb that can replace think and [time] refers to an optional point in time (e.g. next Friday). Even with just these two patterns, I'm getting around 800,000 unique prompts out of 2,000,000 generated prompts. If we added more patterns and more options, we could get even more prompts. To extend what I have done, though, we have to use either short or realistic phrases. "I have reason to believe" is a common phrase that filtering it out could remove real submissions. Furthermore, we should try to make sure we have a large number of unique sentences before we string them together. For example, if I have 10^27 possible first sentences and 5 possible second sentences, you could filter out any submissions with the 5 possible second sentences.

I think for now, we can use this code as a prompt for GPT or just use it as the submission message every so often.

TheLandfill commented 2 years ago

Also, if someone gives me a ton of realistic patterns like "I overheard her tell her mom when I was at the store.", then I could make more.

ramblingjordan commented 2 years ago

This is great!

We have moved active development for the python script to this repo: https://github.com/ramblingjordan/AbBOT-python

Could you please recreate your PR in that repo?

Thanks!