BIG ML | IDEA GENERATION

The Complete Guide to Generating Content with Big ML Models – Part 2

What’s the big idea? Creating new ideas

Welcome to Part 2 of the series ‘Big ML Content Generation’ where we tackle using the models for creating whole new ideas. In this part we’ll be focusing on the idea generation capabilities of models like GPT-3. To see the rest of the series, stop by the [Table of Contents].

Idea generation techniques can be used to spark new creative ideas for things way beyond text. They can be used to come up with ideas for pictures and videos for example. And when coupled with image generation models (which we’ll get into later in the series) you can use models to imagine completely unique images and styles.

For businesses you can create ideas for new products or product lines, or even features. In this article we’ll be using it to generate an entire menu for a fictional coffee shop; descriptions and all. And later we’ll jump into coming up with what pages to put on the website, and some ideas for content to put on those pages, ideas for blog posts, and more.

And these are just a few examples of what’s in store for the rest of the series.

Discovering themes

Back to the fictional coffee shop: let’s generate a menu of products to offer our customers.

To start, how about we give it a theme? We tried a few prompts without any theme limitations and got things that were amusing but not exactly what we were looking for. For the best results we kicked it off with two themes to set the context. Here is the prompt we used:

There is a really fun coffee shop in town. All of the drinks and decorations follow a theme. Here is a list of possible themes:

-Pirates

-Under the sea

And it generated:

-Jungle

-Dinosaurs

-Sci-fi

-Superheroes

All of those sound fun, but we’ll go with the sci-fi theme in our prompts. Feel free to seed it with your own ideas and see what interesting ideas you get!

A coffee stand

Generating a menu

Now let’s generate a list of possible menu items. Here is a prompt that worked well:

This is the menu of a coffee shop. The menu has drinks and food. The menu items have names that follow the “Sci-fi” theme.

Here is a two-column spreadsheet of menu items:

menu item | name

 It generated the following:

Drinks

Cappuccino | Starbuck

Hot Chocolate | Klingon Bloodwine

Espresso | Romulan Ale

Tea | Vulcan Tea

 

Food

Croissant | Federation Ration

Bagel | Klingon Rations

Muffin | Romulan Rations

Cookie | Cardassian Rations

The main criticism of this generation is that the word ration is over-used in the outputs. But with GPT-3 we can use one of two generation operators to solve this problem: frequency penalty and presence penalty.

To understand which to use and why, it’s important to understand how the generation works and what “Penalty” means in the generation process. When generating, penalty is used as a way to control how often a particular token is generated. The higher the penalty, the less likely the token is to be generated.

With this in mind, the key difference is that the frequency penalty increments the penalty each time the token is generated. As it is used more, its penalty score continues to increase. But the presence penalty works differently in that it is binary: the token is penalized once if it exists, but further uses of it do not increase the penalty.

Here is the same generation again but this time we’ve set the frequency penalty to 0.2:

Drinks

Coffee | Energizing Coffee

Tea | Time Travel Tea

Juice | Martian Mango Juice

 

Food

Bagel | Outer Space Bagel

Croissant | Galaxy Croissant

Muffin | Planetary Muffin

 And once more, this time with presence penalty cranked all the way up to 2:

Drinks:

Coffee | Arabian Nights

Tea | Mint tea

Hot chocolate | Chocolatey dream

Smoothie | Sunrise Special

 

Food:

Bagel with cream cheese | Martian munchies

Croissant | Intergalactic delight

Omelette | Venusian omelette

Pancakes | Saturn’s rings

 These operators can be quite powerful in tweaking the generation, especially for creative exercises such as this.

Menu item descriptions

Now we’ll look at generation the descriptions for each menu item. There are a couple ways to approach this, with the first being simply adjusting the previous prompt and generating the descriptions right inside the prompt.

Here is one such prompt:

This is the menu of a coffee shop. The menu has drinks and food. The menu items have names that follow the “Sci-fi” theme.

Here is a three-column spreadsheet of menu items:

menu item | name | description

And its output:

Drinks:

Coffee | Black Hole | A coffee with a kick

Tea | Time Traveler | A special tea that is out of this world

Smoothie | Galaxy | A delicious and healthy smoothie

Food:

Bagel | Planet | A freshly made bagel with your choice of topping

Muffin | Meteor | A warm and fluffy muffin

Cookies | aliens | Out of this world cookies

But that only works if you’re generating a whole menu. If you already have the menu items figured out and just need descriptions, here is a way to do that by feeding that into a larger prompt:

This is the menu of a coffee shop. The menu has drinks and food. The menu items have names that follow the “Sci-fi” theme.

Here is a two-column spreadsheet of menu items:

menu item | name

 

Drinks:

Coffee | Arabian Nights

Tea | Mint tea

Hot chocolate | Chocolatey dream

Smoothie | Sunrise Special

 

Food:

Bagel with cream cheese | Martian munchies

Croissant | Intergalactic delight

Omelette | Venusian omelette

Pancakes | Saturn’s rings

 

Each menu item has a corresponding description that also follows the “Sci-fi” theme. Here are the menu items with their descriptions:

 And we got this output:

Coffee – A rich and exotic coffee that will transport you to another world.

Tea – A refreshing and revitalizing tea that will leave you feeling refreshed and energized.

Hot chocolate – A dreamy and creamy hot chocolate that will make you feel like you’re floating on a cloud.

Smoothie – A delicious and nutritious smoothie that will give you the energy you need to take on the day.

 

Bagel with cream cheese – A hearty and filling bagel that will give you the fuel you need to explore the universe.

Croissant – A light and flaky croissant that will melt in your mouth and leave you wanting more.

Omelette – A protein-packed omelette that will give you the strength you need to take on whatever the day throws at you.

Pancakes – A stack of fluffy pancakes that will fill you up and give you the energy you need to conquer the day.

As we go along, we can keep using the outputs as new inputs to further refine the output as needed.

Menu imagery

Menus aren’t just text; they have images too. And GPT-3 can be used to help come up with the ideas for photos of each menu item. In this case we used a variation of the previous (long) prompt but replaced the final line with this one instead:

The menu items have attractive photos. Describe some photos which can be used for each item:

And this generated the following text:

Coffee. A photo of a steaming cup of coffee with aromatic swirls coming off the top.

Tea. A photo of a delicate teacup with a single perfect tea leaf floating in the amber liquid.

Hot chocolate. A photo of a rich and creamy hot chocolate, topped with fluffy marshmallows.

Smoothie. A photo of a tall glass of fruity smoothie, with a slice of fresh pineapple on the rim.

Bagel with cream cheese. A photo of a bagel with cream cheese, garnished with a sprig of fresh dill.

Croissant. A photo of a freshly-baked croissant, with flakes of buttery pastry falling off the sides.

Omelette. A photo of a golden omelette, stuffed with mushrooms, onions, and cheese.

Pancakes. A photo of pancakes stacked high, dripping with golden syrup and melting butter.

This list could be a great start to a request of images you’d like for the menu. You can then get them photographed by a food photographer, find stock photos, or you can even use tools like Stable Diffusion to create them from text prompts.

And if that piqued your interest then you’re in luck. We’ll be getting into image generation in Part 5 of this series in a few weeks. But in the meantime if you have signed up for OpenAI you can get started using DALL-E today at https://openai.com/dall-e-2/. And if you check back in a few weeks, we’ll go through setting up Stable Diffusion (a competing model) on your own computer and using it in your creative workflows.

In case you’re curious here are some of those menu items generated in Stable Diffusion:

 

 

 The series continues with GPT-3 – can it replace Google?

< Table of Contents

READY TO START YOUR PROJECT?

  • CRMs/ERPs
  • Payment Gateways
  • Accounting Systems
  • Lead Managements Tools
  • Web Apps
  • Legacy Systems
  • E-Commerce Systems
  • Freight/Shipping Systems
  • Social Media
  • Email Services

Get In Touch