Learn what is a prompt and why its important in AI, especially when working with language models.
Take a deeper look at the emerging careers in prompt engineering.
Let's begin by covering the fundamentals. A language model takes a prompt as input to generate text. Most prompts are made of three components: the instruction, the context, and the examples. The instruction directs the prompt, the context sets the scene for the prompt, and the examples explain the expected action.
Here is a prompt: "Write a persuasive essay on the usage of genetically modified organisms (GMOs) in agriculture. Provide examples to back up your claims. Imagine that it's the 1990s."
Can you identify all three components?
In this case, the instruction is in the first sentence "Write a persuasive essay on the usage of genetically modified organisms (GMOs) in agriculture”. This clearly tells the model what to do. The context is in the last sentence, where the model is told to imagine it’s the 1990s. This situates the essay in a different time, limiting the arguments and the speech it can use.
Finally, the example is clearly in the middle sentence, where the model is explicitly told to use examples to back up the claims.
Now, why are prompts so important?
Well, the quality of a prompt directly affects the output of a language model. A well-designed prompt can result in precise and relevant replies, whereas a badly designed prompt might provide unclear or false outputs. So, it's essential that you understand how to create smart prompts in so that you can obtain the desired results from language models.
Let's dive into some prompt engineering techniques that can help you craft powerful prompts for language models:
You will use prompts in platforms like ChatGPT where you will be presented with interface where the prompt will be how you will generate a response. We'll go into more detail on how to do this in the project next.
So let's go to the next section to get started on the project task.
With the rise of AI and large language models, so has the need for those with the ability to get the most out of them. This has resulted in a new set of jobs termed as prompt engineers who communicate with AI and these models through creation of efficient code to accomplish specific tasks and outputs.
The salaries for prompt engineers as of 2023 range from $90 - 180K base salary per year.
But there is some risk as not everyone thinks this is a sustainable job field, as the need for the skills prompt engineers will grow as AI grows in the workplace and everyday life. Expectations are that as AI improves and developers address the gaps, AI itself could theoretically automate input generation.
Alternatively it becomes an expectation of all employees to be familiar with prompt engineering skills as much as we do with the internet. And as such it's important for all of us to learn the basics through projects like this one.