How to write better AI text prompts
It really feels like things are moving incredibly fast at the moment. AI is the big buzzword on the internet and over the last twelve months we’ve seen a multitude of AI products grabbing the world’s attention that can create images, videos, 3D models, text, and even music from simple text prompts. Across all of these mediums we’ve a lot of high-quality creative content shared on the internet at the same time as we’ve seen lots of rubbish and no doubt created our fair share of crap too. The secret sauce here is the text prompts themselves. The prompts you put into these various machines will dictate the quality of the outputs you get.
Is this really what you had in mind?
Essentially then, we are living in an age or at least moving into one at quite some speed where you can create visual and even audio masterpieces simply based on the quality of the text prompt you can put into these machines. In this context then, it is probably worth your while learning about the dynamics behind these types of tools, what makes a good text prompt and how to engineer good text prompts yourself. And yes, by the way, that is what they are calling it. Prompt Engineering.
Prompt Engineering How-to Guide
AI prompt engineering refers to the use of prompts to train and direct artificial intelligence models to generate desired outcomes such as text, audio, images, or videos. They can work across the broad variety of generative AI tech we’ve seen come online in recent years, such as ChatGPT and DALL-E 2. Prompts are versatile too and can be anything from a single word to an entire statement or code block. They can be given as questions or as statements and can be written out in simple sentence form or even large complex paragraphs with instructions across different formatting types. Depending on how far you want to go with your prompts you can even import csv data filled with data that will train the model toward your outputting your desired results.
Prompt engineering is the process of crafting these prompts as precisely as possible so as to exert as much control over the models as possible to ensure the output matches your expectations as closely as possible. If you can master the process, you can have these new types of tools create stunning works of art for you across a variety of mediums.
Text-to-image prompts
For images, you can use the following tools for using prompts to create art:
According to Re-thought there are certain Prompt Basics that you need to take into account. Prompts should be at least 3-7 words long, should include multiple adjectives, include the name of an artist to emulate, the style of painting you’d like to see recreated, types of computer graphics such as Unreal Engine or Ray Tracing, the quality the image should be, and finally, it should avoid banned words. So let’s give this a try using DALL-E:
Text prompt = A beautiful beach with coconut palm trees and fine white sand and clear aqua water at sunset in a Dali-style cubist form in 4k
Other key tips given include using abstract words like hope or dream for more surprises and concrete words like beach and trees to more specifically get what you are looking for. We can mix that first prompt up then by inputting more abstract words.
Text prompt = A beach that makes you feel happy because of the hopeful light coming from beyond the horizon as a romantic Picasso-style image in hd
Text generators
We’re going to use ChatGPT for this section of our guide. Tech Briefly has put together another guide to writing good prompts and includes core components of good prompts. These are:
Instructions
Question
Input data
Examples
The guide says that properly blending these together will ensure greater success rates when using these types of tools. It is also necessary to provide as much specific and descriptive information as possible on the subject you are looking to cover as well as much information about what you are trying to create.
Using these instructions then could see us trying to get ChatGPT to help us synthesize some information on a particular subject, for example, to help us prepare for a test or to help us prepare for a project. This could look something like this:
“Write about bats”
The text output offers a fairly vague overview over what bats are but it doesn’t have nearly as much useful information or context as say Wikipedia:
This means that depending on what you want from the tool, you will have to go into more detail in order to fine-tune the output you will get from the tool. In this sense then you could take information from the original answer you got from the tool, or you could maybe bring in some context from outside research sources such as Wikipedia. So for example:
“Tell me about the nocturnal habits and echolocation abilities of bats”
“What is the difference between a fruit-eating megabat and an echo-locating microbat?”
Of course another way to do it is to get the tool to do the reading for you by copying and pasting the text in from the original source and asking it to break it down and summarise it for you.
–
To conclude then, this quick guide to prompt engineering has introduced you to basic concepts that you can use to craft prompts that will give the AI tool something to work with. There are a lot more dynamics you can introduce into your prompts to exert greater control over the tools output, but we’d need a series of these articles to go into them all. It is highly likely prompt engineering will become a new formal education subject too. In the meantime, however, I just want to try something:
“Write me a 1,000 word guide to prompt engineering”
Thank you for being a Ghacks reader. The post How to write better AI text prompts appeared first on gHacks Technology News.
gHacks Technology News