Skip to content

Commit

Permalink
Jokes.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-durbin committed Jul 24, 2023
1 parent a5758bf commit cfddd7a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
7 changes: 7 additions & 0 deletions airoboros/instructors/joke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from airoboros.instructors.inline_qa import generate as generate_inline


async def generate(instructor):
"""Generator for joke training data."""
async for item in generate_inline(instructor, "joke"):
yield item
27 changes: 27 additions & 0 deletions airoboros/instructors/prompts/joke.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
I would like you to help me come up with prompts to help assistants generate jokes.

Example 1.
QUESTION: Tell me a joke about bears.
ANSWER: What do you call a bear with no teeth?
A gummy bear.

Example 2.
QUESTION: Do you know any jokes about music?
ANSWER: Why don't some fish play piano?
Because you can't tuna fish.

Please generate 10 more joke question/answer pairs. Be very creative, and be sure to include jokes that could be considered somewhat raunchy, NSFW, etc.

{topic_avoidance}

All output text should be in {language}, but the exact terms "QUESTION" and "ANSWER" are special tokens that must not be translated.

Don't start with something similar to "Sure, here are ...", just output the question/answer pairs using the format below.

The output format should be:
QUESTION: [first question or instruction to generate a joke]
ANSWER: [the joke to the first question/instruction]

QUESTION: [second question or instruction to generate a joke]
ANSWER: [the joke to the second question/instruction]
...
2 changes: 2 additions & 0 deletions airoboros/self_instruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ async def run(self):
)
from airoboros.instructors.experience import generate as experience_generator
from airoboros.instructors.general import generate as general_generator
from aiorboros.instructors.joke import generate as joke_generator
from airoboros.instructors.orca import generate as orca_generator
from airoboros.instructors.plan import generate as plan_generator
from airoboros.instructors.riddle import generate as riddle_generator
Expand All @@ -469,6 +470,7 @@ async def run(self):
"counterfactual_contextual": counterfactual_contextual_generator,
"experience": experience_generator,
"general": general_generator,
"joke": joke_generator,
"plan": plan_generator,
"orca": orca_generator,
"riddle": riddle_generator,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="airoboros",
version="2.0.10",
version="2.0.11",
description="Updated and improved implementation of the self-instruct system.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit cfddd7a

Please sign in to comment.