Prompt Engineering : An Introduction

 


A stereotypical engineer

Despite concerns about job changes due to ChatGPT, something interesting is happening: the emergence of a new job title known as the Prompt Engineer.

Still skeptical? Take a moment to browse professional platforms like LinkedIn or Indeed—see it for yourself!

Now, you might wonder, 'What is Prompt Engineering?' Well, I'll give you a prompt answer (okay, sorry for the pun).

Essentially, prompt engineering involves using special words or hints to instruct computers without saying everything explicitly.

Think of it like when your mom says, "Bring me my bag from on top of the table."

Even if your house has many tables, you know it's not in her car.

She assumes you know what her bag looks like, so she doesn't need to describe it.

But if she tells you which room to search in, you'd find her bag faster, right?

Having said that, here are some tips that can help you write robust prompts:

Understand the Task

This is where your domain knowledge comes into play. “If you define the problem correctly, you almost have the solution.”— Steve Jobs

Specificity is Key

The following example comes from Dave Birss

You are an eloquent and professional executive known for your effective and persuasive communications. I want you to help me respond to this {email}. Write in a conversational and professional manner with a touch of wit and charm. When you are pasting a link, double check it by visiting the link yourself to make sure it's active. If it's a dead link, try again until you find a working one. 

I want you to:

- List of requests (inc. make comment about weather in their area, find relevant news story, etc)

{email}:


Try Shot Prompting : Giving Examples

Shot prompting involves giving the model a limited number of examples, or "shots," typically in the form of input-output pairs or demonstrations, to help it learn and generalize patterns for a particular task or desired output

Zero-Shot Prompting

In zero-shot prompting, the model is given a task without any specific examples or fine-tuning on that particular task. It relies on its general knowledge to generate responses based on the prompt. For example:

Zero-shot prompt: Where could my mom's bag be?

The model, may respond with "Rooms and areas she frequently uses"

Few-Shot Prompting

Few-shot prompting involves providing a small number of examples to guide the model in understanding the task better. For instance:


Few-shot prompt: Find my mom's bag it is usually on the Living Room table and last time, she left it in the car's backseat.

Now the model would be more specific and suggest checking the Living Room. 



Resources 

Comments

Popular posts from this blog

Missing Data : What to Do?

Upskilling: Certificates vs. Certifications

Women In STEM : Challenges and Advantages

SQL Server Reporting Services vs. Power BI

5 Authentication Methods

There Has Been a Data Breach: Now What?

Inductive and Deductive Reasoning

Improving SQL Query Performance : Indexes

Don't Be Bland : Spice Up Your Personal Brand